-2

How can I change qMail's ip address?

I have 4 IP addresses on my server. 1.1.1.1 is blacklisted and i want using 1.1.1.2 for outgoing mails.

Thanks.

3 Answers 3

10

qmail uses the first IP address it finds to send mail from. If you want to change this behaviour, you have to patch it and recompile. If this scares, worries or concerns you then maybe qmail is not for you.

There are patches available that do this:

  1. http://rno-consultores.com./mail/qmail/qmail-1.03_outgoingips.patch
  2. http://www.digitaldaemon.com/FreeBSD/qmail/index.html
  3. http://www.qmail.org/outgoingip.patch

Also, with regards to Plesk, someone suggested here to:

Append/add following line to /etc/xinetd.d/smtp_psa:
bind = your IP
and restart xinetd with
/etc/init.d/xinetd restart

Also see this question which seems highly relevant to your situation.


If you switch to Postfix, smtp_bind_address = 1.1.1.2 will do the trick.

I do hope you are also dealing with the reason your IP address was blacklisted.

3
  • 2
    +1 for "hope you are also dealing with the reason your IP address was blacklisted" Jun 26, 2012 at 14:39
  • smtp_bind_address = 1.1.1.2 to main.cf or master.cf ? Jun 26, 2012 at 14:43
  • smtp_bind_address it works with postfix. thank you! Jun 26, 2012 at 14:47
9

You're Doing It Wrong

In fact, you're Doing It Wrong in two ways:

  1. You're moving to a new IP instead of getting your old one removed from the blacklists.
    Find out what blacklists you're on (dnsstuff.com has a free tool for this!), and contact them for removal.
    Polluting your IP space by leaving addresses on the blacklist will eventually get your whole provider blacklisted, and they'll terminate your services if they've got half a spine.
    (If you're a spammer, reform your ways now. We give no quarter to spammers here.)

  2. You're using qmail.
    Like Chris S already said - Seriously, don't use it. It's awful, it's not secure, it's a nightmare to troubleshoot, and it does truly heinous things like hard-coding the inode # of its queue directory into the binary.
    The only thing it's good at is sending huge volumes of mail fast.

2
  • I think the end of point #2 and the last line of point #1 may be connected? Jun 26, 2012 at 14:39
  • @EightBitTony There are legitimate reasons to want to send huge volumes of mail fast -- In my experience even the qmail-using heathens among the legitimate folks clean up their address space pretty well, but spammers leave naught but scorched earth (and angry net admins) in their path :)
    – voretaq7
    Jun 26, 2012 at 14:42
6

Stop using QMail. It's horribly antiquated and hasn't been updated in 14 YEARS.

That might not be the answer you're looking for, but it's the correct answer for anyone still using it.

2
  • Really? OMG! I will use postfix. What you say? Jun 26, 2012 at 14:14
  • 1
    If you do, use smtp_bind_address = 1.1.1.2 to select which IP address to send from.
    – Ladadadada
    Jun 26, 2012 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .