smtpbcc¶
smtpbcc is a plugin for spmfilter, which sends a copy of each incoming and outgoing message to a defined smtp host. The major goal of this plugin is to provide an easy way for archiving messages on another smtp host, without any user interaction. All emails can also optionally be sent with smtp auth. Activation of the module smtpbcc is done by adding smtpbcc to the modules-variable within the [global]-section in spmfilter.conf like follows:
[global]
...
modules = smtpbcc
...
Configuration for diskarchive is done by adding a new section for diskarchive to the spmfilter.conf:
[smtpbcc]
smtp_host = <my.bcc.host>
auth_user = <smtp_auth_user> (optional)
auth_pass = <smtp_auth_pass> (optional)
Note: actively supported mechanisms for smtp auth are: PLAIN,LOGIN
Important notes
Please note: this plugin just forwards the message to the specified smtp_host as it is - the message is not modified by the plugin and all envelope-addresses remain the same. In other words: you have to make sure, that the destination-host does not forward messages respectively you have to configure your destination-host that all messages received by the spmfilter-host are dropped in a local mailbox even if the archive-host is not the final destination for one or more envelope-recipients. This is quite easy to configure in Postfix - the only requirement to make this work is that your destination-host hasn't any 'smtpd_proxy_filter' activated!
If your destination-host supports SMTP-AUTH:- Create a 'client_access_map' that redirects all mails coming from the spmfilter-MTA to a local mailbox, don't forget to run 'postmap hash:/etc/postfix/client_access' afterwards:
/etc/postfix/client_access ip.of.spmfilter.host REDIRECT localuser
- Activate the map within Postfix's 'smtpd_recipient_restrictions' before 'permit_sasl_authenticated' in main.cf
smtpd_recipient_restrictions = ... check_client_access hash:/etc/postfix/client_access permit_sasl_authenticated ... - Reload Postfix
postfix reload
Optionally - if your destination-host doesn't support SMTP-AUTH, you can add the IP-address of the spmfilter-host to Postfix's 'mynetworks'-parameter:
mynetworks = ..., ip.of.spmfilter.host