Spam not going to quarantine email address

Discussion in 'ISPConfig 3 Priority Support' started by xrstokes, Mar 7, 2017.

  1. xrstokes

    xrstokes Member

    Can someone please help me. I've set the quarantine email address, but spam is not getting sent to the email address I put in there. everything else about my setup seems to work perfectly except for this feature. The mailbox can send and receive fine. but when I use GTUBE test spam. it is just tagged as ***SPAM*** but no copy or message is sent to quarantine. if I set the kill lower it doesn't go to quarantine either.

    I've tried for days to get it to work. the address is in the database correctly next to "spam_quarantine_to" I'm not sure if it should be like this "spam/@stotech.com.au" But that doesn't seem to fix it anyway.

    the conf files include these lines, most of which I've tried changing.
    Code:
    $QUARANTINEDIR = "$MYHOME/virusmails";
    $quarantine_subdir_levels = 1; # enable quarantine dir hashing
    
    
    $unix_socketname = "/var/lib/amavis/amavisd.sock";
    $interface_policy{'SOCK'} = 'AM.PDP-SOCK';
    $policy_bank{'AM.PDP-SOCK'} = {
      protocol => 'AM.PDP',
      auth_required_release => 0, # don't require secret-id for release
    };
    
    # @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)) AND (spamfilter_wblist.active="y")' .
      ' ORDER BY spamfilter_wblist.priority DESC';
    #
    # Quarantine settings
    #
    $final_virus_destiny = D_BOUNCE;
    $final_spam_destiny = D_DISCARD;
    $final_banned_destiny = D_BOUNCE;
    $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  = 20.0;  # add spam info headers if at, or above that level
    $sa_tag2_level_deflt = 60.0; # add 'spam detected' headers at that level
    $sa_kill_level_deflt = 60.0; # triggers spam evasive actions
    $sa_dsn_cutoff_level = 100;  # 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 = 0;  # (defaults to 0)
    $inet_socket_port = [10024,10026];
    # :* = send to incoming Port + 1
    $forward_method = 'smtp:127.0.0.1:*';
    $notify_method = 'smtp:127.0.0.1:*';
    $interface_policy{'10026'} = 'ORIGINATING';
    $policy_bank{'ORIGINATING'} = {
      originating => 1,
      smtpd_discard_ehlo_keywords => ['8BITMIME'],
    };
    # IP-Addresses for internal networks => load policy MYNETS
    # - requires -o smtp_send_xforward_command=yes in postfix master.cf
    @mynetworks = qw(0.0.0.0/8 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 [::1] [FE80::]/10 [FEC0::]/10);
    # Allow SMTP access from IPs in @inet_acl to amvisd SMTP Port
    @inet_acl = qw( 127.0.0.1 [::1] 192.168.0.0/16 );
     
    Here is the log.
    Code:
    Mar  6 21:33:22 ispc postfix/smtpd[8422]: connect from mail-qk0-f179.google.com[209.85.220.179]
    Mar  6 21:33:23 ispc postfix/smtpd[8422]: NOQUEUE: filter: RCPT from mail-qk0-f179.google.com[209.85.220.179]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-qk0-f179.google.com>
    Mar  6 21:33:23 ispc postfix/smtpd[8422]: NOQUEUE: filter: RCPT from mail-qk0-f179.google.com[209.85.220.179]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10024; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-qk0-f179.google.com>
    Mar  6 21:33:23 ispc postfix/smtpd[8422]: 75BBA1832FD: client=mail-qk0-f179.google.com[209.85.220.179]
    Mar  6 21:33:23 ispc postfix/cleanup[8430]: 75BBA1832FD: message-id=<CAJ95apcAOYDvN9FNygFWBrNqdDc=V7WQK3FDYEgo7_ru5BLmoQ@mail.gmail.com>
    Mar  6 21:33:23 ispc postfix/qmgr[1181]: 75BBA1832FD: from=<[email protected]>, size=3517, nrcpt=1 (queue active)
    Mar  6 21:33:23 ispc postfix/smtpd[8422]: disconnect from mail-qk0-f179.google.com[209.85.220.179]
    Mar  6 21:33:24 ispc amavis[8398]: (08398-01) Blocked SPAM {DiscardedInbound}, [209.85.220.179]:34847 [209.85.220.179] <[email protected]> -> <[email protected]>, Queue-ID: 75BBA1832FD, Message-ID: <CAJ95apcAOYDvN9FNygFWBrNqdDc=V7WQK3FDYEgo7_ru5BLmoQ@mail.gmail.com>, mail_id: vsfQwenIfcZ8, Hits: 999.882, size: 3517, dkim_sd=20161025:gmail.com, 561 ms
    Mar  6 21:33:24 ispc postfix/smtp[8431]: 75BBA1832FD: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.98, delays=0.38/0.03/0.01/0.55, dsn=2.7.0, status=sent (250 2.7.0 Ok, discarded, id=08398-01 - spam)
    Mar  6 21:33:24 ispc postfix/qmgr[1181]: 75BBA1832FD: removed
     
     

    Attached Files:

  2. xrstokes

    xrstokes Member

    fixed it...
    Added these three lines into 50-user, I did a lot of things else it might have been. but i'm pretty sure it was this.
    Code:
    $banned_files_quarantine_method = 'smtp:localhost:10025';
    $spam_quarantine_method = 'smtp:localhost:10025';
    $bad_header_quarantine_method = 'smtp:localhost:10025';
    
     
    till likes this.
  3. helmo

    helmo Member HowtoForge Supporter

    Adding that didn't help for me. I still see 'amavis[9252]: (09252-19) Blocked SPAM {DiscardedInbound},' in the log.

    Did you also change the $final_spam_destiny?
     

Share This Page