Bind IP to qmail

How do I bind an IP address to qmail?

I have multiple IP addresses on my machine and I want set eth0:1 as the mail server address. My DNS is pointing mail.mydomain.com to the correct IP but qmail is picking the address on eth0 to send from which obviously is failing in some spam filters.

Any help would be greatly appreciated.

Thanks!

I found your old thread searching google for a way to bind IP to sendmail.

Looks like interworx already has qmail patched (thankfully) and you can do it. Follow the instructions in the second post of this thread:
http://forums.interworx.com/threads/3018-Patching-qmail-outgoing-ip-address-selection

Reboot SMTP server after creating the file and it works beautifully.

Hi deheleri

Many thanks

Yes, the patch was added many years ago and you can bind ip to any IPv4 address, even have different domains bind to different ip addresses

Many thanks

John

May I ask a question? Why do you want to do this, I mean multiply the IP?

Hi zandry

Good question

The answer is many reasons from separating email to hosting ip, to using email on another server etc… it?s also handy if your email server ip gets blacklisted

Many thanks

John