Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Postfix Blocking Specific File Attachment

Status
Not open for further replies.

twinkygruffs

IS-IT--Management
Dec 7, 2011
1
GB
Hi,

Could someone tell me the best way to allow postfix to reject a specific file attachment i.e. 'delivery_information.zip' and not just a wildcard extension ?

Thanks Simon.
 
See the following link:
Note in the instructions, the line that says: /name=[^>]*\.(bat|com|exe|dll|vbs)/ REJECT

In case you are not familiar with the concept, this is what is called a regular expression which is a pattern matching language. If I remember my regex syntax correctly it says to match "name equals zero or more characters that are not > followed by a . followed by bat or com or exe or dll or vbs. On a match, the rule is to reject the file.

In your case, you should be able to substitute the wild card match for the explicit file name. In other words, use
/name=delivery_information.zip/ REJECT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top