knocx:
how could you bind port 25 to Postfix and qmail on the same server?
They are listening on the same port, but not the same IPs.
In short, I added the line:
to /etc/xinetd.d/smtp_psa, where 10.0.0.100 is my DMZ NIC/IP on that server. The IronPort anti-spam appliance has an interface on that network to send mail to/from the Internet. This is also where qmail forwards mail destined to the outside world via an entry in /var/qmail/control/smtproutes.
I also created an additional xinetd config called smtp_psa_localhost, this simply has "bind = 127.0.0.1". This is in case something local is connecting to SMTP on localhost. It doesn't look like you can have multiple bind statements in an xinetd.d file (that I could find, I also tried adding a comma as well but not a major issue).
Then I told Postfix to listen only on 192.168.0.1 - 192.168.0.10, where these would be my mail server public ips of the plesk server (for normal users to connect to).
/etc/Postfix/main.cf:
Code:
inet_interfaces = 192.168.0.1, 192.168.0.2, 192...
Now, the only caveat I've thought of is plesk killing my /etc/xinetd.d/smtp_psa file, but I'll just be sure to monitor that when I do updates. Other than that, it's about it. I will post a more formal tutorial when I've tested it enough to put my stamp on it.
it will be really great if you can post a tutorial about your implementation
There's more to it, like compiling and configuring Postfix to use MySQL, and for pop-before-smtp auth. It's nice that Plesk puts poplock information in mysql, easier than reading from a file IMO. I could move my Postfix install off onto another server if I wanted and just let qmail have the run of the plesk server. For now though I want to leave everything on the single server, but I may bring up a dedicated Postfix server.
I did a dirty hack to the smtp_poplock table to save time, so I want to fix that so the tutorial doesn't have that embarrassment on it. Nothing security related, just being lazy.
Let me know if you have any other questions. I might work on the tutorial over the weekend if I'm bored.
-Bill