postfix help please

Discussion in 'Server Operation' started by onesandtwos, Jan 17, 2006.

  1. onesandtwos

    onesandtwos New Member


    Bit new to PostFix and am having trouble setting it up.

    I am trying to set up a null server that can send mail but not receive mail. The server running Postfix is on DMZ of network. We have an exchange Server on the LAN of the network that handles all receiving of mail. The postfix is for my webserver to send confirmation emails to internet users and that's it.

    I followed the basic config and standard config for a null client in the documentation but its left me with some problems.

    Program works fine sending mail to external mail addresses like hotmail, gmail, etc but when I try to send mail to i get an error of "connect to[]: Connection timed out" where is the address of my router.

    This is having a knock on effect of my mailq filling up with mail from root. Anybody have any ideas how to force emails to my domain to be sent externally? This should resolve the [email protected] problem shouldn't it? Really really need a hand... :confused:

    Here are changes to config i've made....

    in i've commented out local delivery agent (local) as per documentation instructions.

    A printout of postconf -n is as follows...

    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/lib/postfix
    html_directory = /usr/share/doc/postfix-2.2.5/html
    inet_interfaces =
    local_transport = error:local delivery is disabled
    mail_owner = postfix
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    mydestination = mydomain =
    myhostname = mydomain
    mynetworks =
    mynetworks_style = host
    myorigin =
    newaliases_path = /usr/bin/newaliases
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.2.5/README_FILES relay_domains =
    relayhost =
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
  2. falko

    falko Super Moderator Howtoforge Staff

    I guess the problem is that points to your router which then forwards the request to your Postfix server which cannot respond because you set inet_interfaces to .

    The solution is to change the A record for so that it points to another server which can handle those mails.
  3. themachine

    themachine New Member HowtoForge Supporter

    YTou may not actually want to change the DNS entry of the .

    Answer these first...

    Is this a NAT Firewall that is passing traffic to a NAT IP?

    Where is mail for the "" domain suppose to go? Is it suppose to go to the mail server which is behind the firewall?

    If this box is on the DMZ and it is a NAT'd network... and you're trying to send mail to "mail.mydomain..." then it is trying to go out, and come back in which isn't going to work. If it is a NAT'd network, I would just try adding "w.x.y.z" to your '/etc/hosts' file where 'w.x.y.z' is your NAT'd IP Address. You will also need to verify your '/etc/nsswitch.conf' file to ensure that the line exists "hosts: files dns" this will ensure that files [/etc/hosts] are queried before DNS and therefore would send the message to the NAT'd IP host and not out and then in.

    Does that make sense?

Share This Page