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

QMail uses the server's default IP as its outgoing IP. How do I change the IP to something else?

I tried the instructions in the following links but they don't work in my case.

  1. http://www.indianwebportal.com/change-mail-server-ip-address-plesk

  2. http://forum.parallels.com/showthread.php?t=99500

Any help will be appreciated.

share|improve this question
    
How don't they work? Are there any telltale signs, particularly error messages and log files? –  Wesley Oct 15 '11 at 1:42
    
The email header indicates that the email was sent using the default IP address. –  Dave Oct 15 '11 at 4:40

2 Answers 2

If you always want it to use one particular address, I think you want the outgoingip patch. If you want to use different addresses depending on the envelope sender, I think you want the outgoingips patch. There is also the bindroutes patch, if you want to use different addresses based on the IP address of destination (you can use wildcards). Looks like the domainbindings patch also selects the IP address based on the envelope sender domain, though it's against netqmail, not stock qmail.

As to the links you mentioned, they're for Plesk Qmail. Which flavor of Qmail are you using? Plesk? Stock djb qmail-1.03? Some version of netqmail?

Here's a guide to patching Qmail with Plesk. See also this question.

share|improve this answer
    
I guess what I really want is to allow qmail to use different addresses. I use Plesk 10 in a Mediatemple dv. I'm just afraid to break anything on production server if I recompile qmail. Do have a guide to this? –  Dave Dec 2 '11 at 7:04

Well, I'm in no way an expert of qmail, but sometimes issues can be solved quite differently, specially when there're no special knobs (or they're hard to find) — you can use NAT: add iptables rule that would match outgoing TCP traffic to port 25 and SNAT it to IP you need.

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.