Results 1 to 10 of 10

Thread: filter attachment problem

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Posts
    27
    Rep Power
    7

    Red face filter attachment problem



    Hello, everybody:

    I have a problem now;

    That I want reject some mails by attachment filename;

    Like if I receive a mail , and the mail have an attachment named test.zip;

    So I want whether have a way to set the specially attachment name to reject this email..


    Please help me a lot! Thank you very much.

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

    Default

    It would help if we new which version of ZCS you were running
    Code:
    su - zimbra
    zmcontrol -v
    well you could use just a normal filter in the web client and when it matches move it to the Junk folder. Or, you could create a SpamAssassin rule which would match the filename and then assign it a very high score. Or another would be to get Postfix to reject it using MIME header checks. Which do you fancy trying ?

  3. #3
    Join Date
    Mar 2008
    Posts
    27
    Rep Power
    7

    Default

    thank you very much for your replay....:-)

    When I perform "zmcontrol -v";It return :

    Release 5.0.7_GA_2444.RHEL5_20080626020941 RHEL5 FOSS edition.


    For your way ,I think like this :

    1、web client : It can only set with or without,and can't set by attachment filename;
    2、SpamAssassin : I also test,But result is not very well;
    3、Postfix : I set like this :

    main.cf:
    nested_header_checks = pcre:/etc/postfix/nested_header_checks

    $cat /etc/postfix/nested_header_checks
    /filename\=\"postcard\.zip\"/ REJECT

    But result is also not very well..

    My English is so-so..

    whether or no thank you very much...

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

    Default

    For Postfix it would be better to do something like :-

    Code:
    vi main.cf
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    $ cat /etc/postfix/mime_header_checks
    /name=[^>]postcard\.zip / REJECT
    Then restart Postfix

  5. #5
    Join Date
    Mar 2008
    Posts
    27
    Rep Power
    7

    Default

    Thank you very much ,I will try it ,Hope it can be well..


    :-)

  6. #6
    Join Date
    Mar 2008
    Posts
    27
    Rep Power
    7

    Default

    I try it ,But I am very sorry to tell you it doesn't work yet...

  7. #7
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    When you restart ZCS after making the changes ensure that main.cf is not being overwritten! Does anything get logged to /var/log/zimbra.log ?

  8. #8
    Join Date
    Mar 2008
    Posts
    27
    Rep Power
    7

    Default

    I make the changes in main.cf ,and then "postfix reload";It not being overwritten.

    /var/log/zimbra.log:

    Oct 16 16:27:37 mail amavis[15733]: (15733-17) Passed CLEAN, [119.147.10.226] [119.147.10.226] <test@qq.com> -> <hehe@domain.com>, Message-ID: <tencent_2B53ABDB2AA534E768E48662@qq.com>, mail_id: XJfZ-zZQkOdJ, Hits: -, size: 814850, queued_as: 6A90027E618, 455 ms
    Oct 16 16:27:37 mail postfix/smtp[30134]: 7934C27DE9F: to=<hehe@domain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=6.3, delays=5.8/0/0/0.46, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6A90027E618)
    Oct 16 16:27:37 mail postfix/qmgr[26601]: 7934C27DE9F: removed
    Oct 16 16:27:37 mail postfix/lmtp[1028]: 6A90027E618: to=<hehe@domain.com>, relay=mail.domain.com[10.10.10.234]:7025, delay=0.36, delays=0.04/0/0/0.32, dsn=2.1.5, status=sent (250 2.1.5 OK)
    Oct 16 16:27:37 mail postfix/qmgr[26601]: 6A90027E618: removed


    Over!

  9. #9
    Join Date
    Mar 2008
    Posts
    27
    Rep Power
    7

    Default

    Thank you very much ,I am very Happy ,Because when I try agian ,It works very well.

    Like this :
    vi main.cf
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    $ cat /etc/postfix/mime_header_checks
    /name=[^>]postcard\.zip/ REJECT
    (Not "/name=[^>]postcard\.zip / REJECT";Only a blank problem)
    Then restart Postfix

    Thank you again..

  10. #10
    Join Date
    Mar 2008
    Posts
    27
    Rep Power
    7

    Default

    But Now I have another problem,That if my filename is chinese,How can I do to reject this emails??

    Thank you .

Similar Threads

  1. Attachment problem
    By zzzzsg in forum Administrators
    Replies: 4
    Last Post: 08-28-2008, 06:35 AM
  2. Is spam filter having the problem in zimbra 5?
    By zibra in forum Administrators
    Replies: 1
    Last Post: 06-11-2008, 05:21 AM
  3. Replies: 0
    Last Post: 03-26-2007, 03:12 AM
  4. Filter problem with relay host
    By sdgeek in forum Installation
    Replies: 2
    Last Post: 03-19-2007, 06:07 PM
  5. Message forwarded as attachment problem
    By wildstyle in forum Users
    Replies: 13
    Last Post: 06-20-2006, 04:26 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
  •