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

Logging Bounces

Expand Messages
  • Roman Gelfand
    Is there a way to add more info to status=bounced entries? For instance, I would like to see the from email and subject on the same line. Aug 25 11:40:27
    Message 1 of 3 , Aug 29, 2013
    • 0 Attachment
      Is there a way to add more info to "status=bounced" entries? For
      instance, I would like to see the from email and subject on the same
      line.

      Aug 25 11:40:27 mail postfix/smtp[22413]: 83A7643CEB:
      to=<user@...>, relay=mxserver.domain.com[XX.XX.XX.XXX]:25,
      delay=0.57, delays=0/0/0.41/0.16, dsn=5.0.0, status=bounced (host
      mxserver.domain.com XX.XX.XX.XXX] said: 550 Requested action not
      taken: mailbox unavailable (in reply to RCPT TO command))

      Thanks in advance
    • lists@rhsoft.net
      ... grep for 83A7643CEB and you get from address and all sort of details like the sender, client-IP and infos to other RCPT s submitted with the same
      Message 2 of 3 , Aug 29, 2013
      • 0 Attachment
        Am 29.08.2013 19:27, schrieb Roman Gelfand:
        > Is there a way to add more info to "status=bounced" entries? For
        > instance, I would like to see the from email and subject on the same
        > line.

        grep for "83A7643CEB" and you get from address and all sort of details
        like the sender, client-IP and infos to other RCPT's submitted with
        the same transaction (if exists)

        the subject is nothing which appears or should appear in the maillog
        why? because it is no technical information and violates privacy

        > Aug 25 11:40:27 mail postfix/smtp[22413]: 83A7643CEB:
        > to=<user@...>, relay=mxserver.domain.com[XX.XX.XX.XXX]:25,
        > delay=0.57, delays=0/0/0.41/0.16, dsn=5.0.0, status=bounced (host
        > mxserver.domain.com XX.XX.XX.XXX] said: 550 Requested action not
        > taken: mailbox unavailable (in reply to RCPT TO command))
      • Higuita
        Hi On Thu, 29 Aug 2013 13:27:18 -0400, Roman Gelfand ... I usually do a extended log for all emails, so its easier to parse the log
        Message 3 of 3 , Aug 29, 2013
        • 0 Attachment
          Hi

          On Thu, 29 Aug 2013 13:27:18 -0400, Roman Gelfand <rgelfand2@...>
          wrote:
          > Is there a way to add more info to "status=bounced" entries? For
          > instance, I would like to see the from email and subject on the same
          > line.

          I usually do a "extended" log for all emails, so its easier to
          parse the log when i'm searching for emails. i "abuse" the warn_if_reject
          for that, by placing it before a reject, just like this:

          smtpd_recipient_restrictions = warn_if_reject, reject,(...)

          This will log all incoming emails with a warning_reject in the
          log with all main information for the email. Disk space is cheap, so
          i dont care if the log is a little bigger.

          if you only want the bounces, maybe you can duplicate every
          rule that might reject the messsage with the warn_if_reject and
          the same rule, like this:

          smtpd_recipient_restrictions = (...)
          warn_if_reject, reject_unknown_sender_domain,
          reject_unknown_sender_domain,
          warn_if_reject,reject_unauth_destination,
          reject_unauth_destination,
          (...)

          do that for any rule you might have that bounce the email
          and you will get the "extended" log just for the bounces

          good luck
          higuita
          --
          Naturally the common people don't want war... but after all it is the
          leaders of a country who determine the policy, and it is always a
          simple matter to drag the people along, whether it is a democracy, or
          a fascist dictatorship, or a parliament, or a communist dictatorship.
          Voice or no voice, the people can always be brought to the bidding of
          the leaders. That is easy. All you have to do is tell them they are
          being attacked, and denounce the pacifists for lack of patriotism and
          exposing the country to danger. It works the same in every country.
          -- Hermann Goering, Nazi and war criminal, 1883-1946
        Your message has been successfully submitted and would be delivered to recipients shortly.