PDA

View Full Version : Postfix per-user per-domain extension block


mangueJOE
25th January 2008, 15:12
Does anyone know how can I do this with postfix mechanisms?

Or maybe with amavisd-new / clamav / spamassassin ?

unclecameron
26th January 2008, 02:51
What specifically are you trying to do?

mangueJOE
26th January 2008, 04:21
I use the following configuration to stop some file types from entering the server:

main.cf file:
mime_header_checks = regexp:/etc/postfix/mime_header_checks

/etc/postfix/mime_header_checks file:
/name=[^>]*\.(bat|com|exe|dll|vbs)/ REJECT

And many oder file extensions.

This is affectign every user from all domains. how can I do that on a per-user basis? Or perhaps, per-domain.

falko
26th January 2008, 19:48
You could use procmail for it. Take a look at man procmailex and http://www.howtoforge.com/procmail_tips_recipes