procmail
[Top] [All Lists]

Re: Using procmail to filter my outgoing mail?

1996-06-20 09:04:49
Gilles Carmel asked,

| I would think that if procmail could filter my outgoing
| mail, I could for example kill all message I sent with no subject in them.
| But I do not find any example of this in the man pages.

The problem is not with procmail but rather with the mailer.  Procmail's -m
option, for example, is tailor-made for handling outgoing mail, but you have
to be sending mail out with a program that will give you a chance to run a
preprocessor first (or a postprocessor if you look at it from the point of
view of the MUA).

I usually handle my mail with Elm, which has no facility for piping outgoing
mail through another program on its way to the MTA.  But for mail sent out
by my cron jobs I use Berkeley Mail specifically because it can do that.
(Unfortunately, no means of quoting or escaping that I tried allowed me to
include a space in the name of that variable in my .mailrc, so I finally set
up a script like this:

 #!/path/to/procmail -m

 [procmailrc code goes here, ending with]

 :0
 ! "$@"

and gave .mailrc just the path to the script.)  All outgoing mail sent by my
cron jobs goes through that script (and has an extra header line added by
formail to prove it).

So the question is what's sending out those response letters that sometimes
are empty?  (If it's a recipe in your .procmailrc, you can fix it there
during the handling of your incoming mail.)

<Prev in Thread] Current Thread [Next in Thread>