Loading ...
Sorry, an error occurred while loading the content.

RE: Cannot get local mail delivered locally

Expand Messages
  • Frank Millman
    ... Before (not working) ... alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix
    Message 1 of 5 , Dec 31, 2008
    • 0 Attachment
      Darren Pilgrim wrote:
      >
      > Frank Millman wrote:
      > > Assume our domain name is example.com, and our email addresses are
      > > fred@..., bert@..., etc.
      > >
      > > In main.cf, I had the following -
      > >
      > > myhostname = fcserver.example.com
      > > mydomain = example.com
      > > myorigin = $mydomain
      > >
      > > I have now changed it to -
      > >
      > > myhostname = example.com
      > > mydomain = com
      > > myorigin = $mydomain
      > >
      > > It now works, but I don't know why. I thought my domain name was
      > > example.com, and each machine on the network should have a
      > host name
      > > of {host}.example.com.
      > >
      > > Please can someone explain where I went wrong.
      >
      > Please post the output of postconf -n of the working config
      > and non-working config. The above really isn't enough to
      > figure out what your problem is/was.

      Before (not working)
      --------------------
      alias_database = hash:/etc/aliases
      alias_maps = hash:/etc/aliases
      command_directory = /usr/sbin
      config_directory = /etc/postfix
      daemon_directory = /usr/libexec/postfix
      data_directory = /var/lib/postfix
      debug_peer_level = 2
      html_directory = no
      inet_interfaces = all
      inet_protocols = all
      mail_owner = postfix
      mailq_path = /usr/bin/mailq.postfix
      manpage_directory = /usr/share/man
      mydestination = $myhostname, localhost.$mydomain, localhost
      mydomain = example.com
      myhostname = fcserver.example.com
      mynetworks_style = subnet
      myorigin = $mydomain
      newaliases_path = /usr/bin/newaliases.postfix
      queue_directory = /var/spool/postfix
      readme_directory = /usr/share/doc/postfix-2.5.5/README_FILES
      relayhost = smtp.tiscali.co.za
      sample_directory = /usr/share/doc/postfix-2.5.5/samples
      sendmail_path = /usr/sbin/sendmail.postfix
      setgid_group = postdrop
      unknown_local_recipient_reject_code = 550

      After (working)
      ---------------
      alias_database = hash:/etc/aliases
      alias_maps = hash:/etc/aliases
      command_directory = /usr/sbin
      config_directory = /etc/postfix
      daemon_directory = /usr/libexec/postfix
      data_directory = /var/lib/postfix
      debug_peer_level = 2
      html_directory = no
      inet_interfaces = all
      inet_protocols = all
      mail_owner = postfix
      mailq_path = /usr/bin/mailq.postfix
      manpage_directory = /usr/share/man
      mydestination = $myhostname, localhost.$mydomain, localhost
      mydomain = com
      myhostname = example.com
      mynetworks_style = subnet
      myorigin = $mydomain
      newaliases_path = /usr/bin/newaliases.postfix
      queue_directory = /var/spool/postfix
      readme_directory = /usr/share/doc/postfix-2.5.5/README_FILES
      relayhost = smtp.tiscali.co.za
      sample_directory = /usr/share/doc/postfix-2.5.5/samples
      sendmail_path = /usr/sbin/sendmail.postfix
      setgid_group = postdrop
      unknown_local_recipient_reject_code = 550

      Thanks

      Frank
    • Darren Pilgrim
      ... example.com is not in $mydestination, so Postfix relays all example.com mail to $relayhost. ... You changed $myhostname to example.com, which put
      Message 2 of 5 , Dec 31, 2008
      • 0 Attachment
        Frank Millman wrote:
        > Before (not working)
        > --------------------
        > mydestination = $myhostname, localhost.$mydomain, localhost
        > mydomain = example.com
        > myhostname = fcserver.example.com
        > myorigin = $mydomain

        example.com is not in $mydestination, so Postfix relays all example.com
        mail to $relayhost.

        > After (working)
        > ---------------
        > mydestination = $myhostname, localhost.$mydomain, localhost
        > mydomain = com
        > myhostname = example.com
        > myorigin = $mydomain

        You changed $myhostname to example.com, which put example.com in
        $mydestination, so Postfix now delivers example.com mail to your
        mailboxes. Of course, you now have an incorrect $mydomain and $myhostname.

        The following should work:

        mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
        mydomain = example.com
        myhostname = fcserver.example.com
        myorigin = $mydomain
      • Frank Millman
        ... Thanks very much, Darren. It works, and now I understand what is going on. Much appreciated. Frank
        Message 3 of 5 , Dec 31, 2008
        • 0 Attachment
          Darren Pilgrim wrote:
          >
          > Frank Millman wrote:
          > > Before (not working)
          > > --------------------
          > > mydestination = $myhostname, localhost.$mydomain, localhost
          > mydomain =
          > > example.com myhostname = fcserver.example.com myorigin = $mydomain
          >
          > example.com is not in $mydestination, so Postfix relays all
          > example.com mail to $relayhost.
          >
          > > After (working)
          > > ---------------
          > > mydestination = $myhostname, localhost.$mydomain, localhost
          > mydomain =
          > > com myhostname = example.com myorigin = $mydomain
          >
          > You changed $myhostname to example.com, which put example.com
          > in $mydestination, so Postfix now delivers example.com mail
          > to your mailboxes. Of course, you now have an incorrect
          > $mydomain and $myhostname.
          >
          > The following should work:
          >
          > mydestination = $myhostname, localhost.$mydomain, localhost,
          > $mydomain mydomain = example.com myhostname =
          > fcserver.example.com myorigin = $mydomain

          Thanks very much, Darren.

          It works, and now I understand what is going on.

          Much appreciated.

          Frank
        Your message has been successfully submitted and would be delivered to recipients shortly.