procmail
[Top] [All Lists]

Re: Automatic Copy of Outgoing Mail

2001-08-03 15:17:19
Don Hammond advised Steve Leeke,

| I do vaguely recall some years back some discussion(s) of processing
| outgoing mail through a ".backward" file (era eriksson's name ?). I
| don't really have any more information to offer on it, but more could
| be found in the archive, or maybe it'll jog someome else's memory.

Yes, it jogs mine; I used such a file (and renamed it "backward" when Era
gave the notion that name) for quite a while.

The problem is that the MUA has to have a hook where the user can specify a
program to filter outgoing mail on its way to the MTA or specify the MTA
itself.  Unix Mail (or mailx), Pine, and Mutt can do that.  With mailx I
found I couldn't include spaces in the name of the command no matter how I
quoted or escaped them, so I couldn't tell it to use "procmail -m
.backwardrc"; instead I made the rcfile executable, started it with a
hash-bang line calling /path/to/procmail -m, and put the path to that script
as the name of the mailer in .mailrc.  The last recipe in it was

 :0
 ! "$@"

to have procmail turn the message over to the =real= MTA.

Meanwhile, it allowed me to do anything to my outgoing mail that procmail
could accomplish, even conditionally based on addressees.  But the trick was
to be using an MUA that allowed that hook.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail