procmail
[Top] [All Lists]

RE: Checking if there is only one recipient

2002-10-01 23:38:15
My main address (the one mostly spammed) is mac(_at_)focus(_dot_)lu
I check for multiple recipients thus...

## stops multi-mailing to all "mac"'s
:0:
* 
^cc:(_dot_)*mac(_dot_)*(_at_)(_dot_)*mac(_dot_)*@(_dot_)*mac(_dot_)*(_at_)(_dot_)*mac(_dot_)*@.*mac.*@
multi.spam

## stops multi-mailing to all "f"'s
:0:
* 
^cc:(_dot_)*(_dot_)*(_at_)f(_dot_)*@f(_dot_)*(_at_)f(_dot_)*@f(_dot_)*(_at_)f(_dot_)*
multi.spam

Works for me
You could invert this perhaps?
Andy Mac

At 11:52 PM 01/10/02 +0200, you wrote:

> OK.  Maybe I phrased what I want to do poorly.  What I want to do is
> see if I am the only recipient of the mail.  Is the mail (as far as i
> could tell looking at the headers) JUST to me?
>
> Seems this should be easier than multiple recipes to count @'s, but
> maybe I'm jsut whining?


Well, if you want to see if it's to you, check to see if it's to you.

        :0
        * To:(.*\<)?you(_at_)your(_dot_)address


If all you want to know is if any other addresses are on
the To: or Cc: lines, but you don't care about counting
them, that's not so hard.

        * ! To:(_dot_)*(_at_)(_dot_)*@
        * ! Cc:

Put 'em together:

        :0:  # we added a lockfile
        *   To:(.*\<)?you(_at_)your(_dot_)address
        * ! To:(_dot_)*(_at_)(_dot_)*@
        * ! Cc:
        NotJustToMe


Recapping, your address is on the To: line, no more than one @-sign
is on the To: line, and there is no Cc: line.

--
Dallman Ross

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

------------------------------------
FOCUS Internet Services
Web Design, Hosting, Internet Custom Applications
reg office : 62 rue de Mersch
L-8181 KOPSTAL
Luxembourg
tel. (+352) 305 197
fax (+352) 305 188
GSM (+352) 021 246 532
www.focus-services.com
<Prev in Thread] Current Thread [Next in Thread>