thankyou very much it worked.
rajesh ----- Original Message ----- From: Noel Jones [mailto:njo...@megan.vbhcs.org] To: postfix-users@postfix.org Sent: Thu, 14 Nov 2019 13:04:13 -0600 Subject: On 11/14/2019 12:56 PM, Rajesh M wrote: > hi, > > i am trying to block bad mime attachments (bat com exe etc) at the smtp level > itself. > > i used this guide > http://www.cyberciti.biz/tips/postfix-block-mime-attachment-files.html > > /name=[^>]*\.(bat|com|exe|dll|vbs)/ REJECT > > however the above rules scans the entire file name instead of just the file > extension resulting in false positives, for example > > .scr and .com present within filenames gets wrongly rejected > > * name="strace.Scripting-with-the-xss.pdf.txt" > * filename="BOOKING.COM: Hotel 342802.PDF" > > is there any working sample which somebody could share that blocks bad file > attachments without causing false positives > > thanks > rajesh > Near the bottom of the official header_checks man page there is a good working example. http://www.postfix.org/header_checks.5.html -- Noel Jones