One list user want to know how to keep a copy of all outgoing messages.
I use a sendmail hack:
divert(0)
VERSIONID(`KalvjaCopy.m4 December 2000')dnl
ifdef(`_MAILER_smtp_',,
`errprint(`*** MAILER(smtp) must appear before copymail mailer')')dnl
LOCAL_CONFIG
CPNOCOPY
LOCAL_NET_CONFIG
# Kalvja Rules
R$+<@$+.NOCOPY.> $#esmtp $(_at_)$2 $:$1<@$2.>
R$+<@$+.> $#copymail $(_at_)nohostneeded $:$1<@$2.NOCOPY>
R$+<@$+> $#copymail $(_at_)nohostneeded $:$1<@$2.NOCOPY>
MAILER_DEFINITIONS
# Copy a message by sending it back to sendmail with an additional address:
# KalvjaCopy
Mcopymail, P=/usr/lib/sendmail, F=fmSDFMu,
S=11/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'),
A=sendmail -oi KalvjaCopy $u
------------------------------------------------------
And then make a user to receive all KalvjaCopy mail to file it away.
I know this is a procmail list and the connection is that the final
sorting on my system is indeed done by procmail and the question was
posted here. But this is my last work on the subject unless of course
via direct contact and not via the this list.
The hack above could be changed to call procmail at an earlier stage,
though I like the more flexible solution described above.
Best wishes,
Kalvis
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail