procmail
[Top] [All Lists]

Re: Return addresses

1997-06-25 03:16:00
Here's a recipe I use for doing exactly what you want:

     dubh208 117 % more getuser.rc 
     #---------------------------------------------------------------------
     # Grab the mail id for all mail messages that come to me.  Ignore
     # POSTMASTER, DAEMON etc. and my own mail.
     #---------------------------------------------------------------------
     :0Whci:from_user.lock
     * !^FROM_DAEMON
     * !^FROM_MAILER
     * $!^From:.*${USER}
     | formail -zx From: >> $USERLOG; sort -u -o $USERLOG $USERLOG

Mind you, the variables are all set before the getuser.rc is included in
my main .procmailrc.

I've been using this for about 2 years now and it works like a charm.

Your mileage may vary.

Ciao.

jte

------------------------------+-------------------------------------------------
  John Ellis +353-21-511-487  | "They that give up essential liberty to obtain
  Motorola Cellular - Cork    |  a little safety deserve neither liberty nor
  ellis(_at_)cig(_dot_)mot(_dot_)com           |  safety."    -- Benjamin 
Franklin

On Tue, 24 Jun 1997 bts8(_at_)netcom(_dot_)com wrote:

I'm trying to gather return addresses of people I regularly receive mail 
from prior to setting up any autoresponse system.  I would like to 
capture these addresses into a file to check against in the future.
I currently have:

:0c:
* ! ^FROM_DAEMON
* ! ? echo $FROM | $GREP -v -F -i $PMDIR/friendlygather
* ^TO_bts8\>
| echo $FROM >> $PMDIR/friendlygather

What I expected was that this recipe should make sure incoming mail is 
not from a daemon, that the address is not currently in the 
friendlygather file, and finally, that this piece of mail is 
specifically addressed to me (to avoid bcc spams).  Unfortunately, this 
recipe doesn't add any new addresses to the friendlygather file.  The 
friendlygather file currently has only one line in it which is "test" (no 
quotes).  Any ideas are greatly appreciated!  Thanks!

------------------------------


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