Thread: Postfix regex
View Single Post
  #2  
Old 6th January 2011, 15:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

This is from the ISPConfig 3 Manual - these are regular expressions for Postfix header and body checks:

Code:
Regexp. Pattern:  	Filter Type:  	Explanation:
/^Subject: .*Make Money Fast!/ 	Header Filter 	Searches for the string Make Money Fast! in the Subject line.
/name=[^>]*\.(bat|com|exe|dll)/ 	MIME-Header Filter 	This will match all messages that have attachments whose files end in .bat, .com, .exe or .dll.
/^<iframe src=(3D)?cid:.* height=(3D)?0 width=(3D)?0>$/ 	Body Filter 	Body pattern to stop a specific HTML browser vulnerability exploit.
/^From: joe@example.com/ 	Header Filter 	Matches all messages sent by joe@example.com.
/^From: .*@example.com/ 	Header Filter 	Matches all messages sent from the example.com domain.
/Real Bad Words/ 	Body Filter 	This matches "real bad words" in any case (upper, lower, or mixed).
/^Date: .* 200[0-2]/ 	Header Filter 	This matches all emails sent in the years 2000 - 2002.
/^Date: .* 19[0-9][0-9]/ 	Header Filter 	This matches all emails sent between 1900 and 1999.
/^To: postmaster@yourdom.ain/ 	Header Filter 	Matches all messages sent to postmaster@yourdom.ain.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote