Brent Clark:
> Hiya
>
> I got this requirement from my client to keep a copy of ALL emails that gets
> sent and received (legal intercept). Im thinking this can be done at SMTP
> time.
>
> My question is, would anyone know how and where, at SMTP time, not using
> 'always_bcc', store the email to file.
>
Use recipient_bcc_maps (or sender_bcc_maps).
Untested example:
/etc/postfix/main.cf:
recipient_bcc_maps = hash:/etc/postfix/recipient_bcc
/etc/postfix/recipient_bcc:
# You need to "postmap" this file after editing it.
[email protected] log...@localhost
/etc/aliases:
# You need to run "newaliases" after editing this file.
logger: /var/logger/
Note the trailing /.
This delivers each message as a maildir file, and thus avoids errors
that would happen when you deliver to one large file that grows
too large.
Make "/var/logger" a directory that is owned by nobody (or whatever
the value of "default_privs" is with your Postfix).
Wietse