LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-21-2010, 12:48 AM   #1
rafalek
Member
 
Registered: Oct 2003
Posts: 43

Rep: Reputation: 15
amavis and sql black/white list


Hi. I've got a little problem with black and white listing in amavis.
My individual score is working, but when I list some mail in blacklist then this mail is still delivered.

This is some part of maillog
Jan 21 07:23:55 ns308874 postfix/cleanup[80186]: 5153B22899: message-id=<[HIDDEN]>
Jan 21 07:23:55 ns308874 postfix/smtpd[79835]: disconnect from unknown[127.0.0.1]
Jan 21 07:23:55 ns308874 postfix/qmgr[3436]: 5153B22899: from=<[HIDDEN]>, size=1538, nrcpt=1 (queue active)
Jan 21 07:23:55 ns308874 postfix/virtual[80189]: 5153B22899: to=<[HIDDEN]>, orig_to=<[HIDDEN]>, relay=virtual, delay=0.01, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Jan 21 07:23:55 ns308874 postfix/qmgr[3436]: 5153B22899: removed
Jan 21 07:23:55 ns308874 amavis[79289]: (79289-03) Passed CLEAN, [89.161.214.238] [89.250.193.50] <[HIDDEN]> -> <[HIDDEN]>, Message-ID: <[HIDDEN]>, mail_id: faqQczM9mHvD, Hits: 2.723, size: 862, queued_as: 5153B22899, 1574 ms
Jan 21 07:23:55 ns308874 postfix/smtp[80187]: ABF1622897: to=<[HIDDEN]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.7, delays=0.09/0/0/1.6, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 5153B22899)
Jan 21 07:23:55 ns308874 postfix/qmgr[3436]: ABF1622897: removed

This is part of my amavisd.conf - this file is too big

$remove_existing_spam_headers = 0;
@bypass_spam_checks_maps =0;

$sa_tag_level_deflt = -999; # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 5.0; # add 'spam detected' headers at that level
$sa_kill_level_deflt = 10; # triggers spam evasive actions

$sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent
$sa_crediblefrom_dsn_cutoff_level = 18; # likewise, but for a likely valid From
# $sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is off
$penpals_bonus_score = 8; # (no effect without a @storage_sql_dsn database)
$penpals_threshold_high = $sa_kill_level_deflt; # don't waste time on hi spam
$bounce_killer_score = 100; # spam score points to add for joe-jobbed bounces

$sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is larger
$sa_local_tests_only = 0; # only tests which do not require internet access?


@lookup_sql_dsn =(['DBI:mysql:?????:localhost','??????','???????']);

$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';
$final_virus_destiny = D_DISCARD;
$final_banned_destiny = D_REJECT;
$final_spam_destiny = D_REJECT;


Thanks for any help
 
Old 02-02-2010, 01:00 PM   #2
rafalek
Member
 
Registered: Oct 2003
Posts: 43

Original Poster
Rep: Reputation: 15
I resolve it
Every id should be this same even if if they are not joined in sql query
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
my desktop has gone and the background is black and white!! stub32 Linux - Newbie 3 12-22-2008 08:16 AM
Outgoing ftp connection black/white list. khairil Linux - Networking 5 11-16-2006 10:29 PM
M10 TV-Out Black/White Bill Cosby Linux - Software 1 07-31-2005 07:05 PM
black and white video tgkspike Linux - Software 1 05-14-2004 03:12 PM
Picture from TV-out is black and white vasudevadas Linux - Hardware 4 11-19-2003 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration