qmail is a mail transfer agent that runs on Linux and Unixish oses. It is more secure replacement for the popular Sendmail program. Yes, it is possible to bind Qmail to specific IP. Here is what I did. Please note that I am running light weight QMAIL server from xinetd service.
1) Open your /etc/xinetd.d/smtp file and add bind=IP line:
# vi /etc/xinetd.d/smtp
Append/add following line to it:
bind = 202.55.55.202
Where,
- bind = 202.55.55.202: Qmail IP address to bind.
2) Save file
3) Reload xinetd with any one of the following command:
# /etc/init.d/xinetd reload
OR
/etc/init.d/xinetd restart
References:
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop






![Sending Email With Attachments From Unix / Linux Command [ Shell Prompt ]](http://s13.cyberciti.org/images/shared/rp/3/2.jpg)








{ 6 comments… read them below or add one }
Well this was pretty useless. How many people use qmail with inetd?
Hey that did not work for me. When I insert the bind line, no email goes out after that.
I am on FC2 using Plesk 7.5, so I am using the xinetd service, but not a lightweight version of Qmail, I guess a regular one.
My quetion is: is this supposed to work with a specific patch on Qmail?
Googling the topic showed that plain vanilla qmail only sends to the server’s default IP and most people recommend a patch to change the outgoing IP…
Ajack
Absolute useless. Not because of the fact, that Plesk and Visas (both famous ISP-Software) use Qmail with inetd. :)
No, it useless because (x)inetd is for getting Mails, not for sending. For this you don’t need inetd to bind on a specific IP, because the MX-Record do this for you.
If you want to bind Qmail for outgoing Mails on an IP, i must tell you: this will not work because Qmail have no possibles to do so.
huschi.
It seems that you can do this, see this link:
http://www.digitaldaemon.com/FreeBSD/qmail/index.html
I am using qmialServer. I do not know how enable SELinux. Pls tell me is there an possible ways to enable SELinux in qmailserver and pls tell me what is the procedure to use IPTables to block unauthorised users from outside
I use plesk, i had the same problem and i applied the instructions here and than qmail uses the IP address that i want now:
http://kb.parallels.com/en/1190