Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I change qMail's ip address?

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


share|improve this question
up vote 10 down vote accepted

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:


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 = will do the trick.

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

share|improve this answer
+1 for "hope you are also dealing with the reason your IP address was blacklisted" – EightBitTony Jun 26 '12 at 14:39
smtp_bind_address = to or ? – There is no knowledge Jun 26 '12 at 14:43
smtp_bind_address it works with postfix. thank you! – There is no knowledge Jun 26 '12 at 14:47

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 ( 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.

share|improve this answer
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

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.

share|improve this answer
Really? OMG! I will use postfix. What you say? – There is no knowledge Jun 26 '12 at 14:14
If you do, use smtp_bind_address = to select which IP address to send from. – Ladadadada Jun 26 '12 at 14:19

Your Answer


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.