The general problem is that mail sent to forward addresses which are nonusers (ie: [EMAIL PROTECTED] -> [EMAIL PROTECTED]) are not getting their X-Spam headers.
All users are virtual users and are found in the mysql db 'vmail' table of 'users'. There is a separate 'virtual_domains' table. The issue is that when mail comes in it is checked against the 'users' table. The '[EMAIL PROTECTED]' is not in the db, so they are treated as tough they are not local and are not tagged. I am curious if there is a way to assign '%local_domains' or similar using a mysql query that is not the '$sql_select_policy' ie: %local_domains = lookup_sql('SELECT domain FROM virtual_domains'); This is due to the way '$sql_select_policy' is currently set up. Also I currently have no way of doing 'JOIN' from 'users' to 'virtual_domains' Relevant configuration follows: /etc/amavis/50-user # Set up the mysql data source name @lookup_sql_dsn = ( ['DBI:mysql:database=vmail;host=127.0.0.1;port=3306', 'user', 'passwd']); # Set up mysql user query policy $sql_select_policy = 'SELECT *,users.id'. ' FROM users LEFT JOIN wblist ON users.id=wblist.rid'. ' WHERE users.email IN (%k)'. ' ORDER BY users.id DESC'; # Set up per user whitelisting blacklisting $sql_select_white_black_list = 'SELECT wb FROM wblist'. ' JOIN mailaddr ON wblist.sid=mailaddr.id'. ' WHERE wblist.rid=? AND mailaddr.email IN (%k)'. ' ORDER BY mailaddr.priority DESC', /var/log/mail.log May 30 18:01:49 mail amavis[10229]: (10229-06) ESMTP< RCPT TO:<[EMAIL PROTECTED]> ORCPT=rfc822;[EMAIL PROTECTED] May 30 18:01:49 mail amavis[10229]: (10229-06) query_keys: [EMAIL PROTECTED], info@, tysonsteele.com, .tysonsteele.com, .com, . May 30 18:01:49 mail amavis[10229]: (10229-06) lookup_hash([EMAIL PROTECTED]), no matches May 30 18:01:49 mail amavis[10229]: (10229-06) lookup_acl([EMAIL PROTECTED]), no match May 30 18:01:49 mail amavis[10229]: (10229-06) lookup (local_domains) => undef, "[EMAIL PROTECTED]" does not match .........cut............ May 30 18:01:56 mail amavis[10229]: (10229-06) header: Received: from mail.domian.dom ([127.0.0.1])\n\tby localhost (mail.domian.dom [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id NB7MWjMvyQ7j for <[EMAIL PROTECTED]>;\n\tFri, 30 May 2008 18:01:49 -0400 (EDT)\n May 30 18:01:56 mail amavis[10229]: (10229-06) SPAM, <[EMAIL PROTECTED]> -> <[EMAIL PROTECTED]>, Yes, score=26.71 tag=-999 tag2=4.5 kill=10 tests=[BAYES_99=3.5, FM_NO_STYLE=0.9, HELO_EQ_BR=0.955, HOST_EQ_BR=1.295, HTML_40_50=0.496, HTML_MESSAGE=0.001, PYZOR_CHECK=3.7, RCVD_IN_BL_SPAMCOP_NET=1.558, RCVD_IN_SORBS_DUL=2.046, SARE_SPEC_ROLEX_NOV5F=0.666, URIBL_JP_SURBL=4.087, URIBL_OB_SURBL=3.008, URIBL_SC_SURBL=4.498], autolearn=spam, quarantine NB7MWjMvyQ7j (spam-quarantine) .............cut.................... May 30 18:01:56 mail postfix/smtp[9348]: D846D1FD429F: to=<[EMAIL PROTECTED]>, relay=127.0.0.1[127.0.0.1]:10024, delay=7.5, delays=0.61/0/0/6.9, dsn=2.6.0, status=sent (250 2.6.0 Ok, id=10229-06, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 4F7CF1FD42AF) May 30 18:01:56 mail postfix/pipe[10251]: 4F7CF1FD42AF: to=<[EMAIL PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=maildrop, delay=0.14, delays=0.05/0.02/0/0.08, dsn=2.0.0, status=sent (delivered via maildrop service) Thank you Jason -- Jason Crowe Systems Administrator Advomatic LLC ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/