Re: [Exim] Spam filter with MySQL and .forward filter file

Startseite
Nachricht löschen
Nachricht beantworten
Autor: ODHIAMBO G. Washington
Datum:  
To: Konrad Michels
CC: mike, exim-users
Betreff: Re: [Exim] Spam filter with MySQL and .forward filter file
* Konrad Michels <konrad@???> [20030606 12:07]: wrote:
> As far as I recall, you have to compile in mysql lookup support at
> compile time - there are instructions in the installation documents for
> this.



And he has to also give exim the credentials for loging into that database.
I don't know if sql options are available for the filter. Maybe they are,
but I believe a script that is run from the filter maybe better??


>
> On Fri, 2003-06-06 at 09:55, Mike Kenyon wrote:
> > I've decided in order to defeat the spam problem to redirect all mail
> > from people who aren't in my address book into a folder
> > called "Spam". This isn't particularly intelligent but seems to work.
> > I've created a cron job that distills my Mutt address book into a
> > simple list of addresses which are then searched in my .forward by
> > the following:
> >
> > # Exim filter
> > if not error_message then
> >   if ${lookup{$sender_address}lsearch*@{$home/.addressbook}{OK}{SPAM}} is SPAM
> >   then
> >     save Mail/Spam
> >   endif
> > endif

> >
> > Which works great.
> >
> > *But* I also use SquirrelMail as well as Mutt (and I'm currently
> > evaluating Twiggi) and both store the contacts in a MySQL table (this
> > is optional with SquirrelMail but seemed like a good idea at the
> > time). What I want to is also have the filter search the relevant
> > table for addresses, something like:
> >
> > if ${lookup mysql {select email from address_table where owner = 'mike' and
> > email = '$sender_address'}{OK}{SPAM}} is SPAM
> > then
> > save Mail/Spam
> > endif
> >
> > (Note that the address table in SquirrelMail is called "address" and
> > not "address_table".)
> >
> > This doesn't work, as Exim doesn't seem to recognise "mysql" as a
> > lookup type (at least in a filter) OR I've got the syntax completely
> > wrong.
> >
> > I have digested the filter manual, the spec and searched this list
> > but to no avail (so far).
> >
> >
> >
> > --
> > Mike Kenyon
> >
> >
> > --
> >
> > ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
> --
> ===============
> ADVANCE NOTICE:
> NB!!! Please note that Konrad will be on leave (and therefore not very
> contactable or useful even when you can contact him) from Friday,
> June 13th 2003 until June 29th 2003, both dates inclusive. I will be
> back in the office on June 30th 2003.
>
> ***********************************************************************
> *
> * Konrad Michels
> * System Administrator
> * Surfkitchen Limited
> * Abbey House
> * 1650 Arlington Business Park
> * Theale
> * RG7 4SA
> * United Kingdom
> * Tel: +44 118 929 8079
> *
> ***********************************************************************
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##


-Wash

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



Miksch's Law:
    If a string has one end, then it has another end.