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

Unknown Mail Transport Error

Expand Messages
  • Charles Gregory
    Greetings! Got a weird one for ya. Messages are sticking in the queue, I think because of something timing out in procmail, but only for a few users.
    Message 1 of 11 , Nov 1, 2006
      Greetings!

      Got a weird one for ya. Messages are 'sticking' in the queue, I think
      because of something 'timing out' in procmail, but only for a few users.

      Background: To enable spamassassin for some users on an old box with
      sendmail (too much trouble to setup spamassassin), I set their .forward
      files to send the mail to 'host6' which has postfix and spamassassin,
      which then delivers the mail back into their NFS mounted mailboxes on
      'host4'. Works most of the time..... and is *still working for most users.

      Messages that are 'stuck' in the queue show behaviour like this:

      Oct 28 21:57:47 host6 postfix/smtpd[21148]: 66BF2B68FF:
      client=host4.hwcn.org[199.212.94.75]
      Oct 28 21:57:47 host6 postfix/cleanup[21149]: 66BF2B68FF:
      message-id=<28299671210818.DCDBD1BD92@796EKO>
      Oct 28 21:57:47 host6 postfix/nqmgr[20762]: 66BF2B68FF:
      from=<chlorinebimetallism@...>, size=1248, nrcpt=2 (queue
      active)

      ....Yes, I know this is probably spam. It's just an example.

      Oct 28 21:57:56 host6 postfix/local[21150]: 66BF2B68FF:
      to=<user04@...>, relay=local, delay=9, status=sent
      ("|/usr/bin/procmail -a "$EXTENSION"")

      ....delivered successfully to user04. So I would presume that the message
      format is not 'messing up' spamassassin or postfix.
      But this message should also have been delivered to user05, but instead
      I see postfix repeatedly 'trying' delivery.....

      Oct 29 00:56:13 host6 postfix/nqmgr[21689]: 66BF2B68FF:
      from=<chlorinebimetallism@...>, size=1248, nrcpt=2 (queue active)
      Oct 29 04:58:22 host6 postfix/nqmgr[30346]: 66BF2B68FF:
      from=<chlorinebimetallism@...>, size=1248, nrcpt=2 (queue active)
      <snip>
      Oct 30 01:06:12 host6 postfix/nqmgr[1147]: fatal: 66BF2B68FF: timeout
      receiving delivery status from transport: local
      <snip>
      Oct 30 01:08:16 host6 postfix/nqmgr[2010]: 66BF2B68FF:
      from=<chlorinebimetallism@...>, size=1248, nrcpt=2 (queue active)
      Oct 30 06:11:13 host6 postfix/nqmgr[3342]: 66BF2B68FF:
      from=<chlorinebimetallism@...>, size=1248, nrcpt=2 (queue active)
      <snip>
      Oct 30 21:12:17 host6 postfix/nqmgr[6683]: fatal: 66BF2B68FF: timeout
      receivingdelivery status from transport: local
      <snip>
      Oct 30 21:16:04 host6 postfix/nqmgr[8408]: 66BF2B68FF:
      from=<chlorinebimetallism@...>, size=1248, nrcpt=2 (queue active)
      <snip>
      Oct 31 22:21:09 host6 postfix/nqmgr[15884]: 66BF2B68FF:
      to=<user05@...>, relay=none, delay=264202,
      status=deferred (unknown mail transport error)
      <snip>
      Oct 31 23:33:01 host6 postfix/nqmgr[17425]: 66BF2B68FF:
      from=<chlorinebimetallism@...>, size=1248, nrcpt=2 (queue active)

      ... up to the current moment. The message is still undelivered.

      Currently all mail for user05 is following this pattern with one odd
      exception. Notice that this all starts Oct 28 21:57:47 ....
      BUT I have single successful delivery on Oct 29, after several retries.

      Oct 29 04:58:22 host6 postfix/nqmgr[30346]: 33CCDB68E6:
      from=<wwwrun@...-net.de>, size=4202, nrcpt=1 (queue active)
      Oct 29 10:01:13 host6 postfix/nqmgr[31494]: 33CCDB68E6:
      from=<wwwrun@...-net.de>, size=4202, nrcpt=1 (queue active)
      Oct 29 15:06:11 host6 postfix/nqmgr[32664]: 33CCDB68E6:
      from=<wwwrun@...-net.de>, size=4202, nrcpt=1 (queue active)
      Oct 29 20:06:12 host6 postfix/nqmgr[1147]: 33CCDB68E6:
      from=<wwwrun@...-net.de>, size=4202, nrcpt=1 (queue active)
      Oct 29 20:06:12 host6 postfix/local[1148]: 33CCDB68E6:
      to=<user05@...>, relay=local, delay=195037,
      status=sent ("|/usr/bin/procmail -a "$EXTENSION"")

      So it's not an absolute 'failing' of user05, but something that is tying
      up resources. But other users are still being delivered with no delay, so
      somehow the 'resource consumption' is only with user05. Now this pattern
      *has* briefly appeared for a couple of other users. So I would be inclined
      to blame some malformed piece of spam. I can trace this back to Oct 23
      (yeah, the user was slow to notice) where

      I also notice this in the logs around that time:
      Oct 23 04:09:21 host6 postfix/local[15119]: A02CEB688C:
      to=<hreads01@...>, relay=local, delay=110, status=sent
      ("|/usr/bin/procmail -a "$EXTENSION"")
      Oct 23 04:09:21 host6 postfix/local[15119]: warning: close file
      /hwcn/hosts/hamiltonreads.ca/./home/hreads01/.forward: No such file or
      directory

      Their .forward file is still there. Is this a failing of NFS?
      If any/all of this looks familiar to anyone, I'd appreciate some pointers.
      I continue to dig through logs.

      And yes, I've deliberately NOT provided my postconf, because I can't see
      how a setting like that would apply to only one user and not all.
      But if you really want to see it, I'll toss it in. Nothing exciting
      though....

      Thanks in advance!

      - Charles
    • Victor Duchovni
      ... User 05 .forward runs a command that never terminates, or some process is holding a lock on user 05 s mailbox, ... -- Viktor. Disclaimer: off-list
      Message 2 of 11 , Nov 1, 2006
        On Wed, Nov 01, 2006 at 11:53:20AM -0500, Charles Gregory wrote:

        > But this message should also have been delivered to user05, but instead
        > I see postfix repeatedly 'trying' delivery.....
        >
        > Oct 29 00:56:13 host6 postfix/nqmgr[21689]: 66BF2B68FF:
        > from=<chlorinebimetallism@...>, size=1248, nrcpt=2 (queue active)
        > Oct 29 04:58:22 host6 postfix/nqmgr[30346]: 66BF2B68FF:
        > from=<chlorinebimetallism@...>, size=1248, nrcpt=2 (queue active)
        > <snip>
        > Oct 30 01:06:12 host6 postfix/nqmgr[1147]: fatal: 66BF2B68FF: timeout
        > receiving delivery status from transport: local
        > <snip>

        User 05 .forward runs a command that never terminates, or some process
        is holding a lock on user 05's mailbox, ...

        --
        Viktor.

        Disclaimer: off-list followups get on-list replies or get ignored.
        Please do not ignore the "Reply-To" header.

        To unsubscribe from the postfix-users list, visit
        http://www.postfix.org/lists.html or click the link below:
        <mailto:majordomo@...?body=unsubscribe%20postfix-users>

        If my response solves your problem, the best way to thank me is to not
        send an "it worked, thanks" follow-up. If you must respond, please put
        "It worked, thanks" in the "Subject" so I can delete these quickly.
      • Charles Gregory
        ... .forward contains user05@host6.hwcn.org , which is how it is forwarded to host6 for spam checking. This is true of all users, and works fine. ... How
        Message 3 of 11 , Nov 1, 2006
          On Wed, 1 Nov 2006, Victor Duchovni wrote:
          > User 05 .forward runs a command that never terminates....

          .forward contains 'user05@...', which is how it is forwarded
          to host6 for spam checking. This is true of all users, and works fine.

          > .... or some process is holding a lock on user 05's mailbox, ...

          How could I find the mail lock and determine which process 'owns' it?
          I deleted a 'user05.lock' in the /var/spool/mail directory, and was even
          able to deliver a message directly via sendmail to the mailbox on host4.

          I manually cleared some spam from the host6 queue and I noticed several
          pieces of the 'stuck' mail went through, then it 'hung' again. So I've
          just deleted some more and flushed the queue. Somehow, it is content
          dependent. And still stuck. All the remaining messages inthe queue look
          legit. So I'm not sure where to go now. Need to find that lock....

          - Charles
        • Wietse Venema
          ... Find out what system call the process is blocking on. See DEBUG_README for tips to - make local(8) log more of its activity - make a system call trace that
          Message 4 of 11 , Nov 1, 2006
            Charles Gregory:
            > I manually cleared some spam from the host6 queue and I noticed several
            > pieces of the 'stuck' mail went through, then it 'hung' again. So I've
            > just deleted some more and flushed the queue. Somehow, it is content
            > dependent. And still stuck. All the remaining messages inthe queue look
            > legit. So I'm not sure where to go now. Need to find that lock....

            Find out what system call the process is blocking on.

            See DEBUG_README for tips to

            - make local(8) log more of its activity

            - make a system call trace that will show where it blocks

            - make a library call trace that will show where it blocks

            Wietse
          • Charles Gregory
            ... I did this a second time, and requeued everything and restarted postfix (again) and finally the queue cleared. So it was definitely something IN one of
            Message 5 of 11 , Nov 1, 2006
              On Wed, 1 Nov 2006, Wietse Venema wrote:
              > > I manually cleared some spam from the host6 queue and I noticed several
              > > pieces of the 'stuck' mail went through, then it 'hung' again.

              I did this a second time, and requeued everything and restarted
              postfix (again) and finally the queue cleared. So it was definitely
              something IN one of those messages choking procmail or spamassassin.
              Possibly a malformed attachment. I've had issues with those in the last
              week.... :(

              Just hope this doesn't happen again....

              - Charles
            • Robert Adkins
              I used the example (see below) from the Restriction_Class_Readme from the postfix.org website: /etc/postfix/ main.cf : smtpd_recipient_restrictions =
              Message 6 of 11 , Nov 1, 2006
                I used the example (see below) from the Restriction_Class_Readme from the postfix.org website:
                
                /etc/postfix/main.cf:
                    smtpd_recipient_restrictions =
                        check_sender_access hash:/etc/postfix/restricted_senders
                        ...other stuff...
                
                    smtpd_restriction_classes = local_only
                    local_only = 
                        check_recipient_access hash:/etc/postfix/local_domains, reject
                
                /etc/postfix/restricted_senders:
                    foo@domain      local_only
                    bar@domain      local_only
                
                /etc/postfix/local_domains:
                    this.domain     OK      matches this.domain and subdomains
                    that.domain     OK      matches that.domain and subdomains
                
                --
                
                
                    After creating a test user account, adding that user to the restricted_senders and creating the local_domains file and then running portmap on both files to create the .db files. I restarted the postfix daemon and nothing changed.

                    The test user can still send and receive email from outside of the domain.

                    Am I missing something?

                    Thanks,
                    Robert Adkins
              • mouss
                ... 1- do not hijack threads by replying to an unrelated message. 2- follow the directions explained in the ML welcome message, and on
                Message 7 of 11 , Nov 1, 2006
                  Robert Adkins wrote:
                  > I used the example (see below) from the Restriction_Class_Readme from the postfix.org website:
                  >
                  > /etc/postfix/main.cf <http://www.postfix.org/postconf.5.html>:
                  > smtpd_recipient_restrictions <http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions> =
                  > check_sender_access <http://www.postfix.org/postconf.5.html#check_sender_access> hash:/etc/postfix/restricted_senders
                  > /...other stuff.../
                  >
                  > smtpd_restriction_classes <http://www.postfix.org/postconf.5.html#smtpd_restriction_classes> = local_only
                  > local_only =
                  > check_recipient_access <http://www.postfix.org/postconf.5.html#check_recipient_access> hash:/etc/postfix/local_domains, reject
                  >
                  > /etc/postfix/restricted_senders:
                  > foo@domain local_only
                  > bar@domain local_only
                  >
                  > /etc/postfix/local_domains:
                  > this.domain OK /matches this.domain and subdomains/
                  > that.domain OK /matches that.domain and subdomains
                  >
                  > --
                  >
                  > /
                  >
                  > After creating a test user account, adding that user to the
                  > restricted_senders and creating the local_domains file and then running portmap
                  > on both files to create the .db files. I restarted the postfix daemon and
                  > nothing changed.
                  >
                  > The test user can still send and receive email from outside of the domain.
                  >
                  > Am I missing something?
                  >
                  >

                  1- do not hijack threads by replying to an unrelated message.

                  2- follow the directions explained in the ML welcome message, and on
                  http://www.postfix.org/DEBUG_README.html#mail
                  In particular, send output of 'postconf -n'.

                  As you can see, copy-pasting from firefox to thunderbird is horrible.
                • Wietse Venema
                  ... That wansn t me. ... If you sent the SAME CONTENT again into the SAME FILTERS, and this time the mail went through, then the problem was not caused by the
                  Message 8 of 11 , Nov 1, 2006
                    Charles Gregory:
                    > On Wed, 1 Nov 2006, Wietse Venema wrote:
                    > > > I manually cleared some spam from the host6 queue and I noticed several
                    > > > pieces of the 'stuck' mail went through, then it 'hung' again.

                    That wansn't me.

                    > I did this a second time, and requeued everything and restarted
                    > postfix (again) and finally the queue cleared. So it was definitely
                    > something IN one of those messages choking procmail or spamassassin.
                    > Possibly a malformed attachment. I've had issues with those in the last
                    > week.... :(

                    If you sent the SAME CONTENT again into the SAME FILTERS, and this
                    time the mail went through, then the problem was not caused by the
                    content.

                    Wietse
                  • Magnus Bäck
                    On Wednesday, November 01, 2006 at 23:18 CET, ... And finally, do not post HTML-only messages. -- Magnus Bäck magnus@dsek.lth.se
                    Message 9 of 11 , Nov 1, 2006
                      On Wednesday, November 01, 2006 at 23:18 CET,
                      mouss <usebsd@...> wrote:

                      > 1- do not hijack threads by replying to an unrelated message.
                      >
                      > 2- follow the directions explained in the ML welcome message, and on
                      > http://www.postfix.org/DEBUG_README.html#mail
                      > In particular, send output of 'postconf -n'.
                      >
                      > As you can see, copy-pasting from firefox to thunderbird is horrible.

                      And finally, do not post HTML-only messages.

                      --
                      Magnus Bäck
                      magnus@...
                    • Robert Adkins
                      1. I have set my email client to only send plaint-text emails to postfix.org. I do attempt to remember to add mailing lists to that filter, unfortunately
                      Message 10 of 11 , Nov 1, 2006
                        1. I have set my email client to only send plaint-text emails to
                        postfix.org. I do attempt to remember to add mailing lists to that
                        filter, unfortunately being human, I sometimes forget to do so. I
                        apologize for the error on my part.

                        I used the example (see below) from the Restriction_Class_Readme from
                        the postfix.org website:

                        /etc/postfix/main.cf:
                        smtpd_recipient_restrictions =
                        check_sender_access hash:/etc/postfix/restricted_senders
                        ...other stuff...

                        smtpd_restriction_classes = local_only
                        local_only =
                        check_recipient_access hash:/etc/postfix/local_domains, reject

                        /etc/postfix/restricted_senders:
                        foo@domain local_only
                        bar@domain local_only

                        /etc/postfix/local_domains:
                        this.domain OK matches this.domain and subdomains
                        that.domain OK matches that.domain and subdomains

                        After creating a test user account, adding that user to the
                        restricted_senders and creating the local_domains file and then running
                        portmap on both files to create the .db files. I restarted the postfix
                        daemon and nothing changed.

                        The test user can still send and receive email from outside of the
                        domain.

                        From 'postconf -n' :

                        alias_maps = hash:/etc/aliases
                        biff = no
                        canonical_maps = hash:/etc/postfix/canonical
                        command_directory = /usr/sbin
                        config_directory = /etc/postfix
                        daemon_directory = /usr/lib/postfix
                        debug_peer_level = 2
                        defer_transports =
                        disable_dns_lookups = no
                        home_mailbox = Maildir/
                        html_directory = /usr/share/doc/packages/postfix/html
                        mailbox_size_limit = 0
                        mailq_path = /usr/bin/mailq
                        manpage_directory = /usr/share/man
                        masquerade_classes = envelope_sender, header_sender, header_recipient
                        masquerade_domains =
                        masquerade_exceptions = root
                        message_size_limit = 30720000
                        mydestination = $myhostname, localhost.$mydomain, impelind.com
                        myhostname = impelind.com
                        myorigin = impelind.com
                        newaliases_path = /usr/bin/newaliases
                        readme_directory = /usr/share/doc/packages/postfix/README_FILES
                        recipient_bcc_maps = hash:/etc/postfix/duper_bcc
                        relocated_maps = hash:/etc/postfix/relocated
                        sample_directory = /usr/share/doc/packages/postfix/samples
                        sender_bcc_maps = hash:/etc/postfix/duper_bcc
                        sender_canonical_maps = hash:/etc/postfix/sender_canonical
                        sendmail_path = /usr/sbin/sendmail
                        setgid_group = maildrop
                        smtp_sasl_auth_enable = no
                        smtp_use_tls = no
                        smtpd_client_restrictions =
                        smtpd_helo_required = no
                        smtpd_helo_restrictions =
                        smtpd_recipient_restrictions =
                        permit_mynetworks,reject_unauth_destination, check_sender_access
                        hash:/etc/postfix/restricted_senders
                        smtpd_restriction_classes = local_only
                        smtpd_sasl_auth_enable = no
                        smtpd_sender_restrictions = hash:/etc/postfix/access
                        smtpd_use_tls = no
                        strict_rfc821_envelopes = no
                        transport_maps = hash:/etc/postfix/transport
                        unknown_local_recipient_reject_code = 550

                        Thank you,
                        Robert Adkins
                      • mouss
                        ... Now compare this to your configuration as reported by postconf -n. It must now be clear why sending output of postconf -n is (almost) always needed. ...
                        Message 11 of 11 , Nov 1, 2006
                          Robert Adkins wrote:
                          >
                          > /etc/postfix/main.cf:
                          > smtpd_recipient_restrictions =
                          > check_sender_access hash:/etc/postfix/restricted_senders
                          > ...other stuff...
                          >

                          Now compare this to your configuration as reported by postconf -n. It
                          must now be clear why sending output of postconf -n is (almost) always
                          needed.

                          > [snip]
                          > smtpd_recipient_restrictions =
                          > permit_mynetworks,reject_unauth_destination, check_sender_access
                          > hash:/etc/postfix/restricted_senders
                          permit_mynetworks permits mail from mynetworks. no further checks are
                          performed.

                          add the check_sender_access above to smtpd_sender_restrictions and it
                          will work.
                        Your message has been successfully submitted and would be delivered to recipients shortly.