Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 21st January 2009, 23:07
rvarkevisser rvarkevisser is offline
Join Date: Feb 2007
Posts: 58
Thanks: 0
Thanked 1 Time in 1 Post
Default postfix nat + multiple mail hostnames

Hi there,

I've got a strange problem.
We have got 3 ISPConfig servers running in VM behind a nat firewall.

We use postfix on our server and want to create an MX record for every domain with the hostname mail.domain.com.
The problem is that every ispconfig vmguest (even the vmware server) cannot connect to mail.domain.com over port 25, even
when the domain is hosted on the same server.

telnet: Unable to connect to remote host: Connection refused
But when I try to connect to mail.domain.com from outside (like at home), it works great.

The strange thing is, I CAN connect to every ispconfig vmguest using the localhost or hostname of the server, but not the mail.domain.com

In local-host-names I've got mail.domain.com, etc.etc.

I've looked at the NAT translations, but cannot find anything.
Also when I do a telnet on port 80 (www) from a vmguest to a different vmquest, using the public ip adres, it works!!! So It's not a NAT problem or routing problem.

It's not a resolving problem, because DNS works perfectly and I can resolve mail.domain.com from every vm server.

It's postfix that gives this problem for the vmguests and vmware server. Outside the network everything works the way it should.

When I add the record mail.domain.com to /etc/resolv.conf and let it resolve to the local ip of the server or another vmguest, it works also! So you could say it's a NAT problem, but why is
www or ftp or dns working through NAT?

I've tried the following setting in main.cf
mynetworks =
inet_interfaces = all

I need help.... big time!

Last edited by rvarkevisser; 22nd January 2009 at 00:56.
Reply With Quote
Sponsored Links
Old 22nd January 2009, 11:25
till till is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,022
Thanks: 840
Thanked 5,655 Times in 4,464 Posts

Postfix does not rely on the domain name. As long as postfix listens on the IP address that you ponted the domain name to, it will work. Please chacek that mail.domain.com really ahs the correct DNS A-Record that points to the external IP address of the server (router) and that you forwarded port 25 from the router to the internal IP of the server.
Till Brehm
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Old 26th January 2009, 18:30
rvarkevisser rvarkevisser is offline
Join Date: Feb 2007
Posts: 58
Thanks: 0
Thanked 1 Time in 1 Post
Default iptables problem

I found the application which causes the problem. It's iptables.

When I want to connect (telnet) to the public IP address through port 25, it gives an "Unable to connect" error.

I use the same NAT rule for http, but with a different public ip address. The strange thing is, I can connect to port 80 when telnetting to this public ip over port 80.

It's only port 25 that gives the problem. The rules are exactly the same, only one is with http and the other with smtp. I use fwbuilder to maintain the rules, so there could be a bug in it. I will try version 3.0.

Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Undelivered Mail Returned to Sender Error202 General 5 7th May 2009 12:14
localhost postfix/master: fatal: bind port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 18:39
just the last step...and it works. Postfix...need help config. ubuntusr Installation/Configuration 1 5th January 2009 10:50
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 18:51
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 10:40

All times are GMT +2. The time now is 03:18.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.