drop blacklisted senders (was Re: [Exim] simpler way of writ…

Etusivu
Poista viesti
Vastaa
Lähettäjä: dman
Päiväys:  
Vastaanottaja: exim-users
Vanhat otsikot: Re: [Exim] simpler way of writing this?
Aihe: drop blacklisted senders (was Re: [Exim] simpler way of writing this?)
On Mon, Dec 24, 2001 at 09:58:58AM +0100, John Allen wrote:
| > BTW, Phil, I've gotten the filter to do almost everything I want it to
| > :-). (this includes checking a flat-file blacklist of known spammer
| > addresses).

|
| Would you consider posting the code that does this (perhaps in a new
| thread)?


Here you go :

#
# First weed out the blacklisted spammers
#
if "${lookup {${local_part:$header_From:}@${domain:$header_From:}} lsearch {$home/util/mailfilter/spam-from} {Spam} }" is "Spam" then
    seen finish
endif
############



If you read the manual it says that 'lsearch' is not just a flat
list (it is a mapping). However, if you ignore the result of the
lookup and are only interested in success/failure, then it is
functionally the same thing. However you can't include certain
characters in the blacklist, such as ":", because the lsearch will
think the key part has ended and the value part is beginning.

-D

--

"Don't use C; In my opinion, C is a library programming language
not an app programming language." - Owen Taylor (GTK+ developer)