-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 Answers3

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.

Ladadadada
  • 26,337
  • 7
  • 59
  • 90
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.

voretaq7
  • 79,879
  • 17
  • 130
  • 214
  • I think the end of point #2 and the last line of point #1 may be connected? – EightBitTony Jun 26 '12 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 '12 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.

Chris S
  • 77,945
  • 11
  • 124
  • 216