On Aug 26, 2005, at 2:08 PM, Alan Munday wrote:
Paul Wolstenholme wrote the following on 26/08/2005 21:25:
I'm trying to get sql based whitelisting to work. The policy stuff
seems to work fine but not whitelisting. For example, I have the mail
address "[EMAIL PROTECTED]" whitelisted but the mail is still
tagged as spam.
Paul
Try turning up the log level in amavisd.conf so you can see the sql
information (IIRC it will need to be at least 4).
You should then see the result of the SQL query to the WBlist.
You should be able to match the sid/rid pairs to the query data (or
not).
I turned have the log_level set to five. In the previous message I
truncated the logging a bit. The wbl reciptient looks good:
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) wbl: checking sender
<[EMAIL PROTECTED]>
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) lookup_sql_field(id)
"[EMAIL PROTECTED]" result=1
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) lookup, 1 matches for
"[EMAIL PROTECTED]", results: "/cached/"=>"1"
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) wbl: (SQL) recip
<[EMAIL PROTECTED]>, 1 matches
The stuff below seems to be mucked up:
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) query_keys:
[EMAIL PROTECTED], @yachtworld.com, @.yachtworld.com
, @.com, @.
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) lookup_sql
"[EMAIL PROTECTED]", query args: "1", "[EMAIL PROTECTED]
tworld.com", "@yachtworld.com", "@.yachtworld.com", "@.com", "@."
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) lookup_sql select: SELECT
wb FROM wblist LEFT JOIN mailaddr ON wblist.s
id=mailaddr.id WHERE (wblist.rid=?) AND (mailaddr.email IN (?,?,?,?,?))
ORDER BY mailaddr.priority DESC
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) sql begin, nontransaction
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) sql: preparing and
executing: SELECT wb FROM wblist LEFT JOIN mailaddr
ON wblist.sid=mailaddr.id WHERE (wblist.rid=?) AND (mailaddr.email IN
(?,?,?,?,?)) ORDER BY mailaddr.priority DESC
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) lookup_sql,
"[EMAIL PROTECTED]" no match
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) lookup_sql_field(wb),
"[EMAIL PROTECTED]" no matching records
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) lookup => undef,
"[EMAIL PROTECTED]" does not match
Aug 24 23:11:21 ip3 amavis[31600]: (31600-04) wbl: (SQL) recip
<[EMAIL PROTECTED]>, rid=1, got: ""
I would like to test the sql manually but I'm not sure what values are
being used in the IN statement:
SELECT wb FROM wblist LEFT JOIN mailaddr
ON wblist.sid=mailaddr.id WHERE (wblist.rid=?) AND (mailaddr.email IN
(?,?,?,?,?)) ORDER BY mailaddr.priority DESC
Cheers,
Paul
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/