5-E: RELAYING

I think this topic has been explained a lot of times.

This page explains everything there is to know: http://www.palomine.net/qmail/relaying.html

Now, what we are going to use is:

/var/qmail/control/rcpthosts

You should run

addipbl /var/qmail/control/relayclients X.X.X.X

#where X.X.X.X is the relay client IP address

On this file you MUST have the domains you are accepting mail for and also the ones for which you'll send email.

/var/qmail/control/smtproutes

This file should have line/s following this format:

domain.com:mail.domain.com (using mail server hostname)
email.com:192.168.1.10     (using mail server IP address) 
.domain.com:mail.domain.com (route all subdomains of domain.com)
:mail.domain.com (route everything through mail.domain.com)
#domain.com:mail.domain.com username pass      (SMTP AUTH for smtproutes is not yet implemented
# in Qremote, we'll tell you as soon as it is, so if you want this function you should skip the qsmtp part,
# or just not install qremote)
# If the remote server is not using STARTTLS you may need to add a "-" (minus) before the username
# It's a security measure, and the - is a bypass.
# If you pretend to use IPv6 relaying you have to get the SVN version of addipbl so...

cd /usr/src wget http://opensource.sf-tec.de/repos/Qsmtp/trunk/tools/addipbl.c gcc -o addipbl addipbl.c mv addipbl /usr/local/bin/addipbl #And then you run (replacing...) addipbl /var/qmail/control/relayclients6 AAAA:BBBB::C