Re: [Exim] Newbie question: How do i make a system-wide filt…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Odhiambo G. Washington
Date:  
À: exim-users
CC: veraeraro
Sujet: Re: [Exim] Newbie question: How do i make a system-wide filter and a per-user filter?
* veraeraro <veraeraro@???> [20020512 20:21]: wrote:
> Hello,


Hello Vera,


>    I'm sorry to bother you all, but i have been reading the
> documentation at www.exim.org and i've been trying to find tutorials,
> but i am still lost about how to do some seemingly, simple things.

>
>    In particular, i would like to set up a system-wide filter that
> will search the header and body for a string which will cause the
> server to bounce the message back (as no one here can read korean, in
> this case).



http://www.ctyme.com/filter.txt - as a basis. He doesn't bounce the mails but you
can change the rules to do that if you're that brave ;-)



> I also want to be able to search a message in the Subject
> or body for a string (a "password" if you will), by user, that will
> allow any message through. I thought these would be easy but i have
> failed to make them work after many differnet attempts.


if $message_body contains "password" then finish endif
if $h_subject: contains "password" then finish endif

something alog those lines but I bet if your users have shell access then
better let them run their own filter via the .forward


Below is a snippet of what was posted to this list sometimes back..

wash$ cat .forward
# Exim filter
# Error trapping

if error_message then finish endif

if $h_subject: contains "Viagra"        # Real men don<92>t need it
or ($h_Subject: matches \\\$\\\$+)      # No dollars for me
or $h_subject: contains "Card"  # Credit card scams
or $h_subject: contains "Weight loss Offer" # Fat is a sign of maturity
or $h_subject: contains "Lowest Mortgage Rates" # Got my mortgage
or $h_subject: contains "Free Pics"             # Avoid RSI today


>    If you have solutions that would really be great. If you could also
> please tell me where to find references to how to solve these types of
> questions, that would just be terrific.

>
>    Thank you for any clues.



You mean clues like those above?? And if you can get exim-$VERSION.tar.gz
from the ftp sites and do a tar xzf on it, you'll find in the docs directory
a file called filter.txt which explains howto use the filter..



-Wash

--
Odhiambo Washington  <wash@???>    "The box said 'Requires
Wananchi Online Ltd.  www.wananchi.com      Windows 95, NT, or better,'
Tel: 254 2 313985-9   Fax: 254 2 313922     so I installed FreeBSD."
GSM: 254 72 743 223   GSM: 254 733 744 121  This sig is McQ!  :-)



Pecor's Health-Food Principle:
    Never eat rutabaga on any day of the week that has a "y" in
it.