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

SB kfswido at yahoo.de
Thu Oct 13 14:38:17 CEST 2011


*bump*
Does no one know an answer? This shouldn't be too a hard for someone who has it up and running. I just can't see the error.

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.
-------------- n?chster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20111013/7f45cb63/attachment.html>


More information about the amavis-users mailing list