Results 1 to 7 of 7

Thread: [SOLVED] how to block mails by subject line

  1. #1
    Join Date
    Dec 2007
    Posts
    445
    Rep Power
    7

    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 :

    http://www.zimbra.com/forums/adminis...ubject-ip.html

    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.

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    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.

  3. #3
    Join Date
    Dec 2007
    Posts
    445
    Rep Power
    7

    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.

  4. #4
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    That should be fine. zmantispamctl stop and start should pick up the new configuration file.

  5. #5
    Join Date
    Dec 2007
    Posts
    445
    Rep Power
    7

    Default

    Thanks alot Uxbod...its working ...

  6. #6
    Join Date
    Jan 2008
    Location
    Columbia City IN
    Posts
    68
    Rep Power
    7

    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 12:36 PM.

  7. #7
    Join Date
    May 2007
    Posts
    23
    Rep Power
    8

    Default

    I would also like to know if I can add multiple rules in a single .cf file?

Similar Threads

  1. Replies: 4
    Last Post: 07-13-2009, 01:16 PM
  2. Firewall rules
    By rmvg in forum Installation
    Replies: 16
    Last Post: 09-04-2007, 03:20 PM
  3. Spam training problem...
    By TaskMaster in forum Installation
    Replies: 2
    Last Post: 05-08-2007, 10:49 AM
  4. Replies: 18
    Last Post: 03-20-2006, 02:22 PM
  5. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 01:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •