Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How to configure Qmail such that for outgoing mails it will automatically set the source IP depending on the domain rather than using the default IP of the server.

I think there is configuration in Exim to send outgoing mail from the ip that matches the domain name in /etc/mailips.

Is there something similar present in Qmail ?

Warm Regards

Supratik

share|improve this question

2 Answers 2

There's also another qmail patch which uses a control file instead of DNS lookups:

http://rno-consultores.com./mail/qmail/qmail-1.03_outgoingips.patch

Beware! Both patches not only select the outgoing IP address, but also change the hostname used in the HELO command that qmail-remote uses when connecting to the target server. This can be problematic if you don't use dedicated IPs for every domain because your server is then telling "HELO domain1.tld" as well as "HELO domain2.tld" for connections originating from the same IP address. A couple of providers don't like this "multiple personality" behaviour and will block the IP in question as soon as a couple of HELO hostname changes are observed.

The correct way would be to set the HELO string to PTR record of the outgoing IP; however I'm not aware of any patch which does this.

share|improve this answer

It doesn't look like that functionality is supported directly, but there is a patch that sounds like it will do what you want:

http://www.digitaldaemon.com/FreeBSD/qmail/index.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.