procmail
[Top] [All Lists]

Re: handle outgoing mail?

1997-09-07 12:57:43
On Sat, 6 Sep 1997 18:58:10 -0700, 
dave(_at_)magic(_dot_)geol(_dot_)ucsb(_dot_)edu (Dave Robbins) said:

D> Can procmail handle outgoing mail in the sense of putting all my
D> composed mail, say to this list, in a separate mailbox?  If so, could
D> someone please explain how this might be accomplished while maintaining
D> the status quo of my incoming mail?

   I do this by sending myself a blind courtesy copy of any outgoing
   messages.  I prefer this to letting my mail package handle it, because
   this way I get an exact copy of the headers as generated by sendmail.

   This can bite you if you're in the habit of sending yourself mail from
   shell scripts or cron jobs, so you should probably put this recipe
   towards the end of your .procmailrc file.

#------------------------------------------------------------
# Rule 10:
#       Any mail with "From: vogelke..." in the header might be
#       something sent via "Bcc: vogelke" (blind courtesy copy) which
#       is intended for my sentmail folder.  Get rid of any botched
#       ">From" header and save the message.
#
#       Need to check for bounced messages containing MAILER-DAEMON
#       or POSTMASTER first, or I won't ever know if my mail isn't
#       delivered because the bounce message will end up in my
#       sentmail file.  Also need to look for cron or backup
#       strings in the header, because that generally implies that
#       one of my cron jobs went to hell.

:HBhb:
* ^From.*(POSTMASTER|MAILER-DAEMON)
$DEFAULT

:0:
* backup
$DEFAULT

:0:
* Output from
$DEFAULT

:HBhb:
* ^Return-Path: <vogelke>$
| /bin/sed -e '/^>From vogelke/d' >> $MAILDIR/sentmail
#------------------------------------------------------------

-- 
Karl Vogel
ASC/YCOA, Wright-Patterson AFB, OH 45433
vogelke(_at_)c17mis(_dot_)region2(_dot_)wpafb(_dot_)af(_dot_)mil

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