Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 31st December 2011, 16:42
djkoelkast djkoelkast is offline
Member
 
Join Date: Sep 2006
Posts: 63
Thanks: 1
Thanked 1 Time in 1 Post
Default How to reject spam?

I've installed ISPConfig 3 with dovecot like on howtoforge.
It works all very nice, but I can't get the spam rejection working.

It only tags mails ***SPAM***
but I changed it to tag: [[SPAM]], it just doesn't
Also rejection does not work. What am I doing wrong?

My /etc/amavis/conf.d/50-user is:

Code:
use strict;

#
# Place your configuration directives here.  They will override those in
# earlier files.
#
# See /usr/share/doc/amavisd-new/ for documentation and examples of
# the directives you can use in this file
#

@bypass_virus_checks_maps = (
   \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);

@bypass_spam_checks_maps = (
   \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);

#   
# Database connection settings
#

@lookup_sql_dsn =
   ( ['DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306', 'ispconfig', 'df750c165bef0e83b1b067bbe4fe2f7f'] );

# @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
#$sql_select_policy = 'SELECT "Y" as local FROM mail_domain WHERE CONCAT("@",domain) IN (%k)';
# $banned_files_quarantine_method = 'sql';
# $spam_quarantine_method         = 'sql';

#
# SQL Select statements
#

$sql_select_policy =
   'SELECT *,spamfilter_users.id'.
   ' FROM spamfilter_users LEFT JOIN spamfilter_policy ON spamfilter_users.policy_id=spamfilter_policy.id'.
   ' WHERE spamfilter_users.email IN (%k) ORDER BY spamfilter_users.priority DESC';


$sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'.
    ' WHERE (spamfilter_wblist.rid=?) AND (spamfilter_wblist.email IN (%k))' .
    ' ORDER BY spamfilter_wblist.priority DESC';

#
# Quarantine settings
#

$final_virus_destiny = D_REJECT;
$final_spam_destiny = D_REJECT;
$final_banned_destiny = D_REJECT;
$final_bad_header_destiny = D_PASS;

# Default settings, we st this very high to not filter aut emails accidently
$sa_spam_subject_tag = '[[SPAM]] ';
$sa_tag_level_deflt  = 5;  # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 6; # add 'spam detected' headers at that level
$sa_kill_level_deflt = 6; # triggers spam evasive actions
$sa_dsn_cutoff_level = 9;   # spam level beyond which a DSN is not sent

#
# Disable spam and virus notifications for the admin user.
# Can be overridden by the policies in mysql
#

$virus_admin = undef;
$spam_admin = undef;


#
# Enable Logging
#

$DO_SYSLOG = 1;
$LOGFILE = "/var/log/amavis.log";  # (defaults to empty, no log)

# Set the log_level to 5 for debugging
$log_level = 1;                # (defaults to 0)


#------------ Do not modify anything below this line -------------
1;  # insure a defined return
I restarted amavis, still it tags: ***SPAM*** and does not reject.
Although I put log_level to 1 it does not log (or is there only 0 and 5).

Any help would be great, I get a huge amount of spam.
Reply With Quote
Sponsored Links
  #2  
Old 4th January 2012, 00:51
madsage madsage is offline
Junior Member
 
Join Date: Sep 2011
Posts: 25
Thanks: 3
Thanked 3 Times in 2 Posts
Default

I too am experiencing the same issue.


and have set 50-user to D_REJECT

Still my clients are receiving email marked ***SPAM***


also, i find no /var/log/amavis.log as per the 50-user in /etc/amavis/conf.d
I touched one and chowned it to amavis, also tunred debug level to 5 in 50-user, nothing output.


EDIT:
Fixed logging. you have to set;
$DO_SYSLOG = 0
$LOGFILE = "/var/log/amavis.log"
$log_level = 5

I guess its either syslog or logfile, not both. so turn off syslog if you want amavis.log



I'm waiting on spam now. to see if it rejects

madsage
3.0.4.1 on debian-6 x64 multiserver

Last edited by madsage; 4th January 2012 at 01:46.
Reply With Quote
  #3  
Old 4th January 2012, 18:17
madsage madsage is offline
Junior Member
 
Join Date: Sep 2011
Posts: 25
Thanks: 3
Thanked 3 Times in 2 Posts
Default

Mine seems to have quit passing emails marked ***SPAM*** now.

Changing the /etc/amavis/conf.d/user-50 to $final_spam_destiny = D_REJECT;
Seems to have resolved this issue, Also I set the users spam level to trigger happy. (I assume this just changes the spam score to a more sensitive threshold?)

madsage
Reply With Quote
  #4  
Old 4th January 2012, 18:28
djkoelkast djkoelkast is offline
Member
 
Join Date: Sep 2006
Posts: 63
Thanks: 1
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by madsage View Post
Mine seems to have quit passing emails marked ***SPAM*** now.

Changing the /etc/amavis/conf.d/user-50 to $final_spam_destiny = D_REJECT;
Seems to have resolved this issue, Also I set the users spam level to trigger happy. (I assume this just changes the spam score to a more sensitive threshold?)

madsage
I already did (please see my config file, it's there).
Also: I changed it to [[SPAM]] but it still uses ***SPAM*** so it seems to ignore this all together.
Reply With Quote
  #5  
Old 4th January 2012, 18:36
madsage madsage is offline
Junior Member
 
Join Date: Sep 2011
Posts: 25
Thanks: 3
Thanked 3 Times in 2 Posts
Default

weird, it seems like your is not parsing the user-50. possibly..
i was able to confirm my by turning syslog to 0;
and touching the logfile for amavis in the second line.

you sure you are using amavis-ng? or maybe the old version.

madsage
Reply With Quote
  #6  
Old 4th January 2012, 19:15
djkoelkast djkoelkast is offline
Member
 
Join Date: Sep 2006
Posts: 63
Thanks: 1
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by madsage View Post
weird, it seems like your is not parsing the user-50. possibly..
i was able to confirm my by turning syslog to 0;
and touching the logfile for amavis in the second line.

you sure you are using amavis-ng? or maybe the old version.

madsage
I can't tell you, how van I check the version? I installed ISPConfig 3 through the howto and for as far as I know everything is the latest version.
Could it be because I don't use courier but dovecot in stead?
Reply With Quote
  #7  
Old 17th January 2012, 10:19
nveid nveid is offline
Member
 
Join Date: Jan 2006
Location: Daytona Beach, FL
Posts: 87
Thanks: 7
Thanked 17 Times in 14 Posts
Send a message via Yahoo to nveid Send a message via Skype™ to nveid
Default

This might not completely answer your question.. But this is how I manage reject spam..

Subscribe to some RBL's

There may be better setups, but this works form.. I reject based upon RBL listing, invalid RDNS, non-fqdn, among other things. works great,

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unknown_client, reject_unauth_destination, reject_rhsbl_client blackhole.securitysage.com, reject_rhsbl_sender blackhole.securitysage.com, reject_rbl_client relays.ordb.org, reject_rbl_client blackholes.easynet.nl, reject_rbl_client cbl.abuseat.org, reject_rbl_client proxies.blackholes.wirehub.net, reject_rbl_client bl.spamcop.net, reject_rbl_client sbl.spamhaus.org, reject_rbl_client opm.blitzed.org,
reject_rbl_client dnsbl.njabl.org,
reject_rbl_client list.dsbl.org ,
reject_rbl_client multihop.dsbl.org,
check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf
__________________
-- RLB

Last edited by nveid; 17th January 2012 at 10:41.
Reply With Quote
  #8  
Old 17th January 2012, 11:56
djkoelkast djkoelkast is offline
Member
 
Join Date: Sep 2006
Posts: 63
Thanks: 1
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by nveid View Post
This might not completely answer your question.. But this is how I manage reject spam..

Subscribe to some RBL's

There may be better setups, but this works form.. I reject based upon RBL listing, invalid RDNS, non-fqdn, among other things. works great,

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unknown_client, reject_unauth_destination, reject_rhsbl_client blackhole.securitysage.com, reject_rhsbl_sender blackhole.securitysage.com, reject_rbl_client relays.ordb.org, reject_rbl_client blackholes.easynet.nl, reject_rbl_client cbl.abuseat.org, reject_rbl_client proxies.blackholes.wirehub.net, reject_rbl_client bl.spamcop.net, reject_rbl_client sbl.spamhaus.org, reject_rbl_client opm.blitzed.org,
reject_rbl_client dnsbl.njabl.org,
reject_rbl_client list.dsbl.org ,
reject_rbl_client multihop.dsbl.org,
check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf
My spam *tagging* works fine, so it does detect spam, I have had no false positives whatsoever. I just want to reject them in stead of tagging and I can't find where, it's not on the normal places.
Reply With Quote
  #9  
Old 17th January 2012, 18:54
radim_h radim_h is offline
Senior Member
 
Join Date: Jan 2007
Location: Prague, Czech
Posts: 426
Thanks: 34
Thanked 26 Times in 21 Posts
Send a message via ICQ to radim_h
Default

In ISPConfig go to the menu
Email=>Email Mailbox=>then click on mailbox=>then click on Mail Filter=>Then check the checkbox =>Move Spam Emails to Junk directory

Last edited by radim_h; 17th January 2012 at 18:57.
Reply With Quote
  #10  
Old 17th January 2012, 19:04
djkoelkast djkoelkast is offline
Member
 
Join Date: Sep 2006
Posts: 63
Thanks: 1
Thanked 1 Time in 1 Post
 
Default

Quote:
Originally Posted by radim_h View Post
In ISPConfig go to the menu
Email=>Email Mailbox=>then click on mailbox=>then click on Mail Filter=>Then check the checkbox =>Move Spam Emails to Junk directory
That's per mailbox, I'd like to have it done server wide, so globally reject all spam. It should be able to configure this.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: Implement iptables blocking by Country drewb0y Tips/Tricks/Mods 16 5th October 2013 01:07
ISPCONFIG 3 Email Content Filter jariasca Installation/Configuration 11 2nd August 2012 13:27
IPSCoonfig is not avaliable after few hours server has been rebooted emanation Installation/Configuration 11 20th September 2011 13:22
Spamfilter policy - question about spam actions prisfeo Installation/Configuration 4 2nd February 2010 17:17
Ubuntu 8.04 Spamsnake - all SA scores 0.00 Thomas_Powers HOWTO-Related Questions 23 24th June 2008 18:37


All times are GMT +2. The time now is 02:59.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.