#` Prepared by Peter Barnard @ ASC WEB Limited, U.K.' #` peterb@ascweb.co.uk ' # #` Inspired by www.harker.com/sendmail/copyuser.html ' # #` For sendmail switch 8.10.0 the file needs to be' #` /usr/local/sendmail/smmta-8.10.0/cf/hack/mail-logger.m4' # #` Include in the main config using' #` HACK(mail-logger)' #` With smadmin this is the Custom Local Configuration box.' # #` Make a copy of all incoming and outgoing mail to "confMAIL_LOGGER_MAILBOX".' #` Operates by hooking into rule set 0 and recursively calling' #` sendmail to resend the mail to the original recipient and' #` the local archive. The recursion is broken by defining a macro' #` that will not match any mail address, thus preventing the next' #` recursive call.' LOCAL_RULE_0 R$+ < @ $+ ${DONTCOPY} > $#copymail $@mail-logger $: $1 < @ $2 > MAILER_DEFINITIONS Mcopymail, P=/usr/lib/sendmail, F=fmSDFMu, A=sendmail -N never -M{DONTCOPY}.DONTCOPY -M{DONTCHECK}.DONTCHECK confMAIL_LOGGER_MAILBOX $u