Skip to main content

Configure SpamAssassin to block outgoing form mail

Comments

11 comments

  • cPanelLauren
    Hi @John Manning There are actually two assigned spam scores, one when you receive the email locally and one that is assigned to it when it's scanned outbound. In this case Spam Score: X-Spam-Score: 100 refers to the score assigned on delivery to the server. The score that is being assigned to the server when it is sent is the Outgoing Spam Score which in this case is below the threshold of 2: X-Outgoing-Spam-Status: No, score=1.7 So with a spam score of 1.7 SpamAssassin isn't seeing this email as spam and sends it. Thank you,
    0
  • jnyr5478
    For some reason I can't edit my original post, but just wanted to mention that
    0
  • jnyr5478
    Hi @John Manning There are actually two assigned spam scores, one when you receive the email locally and one that is assigned to it when it's scanned outbound. In this case Spam Score: X-Spam-Score: 100 refers to the score assigned on delivery to the server. The score that is being assigned to the server when it is sent is the Outgoing Spam Score which in this case is below the threshold of 2: X-Outgoing-Spam-Status: No, score=1.7 So with a spam score of 1.7 SpamAssassin isn't seeing this email as spam and sends it. Thank you,

    Thanks @cPanelLauren. Somehow, all of the email that I'm receiving from this contact form has the same X-Outgoing-Spam-Status score of 1.7. I have submitted tests that have been scored 1.7. Legitimate submissions from other users have also received a 1.7. Even the emails that are very obviously spam have all received a 1.7. Does this have to do with the "Enable the Apache SpamAssassin" ruleset that cPanel uses on cpanel.net" setting? It's currently set to On (default).
    0
  • cPanelLauren
    That's ok! Thank you for linking it. The Outgoing Spam Score in this case still remains below the threshold of the outbound scan which you've set to 2 :
    • Scan outgoing messages for spam and reject based on defined Apache SpamAssassin score - 2
    • Do not forward mail to external recipients based on the defined Apache SpamAssassin score - 2

    Thank you,
    0
  • cPanelLauren
    [QUOTE] Somehow, all of the email that I'm receiving from this contact form has the same X-Outgoing-Spam-Status score of 1.7. I have submitted tests that have been scored 1.7. Legitimate submissions from other users have also received a 1.7. Even the emails that are very obviously spam have all received a 1.7.
    That's curious, have you tested sending a spam test like SpamAssassin: The GTUBE Thank you,
    0
  • jnyr5478
    That's curious, have you tested sending a spam test like
    0
  • cPanelLauren
    Hi @John Manning Can you check /var/log/exim_mainlog (you'd need to access via CLI) to see if it was sent? My assumption is that the spam score was flagged as being high and the mail was rejected. Thank you,
    0
  • jnyr5478
    I think this is the appropriate line: 2018-04-13 13:11:10 1f72EA-0005qm-57 F= rejected by non-SMTP ACL: "SpamAssassin as cpaneleximscanner detected OUTGOING not smtp message as spam (1001.7/20)"
    0
  • cPanelLauren
    Hi @John Manning So this confirms that SpamAssassin is rejecting outbound spam mail if it meets the necessary criteria. The preferences for this are stored in the following: # cat /var/cpanel/userhomes/cpaneleximscanner/.spamassassin/user_prefs skip_rbl_checks 1 # No need to check our authenticated senders to see if they are in an # an RBL as they likely will be. We only care about RBLS for incoming # spam scanning. internal_networks 0/0 # We treat all authenticated senders as internal because the ip checks # are likely useless for outbound spam scanning.
    You could potentially add rules/directives here in the, in the same manner you would for one of your users Thank you,
    0
  • jnyr5478
    I'm surprised that I might need to manually update preferences. I've attached a screenshot of a spam email that made it past SA with an X-Outgoing-Spam-Status of 1.7. Are the default rules really not able to determine that this is spam?
    0
  • cPanelLauren
    Because it's a customization (outbound spam scanning) as opposed to the inbound scanning, the same interface doesn't exist. I would strongly urge you to open a feature request using the link in my signature if further customization options for outbound spam scanning is something you'd like to see in the product. Once you open the feature request please link it here so that we can see/vote/track the progress of it! Thank you,
    0

Please sign in to leave a comment.