Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-12-2009, 11:37 PM
Elite Member
 
Posts: 440
Default [SOLVED] how to block mails by subject line

Hi,

Our users keep getting mails which contain subject line start with "Naukri.com" and they want to block these mails.

I have gone through zimbra wiki and below mentioned link which is very useful :

[SOLVED] blocking by subject or by IP

and i have added below high lighted line in /opt/zimbra/conf/postfix_header_checks

/filename=\"?(.*)\.(exe|bat)\"?$/
REJECT For security reasons we reject attachments of this type
/^\s*Content-(Disposition|Type).*name\s*=\s*"?(.+\.(exe|bat))"? \s*$/
REJECT Attachment type not allowed. File "$2" has the unacceptable extension "$3"
/^Subject:.*(Naukri.com)/ REJECT Banned Subject
~


and ran postfix reload and again checked but found that above high lighted line was not there...it was not accepting changes after relaoding postfix...Am i doing anything wrong ??? is this high lighted format is correct or need any changes??

Please help.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 07-12-2009, 11:58 PM
Moderator
 
Posts: 7,928
Default

/opt/zimbra/conf/postfix_header_checks.in and restart ZCS .. or make you life a little simpler a create a SpamAssassin rule. So, under /opt/zimbra/conf/spamassassin create a file called chandu.cf owned by zimbra:zimbra with the following contents
Code:
header     NAUKRI_BAN   Subject =~ /naukri\.com/i
describe   NAUKRI_BAN   Subject contains Naukri.com
score      NAUKRI_BAN   10
You may need to alter the score dependent on what your kill setting is.
__________________
Reply With Quote
  #3 (permalink)  
Old 07-13-2009, 12:40 AM
Elite Member
 
Posts: 440
Default

Hi Uxbod,

Thanks for quick response..As u suggested, i have created .cf file under /opt/zimbra/conf/spamassassin and change the ownership.

My AV setting is as below :

kill percent : 66
Tag percent : 33

Can u pls suggest then wht will be the score for below rule and how to calculate it ?


header NAUKRI_BAN Subject =~ /naukri\.com/i
describe NAUKRI_BAN Subject contains Naukri.com
score NAUKRI_BAN 10


Do we need to restart any (zmantivirusctl or zmantispamctl) service to activate this rule ?


Thanks.
Reply With Quote
  #4 (permalink)  
Old 07-13-2009, 12:51 AM
Moderator
 
Posts: 7,928
Default

That should be fine. zmantispamctl stop and start should pick up the new configuration file.
__________________
Reply With Quote
  #5 (permalink)  
Old 07-13-2009, 03:12 AM
Elite Member
 
Posts: 440
Default

Thanks alot Uxbod...its working ...
Reply With Quote
  #6 (permalink)  
Old 03-09-2012, 08:23 AM
Senior Member
 
Posts: 68
Default Thanks!

This worked for me also, where adding content to the postfix_header_checks did not! :-> Can I add multiple blocks in that xxxx.cf file using the same format?
Thanks!

Last edited by r8escjohn; 03-09-2012 at 11:36 AM..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.