Qpsmtpd:bcc

From SME Server
Revision as of 11:26, 18 July 2017 by Mmccarn (talk | contribs) (→‎AUTHOR)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Qpsmtpd#Plugins

NAME

bcc

DESCRIPTION

Forwards a copy of all mail (or just incoming or outgoing mail) to the given email address (useful for archiving etc.). bcc addresses may be passed as parameters to bcc, or may be defined in a 'bcc' config file.

bcc also checks config files 'bcc_ignore_mailfrom' and 'bcc_ignore_rcptto' for exceptions - these contain lists of email addresses bcc should ignore as senders or recipients. They also support bare username and '@domain' entries as wildcards.

bcc will use per_recipient configs if passed a true 'per_recipient' argument, but it cannot handle multiple different configs for different recipients (so use denysoft_multi or similar to prevent those).

bcc should generally be called before the 'check_relay' plugin, since incoming processing uses a RCPT hook.

CONFIG

The following parameters can be passed to bcc, or set via a 'bcc' config file.

mode [ bcc | cc | off ]
bcc mode. Defaults to 'bcc' if any of the all/incoming/outgoing parameters are set, and 'off' otherwise. 'cc' mode is identical to 'bcc' mode, except that an 'X-Copied-To' header is added to the mail headers for each all/incoming/outgoing recipient.
all <email>
Send a copy of all email to the given address.
incoming <email>
Send a copy of all incoming email to the given address. Mail is considered incoming if it is going to a recipient with a domain in 'rcpthosts'.
outgoing <email>
Send a copy of all outgoing email to the given address. Mail is considered outgoing if it is sent from a relay client i.e. the RELAYCLIENT environment variable is set.

The following parameter can be passed to bcc (but not set via a config file):

per_recipient 1
Allow per-recipient configs to be used (using the per_user_config plugin).

BUGS

Note that the definitions of incoming and outgoing mail mean that relayed mail to a local domain is considered both incoming and outgoing, and will be copied twice. This is a feature, not a bug. :-)

AUTHOR

Written by Gavin Carr <gavin@openfusion.com.au>.