[sam] Re: using sam imp spamassasin????

Mark Fink mark_fink at web.de
Sat Feb 26 02:11:08 PST 2005


Mark Fink wrote:
> I managed to connect to the sam database from amavisd-new. Obviously it 
> does not like the format:
> localhost amavis[25365]: (25365-01) TROUBLE in check_mail: 
> creating_partsdir FAILED: DBD::mysql::st execute failed: Unknown column 
> 'users.priority' in 'order clause' at (eval 38) line 238, <GEN14> line 16.
> I double checked the database and found no priority field in the users 
> table.
> 
> Any ideas?
> 
> Mark.
> 
I removed the order clause an it seems to work :-)))
amavisd.conf:
# $sql_select_policy = 'SELECT *,users.id FROM users,policy'.
#   ' WHERE (users.policy_id=policy.id) AND (users.email IN (%k))'.
#   ' ORDER BY users.priority DESC';
$sql_select_policy = 'SELECT *,users.id FROM users,policy'.
   ' WHERE (users.policy_id=policy.id) AND (users.email IN (%k))';
#
# The SQL select clause to check sender in per-recipient whitelist/blacklist
# The first SELECT argument '?' will be users.id from recipient SQL lookup,
# the %k will be sender addresses (e.g. full address, domain only, 
catchall).
# $sql_select_white_black_list = 'SELECT wb FROM wblist,mailaddr'.
#     ' WHERE (wblist.rid=?) AND (wblist.sid=mailaddr.id)'.
#     '   AND (mailaddr.email IN (%k))'.
#   ' ORDER BY mailaddr.priority DESC';
$sql_select_white_black_list = 'SELECT wb FROM wblist,mailaddr'.
     ' WHERE (wblist.rid=?) AND (wblist.sid=mailaddr.id)'.
     '   AND (mailaddr.email IN (%k))';



More information about the sam mailing list