How to use @sa_userconf_maps for white-/blacklisting in Amavis 2.7.0

SB kfswido at yahoo.de
Sat Oct 8 14:59:06 CEST 2011


Just to make sure it doesn't have a simple reason:

The local.cf file is otherwise correctly read and processed, and the
whitelist works correctly as well when looked up by spamd/spamc. So it
must be some problem specific to the amavis/spamassassin setting.

Thanks,
S


> Hi,
> 
> I'd like to use the new sa_userconf_maps feature in Amavis 2.7.0 (Ubuntu
> x64), but unfortunately I'm not able to figure out the correct
> configuration from what I can find online.
> 
> My setting is as follows:
> 
> I have a MYSQL database called 'spamassassin_db' on my server with a
> single table 'userpref' in it, containing white- and blacklist entries.
> These are filled by some other application, so I don't want to change
> anything here (e.g., to amavis SQL rules which seem to be even less well
> documented) if possible.
> 
> I have configured the SQL database in my /etc/spamassassin/local.cf as
> follows:
> 
> user_scores_dsn                 DBI:mysql:spamassassin_db:localhost
> user_scores_sql_username        (...)
> user_scores_sql_password        (...)
> user_scores_sql_custom_query    SELECT preference, value FROM userpref
> WHERE username = _USERNAME_ OR username = '$GLOBAL' OR username =
> CONCAT('%',_DOMAIN_) ORDER BY username ASC
> 
> 
> 
> What I would like amavisd to do is to have spamassassin respect the
> whitelist_auth/blacklist_from rules in this database table globally,
> i.e. regardless of the recipient's email address.
> However, I don't seem to know the appropriate commands, and where to put
> them.
> 
> If I just put
> 
> @sa_userconf_maps = (
>        {
>           '.*' => 'sql:',
>        }
>      );
> 
> ...how does amavis know which SQL database is referred to? Or that it
> should use "local.cf"? I have also tried something like
> 
> @sa_userconf_maps = (
> "/etc/spamassassin/local.cf"
>      );
> 
> without success.
> 
> It's not surprising to me that I haven't got it to work so far, given
> that I simply can't find any clear instructions anywhere on the Web.
> 
> 
> Any help would be very much appreciated! :)
> 
> Thanks,
> S.


More information about the amavis-users mailing list