User Tools

Site Tools


internet:mail:mailcleaner_customize

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
internet:mail:mailcleaner_customize [2021/12/07 08:23]
gcooper
internet:mail:mailcleaner_customize [2024/01/09 09:12] (current)
gcooper
Line 6: Line 6:
  
 **Read This**: https://victorlclopes.medium.com/how-to-manage-and-customize-mailcleaner-2020-01-c13bbae12745 **Read This**: https://victorlclopes.medium.com/how-to-manage-and-customize-mailcleaner-2020-01-c13bbae12745
 +
 +**Default Settings**: https://www.mailcleaner.net/antispam/demo.html
  
 ===== InfoBox ===== ===== InfoBox =====
Line 12: Line 14:
  
 https://support.mailcleaner.net/boards/3/topics/48 https://support.mailcleaner.net/boards/3/topics/48
- 
-===== Customize SpamAssassin ===== 
- 
-<file> 
-vim /usr/mailcleaner/share/spamassassin/99_custom_rules_scores.cf 
-</file> 
- 
-===== Test Custom Rules ===== 
- 
-<file> 
-/usr/local/bin/spamassassin --siteconfigpath=/usr/mailcleaner/share/spamassassin/ -t -d < spam_sharepoint.eml 
-</file> 
  
 ===== Admin Web GUI ===== ===== Admin Web GUI =====
Line 70: Line 60:
   * ''login.css''   * ''login.css''
   * ''navigation.css''   * ''navigation.css''
 +
 +===== Freemail Domains =====
 +
 +It's probably best to blacklist them.
  
 ===== SpamC Score ===== ===== SpamC Score =====
Line 90: Line 84:
  
 https://support.mailcleaner.net/projects/support-user/wiki/SPF_Sender_Policy_Framework https://support.mailcleaner.net/projects/support-user/wiki/SPF_Sender_Policy_Framework
 +
 +https://support.mailcleaner.net/boards/3/topics/64-spf-configuration
  
 You can adjust the SPF rule ''MC_SPF_SOFTFAIL'' by adding points or reducing points. You can adjust the SPF rule ''MC_SPF_SOFTFAIL'' by adding points or reducing points.
  
 **Configuration -> Domains -> domain.tld -> SpamC rules adjustments** **Configuration -> Domains -> domain.tld -> SpamC rules adjustments**
 +
 +===== Customize SpamAssassin =====
 +
 +<note tip>Copy customized rules to Mailcleaner cluster members.</note>
 +
 +<note tip>Using the MailCleaner Admin web interface, **restart the Filtering Engine service** after making rule modifications.
 +</note>
 +
 +<file>
 +vim /usr/mailcleaner/share/spamassassin/99_custom_rules_scores.cf
 +</file>
 +
 +==== Test Custom Rules ====
 +
 +<file>
 +/usr/local/bin/spamassassin --siteconfigpath=/usr/mailcleaner/share/spamassassin/ -t -d < spam_sharepoint.eml
 +</file>
 +
 +==== 99_custom_rules_sharepointonline.cf ====
 +
 +/usr/mailcleaner/share/spamassassin/99_custom_rules_sharepointonline.cf
 +
 +FIXME I added sharepointonline.com as a freemail domain and added many points, so I changed this score to zero.
 +
 +<file>
 +describe SENT_FROM_SHAREPOINT Add points to messages from sharepointonline.com
 +header   SENT_FROM_SHAREPOINT From:addr =~ /no-reply\@sharepointonline\.com$/i
 +score    SENT_FROM_SHAREPOINT 2.0
 +</file>
 +
 +==== 99_custom_rules_scores.cf ====
 +
 +/usr/mailcleaner/share/spamassassin/99_custom_rules_scores.cf
 +
 +<file>
 +score    DCC_CHECK       1.5
 +score    ARC_SIGNED      0.001
 +score    KHOP_BIG_TO_CC  2.0
 +score    RCVD_IN_UCEPROTECT3  1.0
 +
 +score    FREEMAIL_FROM   3.5
 +score    FREEMAIL_ENVFROM_END_DIGIT  1.0
 +score    FREEMAIL_REPLYTO_END_DIGIT  1.0
 +score    FREEMAIL_FORGED_REPLYTO  3.5
 +score    FREEMAIL_REPLYTO  3.5
 +score    FREEMAIL_REPLY  3.5
 +score    MC_MANY_FREEMAIL_RCPT  3.5
 +
 +rawbody   GOOGLE_APIS   /https?:\/\/storage\.googleapis\.com/i
 +score     GOOGLE_APIS   3.0
 +describe  GOOGLE_APIS   Has a hyperlink that points to Google APIs
 +
 +header    DOMAIN_NUM    From =~ /\@.*\d.*\d.*/
 +score     DOMAIN_NUM    2.0
 +describe  DOMAIN_NUM    Domain name has 2 or more numbers
 +
 +header    LONG_SUBJECT  Subject =~ /.{120,}/
 +score     LONG_SUBJECT  2.0
 +describe  LONG_SUBJECT  Subject line is very long
 +
 +header    EMPTY_SUBJECT Subject =~ /^$/
 +score     EMPTY_SUBJECT 1.5
 +describe  EMPTY_SUBJECT Subject header exists but is empty
 +
 +header    ONMICROSOFT_FROM From =~ /onmicrosoft\.com/i
 +score     ONMICROSOFT_FROM 3.0
 +describe  ONMICROSOFT_FROM From header contains onmicrosoft.com domain
 +</file>
internet/mail/mailcleaner_customize.1638890624.txt.gz · Last modified: 2021/12/07 08:23 by gcooper