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

Report misses original mail

Expand Messages
  • bitozoid
    I have a host with services sending mails through sendmail binary. To get some fault tolerance, I have set notify_classes = bounce, delay, policy, protocol,
    Message 1 of 5 , Aug 1, 2013
      I have a host with services sending mails through sendmail binary. To get some fault tolerance, I have set

      notify_classes = bounce, delay, policy, protocol, resource, software

      However, I get notifications with the headers but not the body of the original mail. Is there a way not to miss the original mail, e.g. as an attachment in report?
    • Wietse Venema
      ... This send an ADDITIONAL notification to the system administrator. The original message content is sent to the envelope sender only (subject to
      Message 2 of 5 , Aug 1, 2013
        bitozoid:
        > I have a host with services sending mails through sendmail binary. To get
        > some fault tolerance, I have set
        >
        > notify_classes = bounce, delay, policy, protocol, resource, software

        This send an ADDITIONAL notification to the system administrator.

        The original message content is sent to the envelope sender only
        (subject to bounce_size_limit restrictions).

        Sending automatic notifications is a tricky business. It may result
        in infinite loops or worse, one message becoming multiple messages
        which in turn become an avalanche of mail.

        Safety is one reason why Postfix avoids returning multiple copies
        of undeliverable mail. Privacy is another: most delivery problems
        are unrelated to the message content, so there is no need to always
        give the content to the system administrator.

        It's easy enough to add one bounce daemon parameter that flips the
        switch from "headers only" to "full message" for postmaster
        notifications. Unfortunately, I have no time to implement that.

        Wietse
      • bitozoid
        As an alternative for fault tolerance and debugging, I think I can just archive every mail (too few): sender_bcc_maps = static:localarchive recipient_bcc_maps
        Message 3 of 5 , Aug 1, 2013
          As an alternative for fault tolerance and debugging, I think I can just archive every mail (too few):

          sender_bcc_maps = static:localarchive
          recipient_bcc_maps = static:localarchive

          and then alias localarchive to a maildir folder. However, I don't want to keep any other local mailbox. That is, if a mail is sent to a local account and no alias is defined, I'd like to get an error (not to miss any message). Is there a way to set that?




          On Thu, Aug 1, 2013 at 1:36 PM, Wietse Venema <wietse@...> wrote:
          bitozoid:
          > I have a host with services sending mails through sendmail binary. To get
          > some fault tolerance, I have set
          >
          > notify_classes = bounce, delay, policy, protocol, resource, software

          This send an ADDITIONAL notification to the system administrator.

          The original message content is sent to the envelope sender only
          (subject to bounce_size_limit restrictions).

          Sending automatic notifications is a tricky business.  It may result
          in infinite loops or worse, one message becoming multiple messages
          which in turn become an avalanche of mail.

          Safety is one reason why Postfix avoids returning multiple copies
          of undeliverable mail.  Privacy is another: most delivery problems
          are unrelated to the message content, so there is no need to always
          give the content to the system administrator.

          It's easy enough to add one bounce daemon parameter that flips the
          switch from "headers only" to "full message" for postmaster
          notifications. Unfortunately, I have no time to implement that.

                  Wietse

        • Wietse Venema
          ... Regular expressions to the rescue: recipient_bcc_maps = pcre:/path/to/file And a pattern that excludes local recipients: if !/@example .com$/ /./
          Message 4 of 5 , Aug 1, 2013
            bitozoid:
            > As an alternative for fault tolerance and debugging, I think I can just
            > archive every mail (too few):
            >
            > sender_bcc_maps = static:localarchive
            > recipient_bcc_maps = static:localarchive
            >
            > and then alias localarchive to a maildir folder. However, I don't want to
            > keep any other local mailbox. That is, if a mail is sent to a local account
            > and no alias is defined, I'd like to get an error (not to miss any
            > message). Is there a way to set that?

            Regular expressions to the rescue:

            recipient_bcc_maps = pcre:/path/to/file

            And a pattern that excludes local recipients:

            if !/@example\.com$/
            /./ localarchive
            endif

            References:
            http://www.postfix.org/pcre_table.5.html

            Wietse
          • bitozoid
            ... I finally made the server virtual (no local mailboxs), and used a specific transport for localarchive: /etc/postfix/main.cf mydestination = relayhost =
            Message 5 of 5 , Aug 2, 2013
              On Thu, Aug 1, 2013 at 2:15 PM, Wietse Venema <wietse@...> wrote:
              bitozoid:
              > As an alternative for fault tolerance and debugging, I think I can just
              > archive every mail (too few):
              >
              > sender_bcc_maps = static:localarchive
              > recipient_bcc_maps = static:localarchive
              >
              > and then alias localarchive to a maildir folder. However, I don't want to
              > keep any other local mailbox. That is, if a mail is sent to a local account
              > and no alias is defined, I'd like to get an error (not to miss any
              > message). Is there a way to set that?

              Regular expressions to the rescue:

              recipient_bcc_maps = pcre:/path/to/file

              And a pattern that excludes local recipients:

              if !/@example\.com$/
              /./ localarchive
              endif

              References:
              http://www.postfix.org/pcre_table.5.html

              I finally made the server virtual (no local mailboxs), and used a specific transport for localarchive:

              /etc/postfix/main.cf
                 mydestination =
                 relayhost = [my.smart.host]:25
                 virtual_alias_maps = hash:/etc/postfix/virtual
                 notify_classes = bounce, delay, policy, protocol, resource, software
                 sender_bcc_maps = static:localarchive
                 recipient_bcc_maps = static:localarchive

              /etc/postfix/virtual
                 postmaster root
                 root my@...

              /etc/postfix/transport
                 localarchive@... local

              /etc/aliases
                 localarchive: /var/mail/allmail-recycler/

              Thanks



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