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

I would like to configure qmail to send email for certain domains using specific IPs for the outbound traffic. All other domains could continue to use the system's primary IP as usual. Is this possible? If so, how would I configure it?

share|improve this question

2 Answers 2

up vote 3 down vote accepted
+50

If your qmail include the bindroutes patch, and if you know the IP address if the MX you want to connect to, then you could do it, using /var/qmail/control/bindroutes (1.2.3.4 is the IP of the distant MX, 5.6.7.8 is the IP you want to bind, 5.6.7.88 is your "normal" IP):

1.2.3.4:5.6.7.8
:5.6.7.88
share|improve this answer

From my experience and what I searched in the manual, this doesn't seem possible with the unpatched version of qmail.

But, if you use patches from this page (which I use and would recommend anyway because it supports so much sane and interesting features), you can search in that page for the string 'newbind.patch'. The second match will probably give you a good solution to your problem. The main difference from the bindroutes patch is that you can configure IP address binding according to the recipent domain name instead of its IP address (which I find more convenient).

Anyway, I find that the site http://qmail.jms1.net is really useful. It had become my main source of documentation/script/patch in regard to qmail. It definitely deserve a not-so-short visit.

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.