amavisd-new with postgresql help
Benny Pedersen
me at junc.eu
Wed Jun 14 22:01:39 CEST 2023
@lookup_sql_dsn = (
['DBI:Pg:database=amavis;host=127.0.0.1;port=5432', 'amavis',
'password' ]
);
@storage_sql_dsn = @lookup_sql_dsn;
$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_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_clause = (
'sel_policy' => \$sql_select_policy,
'sel_wblist' => \$sql_select_white_black_list,
);
@sa_userconf_maps = (
{
'.*' => 'sql:',
}
);
@sa_username_maps = new_RE (
[ qr'^([^@]+ at .*)'i => '${1}' ]
);
@spam_scanners = (
# ['SpamAssassin', 'Amavis::SpamControl::SpamAssassin']
['SpamdClient', 'Amavis::SpamControl::SpamdClient']
);
1; # insure a defined return value
logs
Jun 14 21:46:02 localhost postgres[22001]: [7-1] 2023-06-14 19:46:02.275
UTC [22001] ERROR: operator does not exist: bytea = character varying
at character 88
Jun 14 21:46:02 localhost postgres[22001]: [7-2] 2023-06-14 19:46:02.275
UTC [22001] HINT: No operator matches the given name and argument
types. You might need to add explicit type casts.
Jun 14 21:46:02 localhost postgres[22001]: [7-3] 2023-06-14 19:46:02.275
UTC [22001] STATEMENT: SELECT *,users.id FROM users,policy WHERE
(users.policy_id=policy.id) AND (users.email IN ($1,$2,$3,$4,$5,$6))
ORDER BY users.priority DESC
yes it worked in fuglu as i liked it, but have to drop fuglu since its
nearly unmaintained in gentoo :/
hope i can get amavisd and mailzu working as it did for me some years
ago
postgresql 13
amavisd 2.12
More information about the amavis-users
mailing list