You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Martin Gregorie <ma...@gregorie.org> on 2008/02/04 12:27:44 UTC
Can an SA rule use a database lookup?
I have a Postgres database containing an automatically generated list of
addresses to which I have sent at least one mail message. I would like
to whitelist mail received from any of them.
Is it possible to write a local rule that whitelists any address that is
selected from the view?
I've read through what I believe to be the relevant documentation on the
SA website but have seen no mention of rules using database access:
hence this question.
TIA,
Martin
Re: Can an SA rule use a database lookup?
Posted by Jonas Eckerman <jo...@frukt.org>.
Martin Gregorie wrote:
>
> I have a Postgres database containing an automatically generated list of
> addresses to which I have sent at least one mail message. I would like
> to whitelist mail received from any of them.
You could write a plugin that queries your database for this info.
Or, if the list isn't too big, regularly generate a rule set for
SpamAssassin.
> I've read through what I believe to be the relevant documentation on the
> SA website but have seen no mention of rules using database access:
I do have a couple of plugins that uses database access at
<http://whatever.frukt.org/spamassassin.text.shtml>.
Those plugins use MySQL or SQLite (but haven't been tested with
SQLite in recent memory), but as they use DBI that shouldn't make
a big difference to Postgres.
Regards
/Jonas
--
Jonas Eckerman, FSDB & Fruktträdet
http://whatever.frukt.org/
http://www.fsdb.org/
http://www.frukt.org/
RE: Can an SA rule use a database lookup?
Posted by Giampaolo Tomassoni <g....@libero.it>.
> -----Original Message-----
> From: Martin Gregorie [mailto:martin@gregorie.org]
> Sent: Monday, February 04, 2008 12:28 PM
>
> I have a Postgres database containing an automatically generated list
> of
> addresses to which I have sent at least one mail message. I would like
> to whitelist mail received from any of them.
>
> Is it possible to write a local rule that whitelists any address that
> is
> selected from the view?
>
> I've read through what I believe to be the relevant documentation on
> the
> SA website but have seen no mention of rules using database access:
> hence this question.
Hi Martin,
amavis (http://www.ijs.si/software/amavisd/) supports db access and it can
whitelist addresses based on sql lookups.
Regards,
Giampaolo
>
> TIA,
> Martin