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

Mail Undeliverable error with Postfix

Expand Messages
  • jan gestre
    Hi guys, I have several mail servers running postfix 2.4/2.5 with postfixadmin and mysql as backend and dovecot for imap/pop3. I can access the inbox from
    Message 1 of 13 , Jan 31, 2009
    • 0 Attachment
      Hi guys,

      I have several mail servers running postfix 2.4/2.5 with postfixadmin and mysql as backend and dovecot for imap/pop3. I can access the inbox from outside the office using Outlook/Thunderbird but whenever I tried to send an outside email even to an internal user I always get a "Mail Undeliverable Error", but when webmail is used by the user there is no problem (to rule out dns misconfiguration). I'm already stumped for two days now and I can't figure it out. 

      Need help.

      Here's the output of my postconf -n :

      postconf -n
      alias_database = hash:/etc/postfix/aliases
      alias_maps = hash:/etc/postfix/aliases
      broken_sasl_auth_clients = yes
      command_directory = /usr/sbin
      config_directory = /etc/postfix
      daemon_directory = /usr/libexec/postfix
      debug_peer_level = 2
      header_checks = regexp:/etc/postfix/header_checks
      html_directory = /usr/share/doc/postfix-2.4.7-documentation/html
      inet_interfaces = all
      mail_owner = postfix
      mailq_path = /usr/bin/mailq.postfix
      manpage_directory = /usr/share/man
      maps_rbl_domains = bl.spamcop.net
      message_size_limit = 40960000
      mydestination = localhost
      mydomain = ddblocal.com
      myhostname = mail.ddblocal.com
      myorigin = $mydomain
      newaliases_path = /usr/bin/newaliases.postfix
      queue_directory = /var/spool/postfix
      readme_directory = /usr/share/doc/postfix-2.4.7-documentation/readme
      recipient_delimiter = +
      relay_domains = $mydestination
      sample_directory = /etc/postfix
      sendmail_path = /usr/sbin/sendmail.postfix
      setgid_group = postdrop
      smtpd_recipient_restrictions = permit_sasl_authenticated                              permit_mynetworks                        reject_unauth_destination              permit_tls_all_clientcerts                               reject_non_fqdn_hostname                        reject_non_fqdn_sender                          reject_non_fqdn_recipient                               reject_unauth_destination       reject_unauth_pipelining                        reject_invalid_hostname        reject_unknown_sender_domain                             reject_rbl_client sbl-xbl.spamhaus.org                          reject_rbl_client zen.spamhaus.org                              reject_rhsbl_sender dsn.rfc-ignorant.org               reject_rbl_client bl.spamcop.net                         permit
      smtpd_sasl_auth_enable = yes
      smtpd_sasl_exceptions_networks = $mynetworks
      smtpd_sasl_path = /var/run/dovecot/auth-client
      smtpd_sasl_security_options = noanonymous
      smtpd_sasl_type = dovecot
      smtpd_tls_cert_file = /etc/postfix/ssl/mail-cert.pem
      smtpd_tls_key_file = /etc/postfix/ssl/mail-key.pem
      smtpd_tls_loglevel = 1
      smtpd_tls_received_header = yes
      smtpd_tls_security_level = may
      smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_session_cache
      smtpd_tls_session_cache_timeout = 3600s
      tls_random_source = dev:/dev/urandom
      transport_maps = hash:/etc/postfix/transport
      unknown_local_recipient_reject_code = 550
      virtual_alias_maps = proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf
      virtual_gid_maps = static:12
      virtual_mailbox_base = /home/virtualmail
      virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf
      virtual_mailbox_maps = proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf
      virtual_minimum_uid = 150
      virtual_transport = dovecot
      virtual_uid_maps = static:150


      TIA.

      Jan
    • mouss
      ... show relevant logs. we need to make sure that the transaction is rejected by postfix and why. This information is in your logs.
      Message 2 of 13 , Feb 1, 2009
      • 0 Attachment
        jan gestre a écrit :
        > Hi guys,
        >
        > I have several mail servers running postfix 2.4/2.5 with postfixadmin
        > and mysql as backend and dovecot for imap/pop3. I can access the inbox
        > from outside the office using Outlook/Thunderbird but whenever I tried
        > to send an outside email even to an internal user I always get a "Mail
        > Undeliverable Error", but when webmail is used by the user there is no
        > problem (to rule out dns misconfiguration). I'm already stumped for two
        > days now and I can't figure it out.
        >
        > Need help.
        >
        > Here's the output of my postconf -n :

        show relevant logs. we need to make sure that the transaction is
        rejected by postfix and why. This information is in your logs.

        > [snip]
      • jan gestre
        Hi Mouss, This is from my inbox, user jan.gestre@ddblocal.com is a real user. This is the mail system at host mail.ddblocal.com. I m sorry to have to inform
        Message 3 of 13 , Feb 1, 2009
        • 0 Attachment
          Hi Mouss,

          This is from my inbox, user jan.gestre@... is a real user.

          This is the mail system at host mail.ddblocal.com.I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.For further assistance, please send mail to postmaster.If you do so, please include this problem report. You can delete your own text from the attached returned message.The mail system<postmaster@...>: user unknown
          Reporting-MTA: dns; mail.ddblocal.com X-Postfix-Queue-ID: 39423148059 X-Postfix-Sender: rfc822; jan.gestre@... Arrival-Date: Sun, 1 Feb 2009 15:13:14 +0800 (PHT)Final-Recipient: rfc822; postmaster@... Action: failed Status: 5.1.1 Diagnostic-Code: x-unix; user unknown
          test-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

          On Sun, Feb 1, 2009 at 5:48 PM, mouss <mouss@...> wrote:
          jan gestre a écrit :
          > Hi guys,
          >
          > I have several mail servers running postfix 2.4/2.5 with postfixadmin
          > and mysql as backend and dovecot for imap/pop3. I can access the inbox
          > from outside the office using Outlook/Thunderbird but whenever I tried
          > to send an outside email even to an internal user I always get a "Mail
          > Undeliverable Error", but when webmail is used by the user there is no
          > problem (to rule out dns misconfiguration). I'm already stumped for two
          > days now and I can't figure it out.
          >
          > Need help.
          >
          > Here's the output of my postconf -n :

          show relevant logs. we need to make sure that the transaction is
          rejected by postfix and why. This information is in your logs.

          > [snip]

        • mouss
          ... you need to check the postfix logs (/var/log/maillog or /var/log/mail.log or the like), not bounce messages. for obvious reasons, postfix won t tell
          Message 4 of 13 , Feb 1, 2009
          • 0 Attachment
            jan gestre a écrit :
            > Hi Mouss,
            >
            > This is from my inbox, user jan.gestre@...
            > <mailto:jan.gestre@...> is a real user.
            >

            you need to check the postfix logs (/var/log/maillog or
            /var/log/mail.log or the like), not bounce messages.

            for obvious reasons, postfix won't tell everything to an smtp client, so
            you won't know what is really happening by looking at a bounce message.

            but from the bounce message, I see that <postmaster@...> is
            "unknown". This is bad. if this is one of your domains, make sure mail
            for postmaster is accepted and delivered. In general, people create an
            alias for this address (alias_maps if domain is in mydestination,
            virtual_alias_maps if domain is virtual).
          • jan gestre
            Hi Mouss, I ve just replicated the issue right now, from /var/log/maillog: Feb 1 21:26:38 mail postfix/cleanup[19777]: 55E6C148049: hold: header Received:
            Message 5 of 13 , Feb 1, 2009
            • 0 Attachment
              Hi Mouss,

              I've just replicated the issue right now, from /var/log/maillog:

              Feb  1 21:26:38 mail postfix/cleanup[19777]: 55E6C148049: hold: header Received: from [127.0.0.1] (unknown [122.53.207.8])??by mail.ddblocal.com (Postfix) with ESMTP id 55E6C148049??for <ragestre@...>; Sun,  1 Feb 2009 21:26:37 +0800 (PHT) from unknown[122.53.207.8]; from=<jan.gestre@...> to=<ragestre@...> proto=ESMTP helo=<[127.0.0.1]>
              Feb  1 21:26:38 mail postfix/cleanup[19777]: 55E6C148049: message-id=<4985A3E0.7000802@...>
              Feb  1 21:26:38 mail postfix/smtpd[19520]: disconnect from unknown[122.53.207.8]
              Feb  1 21:26:38 mail dovecot: imap-login: Login: user=<jan.gestre@...>, method=plain, rip=::ffff:122.53.207.8, lip=::ffff:192.168.1.3

              Feb  1 21:26:42 mail MailScanner[17048]: Uninfected: Delivered 1 messages
              Feb  1 21:26:42 mail MailScanner[17048]: MailScanner child dying of old age
              Feb  1 21:26:42 mail postfix/pipe[19788]: D9A6D148050: to=<postmaster@...>, relay=dovecot, delay=5.6, delays=5.6/0.01/0/0.03, dsn=5.1.1, status=bounced (user unknown)


              postmaster@... exists and has an alias jan.gestre@..., all emails for the postmaster gets forwarded to this account. This doesn't happen when I used a webmail client.

              On Sun, Feb 1, 2009 at 9:10 PM, mouss <mouss@...> wrote:
              jan gestre a écrit :
              > Hi Mouss,
              >
              > This is from my inbox, user jan.gestre@...
              > <mailto:jan.gestre@...> is a real user.
              >

              you need to check the postfix logs (/var/log/maillog or
              /var/log/mail.log or the like), not bounce messages.

              for obvious reasons, postfix won't tell everything to an smtp client, so
              you won't know what is really happening by looking at a bounce message.

              but from the bounce message, I see that <postmaster@...> is
              "unknown". This is bad. if this is one of your domains, make sure mail
              for postmaster is accepted and delivered. In general, people create an
              alias for this address (alias_maps if domain is in mydestination,
              virtual_alias_maps if domain is virtual).

            • Daniel V. Reinhardt
              Hi Mouss, I ve just replicated the issue right now, from /var/log/maillog: Feb 1 21:26:38 mail postfix/cleanup[19777]: 55E6C148049: hold: header Received:
              Message 6 of 13 , Feb 1, 2009
              • 0 Attachment
                Hi Mouss,

                I've just replicated the issue right now, from /var/log/maillog:

                Feb  1 21:26:38 mail postfix/cleanup[19777]: 55E6C148049: hold: header Received: from [127.0.0.1] (unknown [122.53.207.8])??by mail.ddblocal.com (Postfix) with ESMTP id 55E6C148049??for <ragestre@...>; Sun,  1 Feb 2009 21:26:37 +0800 (PHT) from unknown[122.53.207.8]; from=<jan.gestre@...> to=<ragestre@...> proto=ESMTP helo=<[127.0.0.1]>
                Feb  1 21:26:38 mail postfix/cleanup[19777]: 55E6C148049: message-id=<4985A3E0.7000802@...>
                Feb  1 21:26:38 mail postfix/smtpd[19520]: disconnect from unknown[122.53.207.8]
                Feb  1 21:26:38 mail dovecot: imap-login: Login: user=<jan.gestre@...>, method=plain, rip=::ffff:122.53.207.8, lip=::ffff:192.168.1.3

                Feb  1 21:26:42 mail MailScanner[17048]: Uninfected: Delivered 1 messages
                Feb  1 21:26:42 mail MailScanner[17048]: MailScanner child dying of old age
                Feb  1 21:26:42 mail postfix/pipe[19788]: D9A6D148050: to=<postmaster@...>, relay=dovecot, delay=5.6, delays=5.6/0.01/0/0.03, dsn=5.1.1, status=bounced (user unknown)


                postmaster@... exists and has an alias jan.gestre@..., all emails for the postmaster gets forwarded to this account. This doesn't happen when I used a webmail client.

                On Sun, Feb 1, 2009 at 9:10 PM, mouss <mouss@...> wrote:
                jan gestre a écrit :
                > Hi Mouss,
                >
                > This is from my inbox, user jan.gestre@...
                > <mailto:jan.gestre@...> is a real user.
                >

                you need to check the postfix logs (/var/log/maillog or
                /var/log/mail.log or the like), not bounce messages.

                for obvious reasons, postfix won't tell everything to an smtp client, so
                you won't know what is really happening by looking at a bounce message.

                but from the bounce message, I see that <postmaster@...> is
                "unknown". This is bad. if this is one of your domains, make sure mail
                for postmaster is accepted and delivered. In general, people create an
                alias for this address (alias_maps if domain is in mydestination,
                virtual_alias_maps if domain is virtual).

                I have sent you an email to postmaster@... and it was successful:

                2009-02-01 07:51:28 1LTcjQ-0003gJ-Jt => cryptodan <cryptodan@...> F=<> R=localuser T=local_delivery S=3121

                2009-02-01 07:53:08 1LTcl2-0003hp-Cu <= cryptodan@... H=static-71-178-174-180.washdc.fios.verizon.net (alphacentari) [71.178.174.180] P=esmtpa A=login:cryptodan S=2126 id=8A130529BA7D4BF399B598EE69C586CE@alphacentari T="Testing" from <cryptodan@...> for postmaster@...

                2009-02-01 07:53:10 1LTcl2-0003hp-Cu => postmaster@... F=<cryptodan@...> R=lookuphost T=remote_smtp S=2187 H=mail.ddbphil.com [122.55.93.36] C="250 2.0.0 Ok: queued as 966C2148049"




              • jan gestre
                Hi Daniel, Just like I said, postmaster account exists, I don t know why this is happening. ... Hi Daniel, Just like I said, postmaster account exists, I don t
                Message 7 of 13 , Feb 1, 2009
                • 0 Attachment
                  Hi Daniel,

                  Just like I said, postmaster account exists, I don't know why this is happening.

                  On Sun, Feb 1, 2009 at 10:04 PM, Daniel V. Reinhardt <cryptodan@...> wrote:
                  Hi Mouss,

                  I've just replicated the issue right now, from /var/log/maillog:

                  Feb  1 21:26:38 mail postfix/cleanup[19777]: 55E6C148049: hold: header Received: from [127.0.0.1] (unknown [122.53.207.8])??by mail.ddblocal.com (Postfix) with ESMTP id 55E6C148049??for <ragestre@...>; Sun,  1 Feb 2009 21:26:37 +0800 (PHT) from unknown[122.53.207.8]; from=<jan.gestre@...> to=<ragestre@...> proto=ESMTP helo=<[127.0.0.1]>
                  Feb  1 21:26:38 mail postfix/cleanup[19777]: 55E6C148049: message-id=<4985A3E0.7000802@...>
                  Feb  1 21:26:38 mail postfix/smtpd[19520]: disconnect from unknown[122.53.207.8]
                  Feb  1 21:26:38 mail dovecot: imap-login: Login: user=<jan.gestre@...>, method=plain, rip=::ffff:122.53.207.8, lip=::ffff:192.168.1.3

                  Feb  1 21:26:42 mail MailScanner[17048]: Uninfected: Delivered 1 messages
                  Feb  1 21:26:42 mail MailScanner[17048]: MailScanner child dying of old age
                  Feb  1 21:26:42 mail postfix/pipe[19788]: D9A6D148050: to=<postmaster@...>, relay=dovecot, delay=5.6, delays=5.6/0.01/0/0.03, dsn=5.1.1, status=bounced (user unknown)


                  postmaster@... exists and has an alias jan.gestre@..., all emails for the postmaster gets forwarded to this account. This doesn't happen when I used a webmail client.

                  On Sun, Feb 1, 2009 at 9:10 PM, mouss <mouss@...> wrote:
                  jan gestre a écrit :
                  > Hi Mouss,
                  >
                  > This is from my inbox, user jan.gestre@...
                  > <mailto:jan.gestre@...> is a real user.
                  >

                  you need to check the postfix logs (/var/log/maillog or
                  /var/log/mail.log or the like), not bounce messages.

                  for obvious reasons, postfix won't tell everything to an smtp client, so
                  you won't know what is really happening by looking at a bounce message.

                  but from the bounce message, I see that <postmaster@...> is
                  "unknown". This is bad. if this is one of your domains, make sure mail
                  for postmaster is accepted and delivered. In general, people create an
                  alias for this address (alias_maps if domain is in mydestination,
                  virtual_alias_maps if domain is virtual).

                  I have sent you an email to postmaster@... and it was successful:

                  2009-02-01 07:51:28 1LTcjQ-0003gJ-Jt => cryptodan <cryptodan@...> F=<> R=localuser T=local_delivery S=3121

                  2009-02-01 07:53:08 1LTcl2-0003hp-Cu <= cryptodan@... H=static-71-178-174-180.washdc.fios.verizon.net (alphacentari) [71.178.174.180] P=esmtpa A=login:cryptodan S=2126 id=8A130529BA7D4BF399B598EE69C586CE@alphacentari T="Testing" from <cryptodan@...> for postmaster@...

                  2009-02-01 07:53:10 1LTcl2-0003hp-Cu => postmaster@... F=<cryptodan@...> R=lookuphost T=remote_smtp S=2187 H=mail.ddbphil.com [122.55.93.36] C="250 2.0.0 Ok: queued as 966C2148049"





                • mouss
                  ... I guess the alias is defined in alias_maps, but this map is only consulted by local , which you don t use (you deliver via dovecot, not via local). use
                  Message 8 of 13 , Feb 1, 2009
                  • 0 Attachment
                    jan gestre a écrit :
                    > Hi Mouss,
                    >
                    > I've just replicated the issue right now, from /var/log/maillog:
                    >
                    > Feb 1 21:26:38 mail postfix/cleanup[19777]: 55E6C148049: hold: header
                    > Received: from [127.0.0.1] (unknown [122.53.207.8])??by
                    > mail.ddblocal.com <http://mail.ddblocal.com> (Postfix) with ESMTP id
                    > 55E6C148049??for <ragestre@... <mailto:ragestre@...>>;
                    > Sun, 1 Feb 2009 21:26:37 +0800 (PHT) from unknown[122.53.207.8];
                    > from=<jan.gestre@... <mailto:jan.gestre@...>>
                    > to=<ragestre@... <mailto:ragestre@...>> proto=ESMTP
                    > helo=<[127.0.0.1]>
                    > Feb 1 21:26:38 mail postfix/cleanup[19777]: 55E6C148049:
                    > message-id=<4985A3E0.7000802@...
                    > <mailto:4985A3E0.7000802@...>>
                    > Feb 1 21:26:38 mail postfix/smtpd[19520]: disconnect from
                    > unknown[122.53.207.8]
                    > Feb 1 21:26:38 mail dovecot: imap-login: Login:
                    > user=<jan.gestre@... <mailto:jan.gestre@...>>, method=plain,
                    > rip=::ffff:122.53.207.8, lip=::ffff:192.168.1.3
                    >
                    > Feb 1 21:26:42 mail MailScanner[17048]: Uninfected: Delivered 1 messages
                    > Feb 1 21:26:42 mail MailScanner[17048]: MailScanner child dying of old age
                    > Feb 1 21:26:42 mail postfix/pipe[19788]: D9A6D148050:
                    > to=<postmaster@... <mailto:postmaster@...>>,
                    > relay=dovecot, delay=5.6, delays=5.6/0.01/0/0.03, dsn=5.1.1,
                    > status=bounced (user unknown)
                    >
                    >
                    > postmaster@... <mailto:postmaster@...> exists and has an
                    > alias jan.gestre@... <mailto:jan.gestre@...>, all emails
                    > for the postmaster gets forwarded to this account. This doesn't happen
                    > when I used a webmail client.
                    >


                    I guess the alias is defined in alias_maps, but this map is only
                    consulted by "local", which you don't use (you deliver via dovecot, not
                    via local).

                    use virtual_alias_maps instead.
                  • Benny Pedersen
                    ... this is a bounce from dovecot not from postfix, postmaster exists in postfix, but dovecot dont know that user -- http://localhost/ 100% uptime and 100%
                    Message 9 of 13 , Feb 1, 2009
                    • 0 Attachment
                      On Sun, February 1, 2009 14:41, jan gestre wrote:

                      > Feb 1 21:26:42 mail postfix/pipe[19788]: D9A6D148050: to=<
                      > postmaster@...>, relay=dovecot, delay=5.6,
                      > delays=5.6/0.01/0/0.03,
                      > dsn=5.1.1, status=bounced (user unknown)

                      this is a bounce from dovecot not from postfix, postmaster exists in
                      postfix, but dovecot dont know that user


                      --
                      http://localhost/ 100% uptime and 100% mirrored :)
                    • Benny Pedersen
                      ... postfixadmin handle this when configured to do so :) for the OP to solve it, dovecot lda must only see the mailbox from mysql not any alias, and
                      Message 10 of 13 , Feb 1, 2009
                      • 0 Attachment
                        On Sun, February 1, 2009 16:17, mouss wrote:

                        > I guess the alias is defined in alias_maps, but this map is only
                        > consulted by "local", which you don't use (you deliver via dovecot,
                        > not via local).
                        >
                        > use virtual_alias_maps instead.

                        postfixadmin handle this when configured to do so :)

                        for the OP to solve it, dovecot lda must only see the mailbox from
                        mysql not any alias, and postfixadmin must have all destinations to
                        mailbox not local: aliases


                        --
                        http://localhost/ 100% uptime and 100% mirrored :)
                      • jan gestre
                        ... Forgive my ignorance but how will I do that? Thanks
                        Message 11 of 13 , Feb 2, 2009
                        • 0 Attachment
                          On Mon, Feb 2, 2009 at 5:21 AM, Benny Pedersen <me@...> wrote:
                          >
                          > On Sun, February 1, 2009 16:17, mouss wrote:
                          >
                          >> I guess the alias is defined in alias_maps, but this map is only
                          >> consulted by "local", which you don't use (you deliver via dovecot,
                          >> not via local).
                          >>
                          >> use virtual_alias_maps instead.
                          >
                          > postfixadmin handle this when configured to do so :)
                          >
                          > for the OP to solve it, dovecot lda must only see the mailbox from
                          > mysql not any alias, and postfixadmin must have all destinations to
                          > mailbox not local: aliases
                          >
                          >
                          > --
                          > http://localhost/ 100% uptime and 100% mirrored :)
                          >
                          >

                          Forgive my ignorance but how will I do that? Thanks
                        • jan gestre
                          ... Can anyone tell me how to configure postfix to use mysql for smtp auth? My version of postfix was rebuilt with mysql support because the default postfix
                          Message 12 of 13 , Feb 2, 2009
                          • 0 Attachment
                            On Mon, Feb 2, 2009 at 9:28 PM, jan gestre <ipcopper.ph@...> wrote:
                            > On Mon, Feb 2, 2009 at 5:21 AM, Benny Pedersen <me@...> wrote:
                            >>
                            >> On Sun, February 1, 2009 16:17, mouss wrote:
                            >>
                            >>> I guess the alias is defined in alias_maps, but this map is only
                            >>> consulted by "local", which you don't use (you deliver via dovecot,
                            >>> not via local).
                            >>>
                            >>> use virtual_alias_maps instead.
                            >>
                            >> postfixadmin handle this when configured to do so :)
                            >>
                            >> for the OP to solve it, dovecot lda must only see the mailbox from
                            >> mysql not any alias, and postfixadmin must have all destinations to
                            >> mailbox not local: aliases
                            >>
                            >>
                            >> --
                            >> http://localhost/ 100% uptime and 100% mirrored :)
                            >>
                            >>
                            >
                            > Forgive my ignorance but how will I do that? Thanks
                            >

                            Can anyone tell me how to configure postfix to use mysql for smtp
                            auth? My version of postfix was rebuilt with mysql support because the
                            default postfix for CentOS does not come with mysql support by
                            default.

                            TIA
                          • Brian Evans - Postfix List
                            ... Postfix does not query databases directly for SASL. It is up to the SASL library (either cyrus or dovecot) to have that support. Brian
                            Message 13 of 13 , Feb 2, 2009
                            • 0 Attachment
                              jan gestre wrote:
                              > Can anyone tell me how to configure postfix to use mysql for smtp
                              > auth? My version of postfix was rebuilt with mysql support because the
                              > default postfix for CentOS does not come with mysql support by
                              > default.
                              >

                              Postfix does not query databases directly for SASL.
                              It is up to the SASL library (either cyrus or dovecot) to have that support.

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