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

Reference

Related posts:

  1. Postfix- Relay Emails to Gmail
  2. Import Mails & Contacts from Yahoo, Aol, Hotmail… to your Gmail
  3. Gmail Down
  4. Access Gmail Offline.
  5. DNS Server on CentOS

Subscribe to LinuxReaders

rss twitter mail google buzz facbook stumble digg

Leave a Reply