February 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
232425262728  

Categories

February 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
232425262728  

Qmail – Relay Mails to Gmail

Earlier we have covered postfix- relay mails to gmail

This tip is for the qmail server using Jms patch.

Many of us prefer Qmail instead of Postfix, especially when it come to use as mail server, for the one who wish to relay mails postfix is easy to install.

Make sure you have created cert while installing Qmail.
e.g.

cd /usr/src/qmail/qmail-1.03
./config-fast tech.linuxreaders.com
make cert
chown -R vpopmail:qmail /var/qmail/control/clientcert.pem /var/qmail/control/servercert.pem
Create new smtp service. I created qmail-smtpd1 which listens on port 26

/service/qmail-smtpd1/run
#!/bin/sh
exec tcpserver -v 127.0.0.1 26 openssl s_client -quiet -connect smtp.gmail.com:25 2>&1
Aadd entry in smtproutes

cat /var/qmail/control/smtproutes
#following is to relay all mails through gmail
:smtp.gmail.com linuxreaders@gmail.com my_passwd
#OR
#following is to relay only technoreaders.com through gmail.
technoreaders.com:smtp.gmail.com linuxreaders@gmail.com my_passwd

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>