tags:

views:

8

answers:

1

For testing purposes, I am trying to send emails to [email protected], but qmail won't parse /etc/hosts. It is running in a physical black box, so there is no way for it to access any DNS server.

How can I tell qmail to deliver emails going to test.com to a specific IP address?

+1  A: 

To relay outgoing mail for "example.com" to an SMTP server at 10.9.8.7 port 2500 with username "foo" and password "bar":

echo example.com:10.9.8.7:2500 foo bar >>/var/qmail/control/smtproutes To relay all outgoing mail to an SMTP server at 10.9.8.7 port 25 with username "foo" and password "bar":

echo :10.9.8.7 foo bar >>/var/qmail/control/smtproutes

for more see http://tomclegg.net/qmail/

al3cs
Worked like a charm
Tom