I'm aware of the request for this @ Bug 12136 – RFE : Block attachments per COS / user but as the last comment is over a year ago i'm wondering on the status of this?

Anyway, has anyone else figured/hacked a way to do this?

I was thinking of postfix using header_checks but i'm unsure if multiple conditions, like:

if /^From: user@domain.com/
if /filename=\"?(.*)\.(gif|GIF)/
REJECT Sending filename gif or GIF is blocked for your user
endif
endif

(I'm yet to test this so my syntax is probably way off)

Any postfix wizards out there? Or is there a better way to do this another way?