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

294574Re: Report misses original mail

Expand Messages
  • bitozoid
    Aug 2 3:08 AM
      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



    • Show all 5 messages in this topic