No Spam Score in header /Ubuntu

Discussion in 'ISPConfig 3 Priority Support' started by chico11mbit, Aug 9, 2016.

  1. chico11mbit

    chico11mbit Member

    Hi,
    i set SPAM tag level to -100 in "Non paying" and selected "non-paying" in the "Domain" setting and also in the "Email Mailbox" for that specific email account.

    tag2 is 3 and kill level is 10. "SPAM modifies subject" is Yes.
    Spam subject tag is "No Spam" and tag2 is "***SPAM***.

    when i send me a message to this mailbox from an outside account the subject is not changed and in the mail header there is no Spamscore shown but "X-Virus-Scanned: Debian amavisd-new at server.domain.com".

    What can i do to put the spam score in the emailheader from every received email?

    Mail which trigger tag2 are marked as spam and the score is in the header:
    Code:
    X-Spam-Status: Yes, score=9.396 tagged_above=1 required=4 tests=[BAYES_80=2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_IMAGE_ONLY_20=1.546, HTML_IMAGE_RATIO_02=0.437, HTML_MESSAGE=0.001, HTML_SHORT_LINK_IMG_3=0.148, MPART_ALT_DIFF=0.79, RAZOR2_CF_RANGE_51_100=0.5, RAZOR2_CF_RANGE_E8_51_100=1.886, RAZOR2_CHECK=0.922, RP_MATCHES_RCVD=-0.432, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLACK=1.7] autolearn=no autolearn_force=no
    
    System is Ubuntu.

    Bildschirmfoto-2016-08-09-um-16.53.40.jpg
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This policy is not applied to that mail, you can see that e.g. in the spam tag2 header which says required 4 but in the policy it is 3. There are several possible reasons, e.g. you receive the email trough an alias domain or the mailbox has set a different policy than the domain.
     
  3. chico11mbit

    chico11mbit Member

    Thats right. That was a spam mail from yesterday, where the score was 3. Sorry.
    But the policy of the domain is the same as from the mailbox and it is not an alias domain.
     
    Last edited: Aug 9, 2016
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try to set a higher log level in amavisd.conf (or the amavis 50-user conf file on Debian and Ubuntu), then restart amavis. You will get very detailed information what amavis is doing then in the mail log incl. which policy is used for a specific email.
     
  5. chico11mbit

    chico11mbit Member

    Hi Till,

    after some investigation i found out, that when i set the police in @domain.com and [email protected] to "normal" all run flawlessly and all tags are written.
    when i set it to "non-paying" nothing happens.
    the following log file shows the situation, when i set the policy to "non-paying".

    i set loglevel to 5 restarted amavis and sent me an email from an external account. The policy is loaded successfully, but I can find no hint why the score is not written. Perhaps you could have a look over the amavis log? Would be very nice.
    I changed sender emailadress to [email protected] and receiver emailadress to [email protected].
    Also the IP addresses are changed to XXX....

    Best regards
    Chico

    Code:
    ...
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) lookup_sql([email protected]) matches, result=(id=>"3", sys_userid=>"1", sys_groupid=>"0", sys_perm_user=>"riud", sys_perm_group=>"riud", sys_perm_other=>"r", server_id=>"1", priority=>"5", policy_id=>"1", email=>"[email protected]", fullname=>"[email protected]", local=>"Y", id=>"3", sys_userid=>"1", sys_groupid=>"0", sys_perm_user=>"riud", sys_perm_group=>"riud", sys_perm_other=>"r", policy_name=>"Non-paying", virus_lover=>"N", spam_lover=>"N", banned_files_lover=>"N", bad_header_lover=>"N", bypass_virus_checks=>"N", bypass_spam_checks=>"Y", bypass_banned_checks=>"N", bypass_header_checks=>"N", spam_modifies_subj=>"Y", virus_quarantine_to=>"", spam_quarantine_to=>"", banned_quarantine_to=>"", bad_header_quarantine_to=>"", clean_quarantine_to=>"", other_quarantine_to=>"", spam_tag_level=>"-100", spam_tag2_level=>"3", spam_kill_level=>"10", spam_dsn_cutoff_level=>"0", spam_quarantine_cutoff_level=>"0", addr_extension_virus=>"", addr_extension_spa...
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) ...m=>"", addr_extension_banned=>"", addr_extension_bad_header=>"", warnvirusrecip=>"N", warnbannedrecip=>"N", warnbadhrecip=>"N", newvirus_admin=>"", virus_admin=>"", banned_admin=>"", bad_header_admin=>"", spam_admin=>"", spam_subject_tag=>"", spam_subject_tag2=>"[non paying: ***SPAM***]", message_size_limit=>"0", banned_rulenames=>"", policyd_quota_in=>"-1", policyd_quota_in_period=>"24", policyd_quota_out=>"-1", policyd_quota_out_period=>"24", policyd_greylist=>"N", id=>"3")
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) lookup_sql([email protected]) matches, result=(id=>"9", sys_userid=>"1", sys_groupid=>"0", sys_perm_user=>"riud", sys_perm_group=>"riud", sys_perm_other=>"r", server_id=>"1", priority=>"5", policy_id=>"1", email=>"@MYDOMAIN.com", fullname=>"@MYDOMAIN.com", local=>"Y", id=>"9", sys_userid=>"1", sys_groupid=>"0", sys_perm_user=>"riud", sys_perm_group=>"riud", sys_perm_other=>"r", policy_name=>"Non-paying", virus_lover=>"N", spam_lover=>"N", banned_files_lover=>"N", bad_header_lover=>"N", bypass_virus_checks=>"N", bypass_spam_checks=>"Y", bypass_banned_checks=>"N", bypass_header_checks=>"N", spam_modifies_subj=>"Y", virus_quarantine_to=>"", spam_quarantine_to=>"", banned_quarantine_to=>"", bad_header_quarantine_to=>"", clean_quarantine_to=>"", other_quarantine_to=>"", spam_tag_level=>"-100", spam_tag2_level=>"3", spam_kill_level=>"10", spam_dsn_cutoff_level=>"0", spam_quarantine_cutoff_level=>"0", addr_extension_virus=>"", addr_extension_spam=>"", a...
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) ...ddr_extension_banned=>"", addr_extension_bad_header=>"", warnvirusrecip=>"N", warnbannedrecip=>"N", warnbadhrecip=>"N", newvirus_admin=>"", virus_admin=>"", banned_admin=>"", bad_header_admin=>"", spam_admin=>"", spam_subject_tag=>"", spam_subject_tag2=>"[non paying: ***SPAM***]", message_size_limit=>"0", banned_rulenames=>"", policyd_quota_in=>"-1", policyd_quota_in_period=>"24", policyd_quota_out=>"-1", policyd_quota_out_period=>"24", policyd_greylist=>"N", id=>"9")
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) lookup_sql_field(message_size_limit) rec=0, "[email protected]" result: "0"
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) lookup [message_size_limit] => false, "[email protected]" matches, result="0", matching_key="id=>"3", sys_userid=>"1", sys_groupid=>"0", sys_perm_user=>"riud", sys_perm_group=>"riud", sys_perm_other=>"r", server_id=>"1", priority=>"5", policy_id=>"1", email=>"[email protected]", fullname=>"[email protected]", local=>"Y", id=>"3", sys_userid=>"1", sys_groupid=>"0", sys_perm_user=>"riud", sys_perm_group=>"riud", sys_perm_other=>"r", policy_name=>"Non-paying", virus_lover=>"N", spam_lover=>"N", banned_files_lover=>"N", bad_header_lover=>"N", bypass_virus_checks=>"N", bypass_spam_checks=>"Y", bypass_banned_checks=>"N", bypass_header_checks=>"N", spam_modifies_subj=>"Y", virus_quarantine_to=>"", spam_quarantine_to=>"", banned_quarantine_to=>"", bad_header_quarantine_to=>"", clean_quarantine_to=>"", other_quarantine_to=>"", spam_tag_level=>"-100", spam_tag2_level=>"3", spam_kill_level=>"10", spam_dsn_cutoff_level=>"0", spam_quarantine_cutoff_level=>"0"...
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) ..., addr_extension_virus=>"", addr_extension_spam=>"", addr_extension_banned=>"", addr_extension_bad_header=>"", warnvirusrecip=>"N", warnbannedrecip=>"N", warnbadhrecip=>"N", newvirus_admin=>"", virus_admin=>"", banned_admin=>"", bad_header_admin=>"", spam_admin=>"", spam_subject_tag=>"", spam_subject_tag2=>"[non paying: ***SPAM***]", message_size_limit=>"0", banned_rulenames=>"", policyd_quota_in=>"-1", policyd_quota_in_period=>"24", policyd_quota_out=>"-1", policyd_quota_out_period=>"24", policyd_greylist=>"N", id=>"3""
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) ESMTP> 250 2.1.5 Recipient <[email protected]> OK
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) switch_to_client_time 480 s, smtp response sent
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) idle_proc, 6: was busy, 5.1 ms, total idle 0.000 s, busy 0.011 s
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) idle_proc, 5: was idle, 0.1 ms, total idle 0.001 s, busy 0.011 s
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) ESMTP< DATA\r\n
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) get_deadline switch_to_my_time(rx SMTP DATA) - deadline in 480.0 s, set to 336.000 s
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) prolong_timer switch_to_my_time(rx SMTP DATA): timer 336, was 480, deadline in 480.0 s
    Aug 10 11:20:17 server3 amavis[6016]: (06016-01) ESMTP::10024 /var/lib/amavis/tmp/amavis-20160810T112017-06016-PfceZ30d: <[email protected]> -> <[email protected]> SIZE=3328 [email protected] Received: from server3.MYDOMAIN.com ([127.0.0.1]) by localhost (server3.MYDOMAIN.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <[email protected]>; Wed, 10 Aug 2016 11:20:17 +0200 (CEST)
    
    ...
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Compare all settings of the normal and non-paying policy in ispconfig. The non-paying policy is configured to not filter spam by default, so you might have to reconfigure it if you want it to filter spam, see especially the checkboxes on the first tab of the policy settings.
     
  7. chico11mbit

    chico11mbit Member

    Hmm, that's weird.
    These are the settings. But it is no problem anymore. I created a new policy named "restricted" with the same settings like Non-paying and all is ok.

    Bildschirmfoto 2016-08-11 um 09.54.03.png
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    That's strange indeed. The policies exist only in the database and ispconfig shows the values from the database directly, so there should be no possibility that changes have not been applied somehow.
     
  9. chico11mbit

    chico11mbit Member

    i know :)) very strange. and the protocol said, that the policy is the right one from ispconfig via mysql...

    I think i will create a complete new Non-paying with the values from the old one and will test it today...
     

Share This Page