Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, Is it possible strip attachment from a list of users and allow rest of the users to sned attachment in postfix. The stripped attachment should be moved to some ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2006
    Posts
    1

    Postfix attachment filter


    Hi,

    Is it possible strip attachment from a list of users and allow rest of the users to sned attachment in postfix. The stripped attachment should be moved to some location.

    If not postfix is there any other tools that help in doing so. Please help me.

    Sanjux

  2. #2
    Linux User
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    326
    I currently block certain attachments in postfix, but it's a global settign. I do not quarentine them.

    amavis can do it on an individaul or group basis but it's geared towards viruses, not sure if you can tell it to block word docs for instance for specific users.. maybe you can ... http://www.ijs.si/software/amavisd/


    anomy sanitizer is another package that works with postfix that has quarantine capabilities..
    http://mailtools.anomy.net/


    not sure if those will do exactly what you are looking for but it's a place to start.
    far...out

  3. #3
    Just Joined!
    Join Date
    Jun 2006
    Location
    Toronto, Canada
    Posts
    1

    Cool

    You mentioned that you have a global setting to shred attachments in postfix. Can you share the wisdom on how its done?


    Thanks!



    -igor

  4. #4
    Linux User
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    326
    entry in the main.cf
    mime_header_checks = regexp:/etc/postfix/mime_header_checks.regexp


    FILE: mime_header_checks.regexp
    Code:
    /^\s*Content-(Disposition|Type).*name\s*=\s*"?(.+\.(lnk|asd|hlp|ocx|reg|bat|c[ho]m|cmd|exe|dll|vxd|pif|scr|hta|jse?|sh[mbs]|vb[esx]|ws[fh]|wav|mov|wmf|xl))"?\s*$/
       REJECT Attachment type not allowed. File "$2" has the unacceptable extension "$3"
    That will reject any file with any of those windows executable extensions..
    If nothing else it's a good start..
    far...out

  5. #5
    Just Joined!
    Join Date
    Sep 2004
    Posts
    4
    Is there anyway use that regex listed above but exclude one address?

  6. #6
    Just Joined!
    Join Date
    Jan 2007
    Posts
    1

    how to analyze contents embedded within attachments

    stopping attachment type like .exe and .vbs is possible by this regexp. But how do we stop attachments containing images with specific text like "viagra"
    ---------------------------------------
    Quote Originally Posted by farslayer
    entry in the main.cf
    mime_header_checks = regexp:/etc/postfix/mime_header_checks.regexp


    FILE: mime_header_checks.regexp
    Code:
    /^\s*Content-(Disposition|Type).*name\s*=\s*"?(.+\.(lnk|asd|hlp|ocx|reg|bat|c[ho]m|cmd|exe|dll|vxd|pif|scr|hta|jse?|sh[mbs]|vb[esx]|ws[fh]|wav|mov|wmf|xl))"?\s*$/
       REJECT Attachment type not allowed. File "$2" has the unacceptable extension "$3"
    That will reject any file with any of those windows executable extensions..
    If nothing else it's a good start..

Posting Permissions

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