Difference between revisions of "Block mailsby Subject"

(Created page with "{{BC|Community Sandbox}} __FORCETOC__ <div class="col-md-12 ibox-content"> =How to block mails by subjects?= {{KB|{{Unsupported}}|{{ZCS 9.0}}|{{ZCS 8.0}}|}} {{WIP}} ===Overvi...")
 
(How to block mails by subjects?)
 
(3 intermediate revisions by the same user not shown)
Line 12: Line 12:
 
===Solution===
 
===Solution===
  
Create file example.cf in spamassassin folder as root
+
Create file example.cf in spamassassin folder as root
 +
 
 
<pre>
 
<pre>
 
vi /opt/zimbra/data/spamassassin/rules/example.cf
 
vi /opt/zimbra/data/spamassassin/rules/example.cf
Line 24: Line 25:
 
</pre>
 
</pre>
  
<pre>Note</pre> : SPAM_BANNED is name of ACL who created. subjectname is subject who want to blacklisted and score 40.0 is score who given if subject meet with the ACL.
+
'''Note''': SPAM_BANNED is name of ACL who created. subjectname is subject who want to blacklisted and score 40.0 is score who given if subject meet with the ACL.
If you want to create blacklist to other word/subject, don’t use the same name of ACL and create another ACL name.( Test this tests on test server first)
+
To blacklist to other word/subject, don’t use the same name of ACL and create another ACL name.
  
 
Save and give owner for user and group Zimbra and restart antispam service
 
Save and give owner for user and group Zimbra and restart antispam service

Latest revision as of 13:52, 19 October 2021

How to block mails by subjects?

   KB 24368        Last updated on 2021-10-19  




0.00
(0 votes)


Overview

Often there are spam attacks where mails are based on subjects that contain certain structures or words. Below steps can be followed to blacklist such mails having a common subject.

Solution

Create file example.cf in spamassassin folder as root

vi /opt/zimbra/data/spamassassin/rules/example.cf

Fill with the following example

header     SPAM_BANNED     Subject =~ /subjectname/i
describe   SPAM_BANNED     Subject contains subjectname
score      SPAM_BANNED     40.0

Note: SPAM_BANNED is name of ACL who created. subjectname is subject who want to blacklisted and score 40.0 is score who given if subject meet with the ACL. To blacklist to other word/subject, don’t use the same name of ACL and create another ACL name.

Save and give owner for user and group Zimbra and restart antispam service

chown zimbra.zimbra /opt/zimbra/data/spamassassin/rules/example.cf
zmantispamctl restart 
Jump to: navigation, search