Bernard Robbins <[EMAIL PROTECTED]> wrote:
> Is there any way to reject an email if it contains any attachment with
> an extension of:
> (?i)\.(001|002|386|3GR|ACM|ADT|AP.|ASD|ASP|AX.|BAT|BIN|BO.|CC.|CDR|CHM|
> CLA|CMD|CNV|CP.|CSC|D.B|DEV|DIF|DL.|DRV|EE.|EX.|FMT|FO.|GMS|HDI|HLP|HT.|
> IM.|IN.|JS.|LIB|MB.|MD.|MHT|MOD|MPD|MPP|MPT|MRC|MS.|OB.|OC.|OL.|OLE|OTM|
> OV.|PCI|PHP|PIF|PLG|POT|PP.|PRC|QLB|QPW|QTC|REG|RTF|SCR|SH.|SIS|SMM|SYS|
> TD0|TLB|TSP|VB.|VS.|VWP|VXD|WBK|WIZ|WP.|WRI|WS.|X32|XML|XSL|XTP|XX.|
> ZL.)$

Try using Courier::Filter[1]'s MIMEParts filter module.  You can use your
regex with the "file_name" signature aspect to reject unwanted mails
during the SMTP dialog.  You may want to use a //x style regex for
extended legibility, though (see `perldoc perlre` for the //x modifier).

References:
 1. http://search.cpan.org/dist/Courier-Filter/



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to