procmail
[Top] [All Lists]

Re: Killing countries by email

2000-01-03 03:43:30
On Fri, 31 Dec 1999, David W. Tamkin wrote:


Egad, yes.  First, you can settle for having the abbreviation for the country
in your logfile instead of its code; 

For me, true.  For the others who use my filters (I do maintain such
things for some others) they might not recognize the abbreviations.  And
don't.  

second, sed or perl could do it without
the piping and the call to awk.  

I couldn't think of the sed way at the time.  :)

But here's another way within procmail:

twoletters=$MATCH # or { twoletters=$MATCH } as the action of that recipe

fpwssn="jp=Japan,nl=the Netherlands,cn=the People's Republic of China,\
 us=the Running Dog Capitalist Pig Abomination amerika, where there \
 is no justice"

 :0
 * $ fpwssn ?? $twoletters=\/[^,]+
 { placename=$MATCH }
 :0E
 { placename="wherever the heck the .$twoletters domain park is" }

 LOG="Reason: I don't know anybody in $placename.$N"

Thanks.  Thats what I was looking for.  

-- 
Any excuse will serve a tyrant.
                -- Aesop

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