Tom
Tom

Reputation: 7223

Qmail: How to use custom hosts file?

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?

Upvotes: 0

Views: 590

Answers (1)

alexborbely
alexborbely

Reputation: 183

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/

Upvotes: 1

Related Questions