Zimbra Tips : Blacklist Email Based on Subject

Recently, i am often receive email with subject “me new photo” which is contains spam and fake link. i am try to blacklist sender but still receive that email spam with another sender. Finally i am try to blacklist email by subject and it work’s for me. i am not again receive email with subject “me new photo” even though with random sender. This is what i do on my Zimbra server.
# Create file chandu.cf in spamassassin folder as root

vi /opt/zimbra/data/spamassassin/rules/chandu.cf
Fill with the following example
header     SPAM_BANNED     Subject =~ /me new photo/i
describe   SPAM_BANNED     Subject contains me new photo
score      SPAM_BANNED     40.0
Note : SPAM_BANNED is name of ACL who created. me new photo 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.
# Save and give owner for user and group Zimbra

chown zimbra.zimbra /opt/zimbra/data/spamassassin/rules/chandu.cf
su - zimbra -c "zmamavisdctl restart"

Please try to send email with subject “me new photo” and check on the log
Feb 12 07:35:18 mail amavis[26021]: (26021-01) Blocked SPAM {DiscardedInternal}, ORIGINATING_POST/MYNETS LOCAL [127.0.0.1]:52921 [127.0.0.1] <admin@imanudin.net> -> <admin@imanudin.net>, Queue-ID: 873FF1A4AFC, Message-ID: <562367973.12.1407818118361.JavaMail.zimbra@imanudin.net>, mail_id: PVCoVT9JsO-P, Hits: 40.592, size: 945, 307 ms
Feb 12 07:35:18 mail postfix/smtp[27963]: 873FF1A4AFC: to=<admin@imanudin.net>, relay=127.0.0.1[127.0.0.1]:10032, delay=0.36, delays=0.05/0.01/0.01/0.3, dsn=2.7.0, status=sent (250 2.7.0 Ok, discarded, id=26021-01 - spam)
On my log, i got information Blocked SPAM, value of Hits more/less than 40 and discarded for every email with subject “me now photo” and the subject not case sensitive.

Nhận xét

Bài đăng phổ biến