HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Mail filter (http://www.howtoforge.com/forums/showthread.php?t=61209)

stoney 29th March 2013 13:34

Mail filter
 
Hi

In ISPConfig 3, i am trying to add an email filter that has more that 1 source.

ie
subject contains "this" or "this" or "that"

is this possible

Also

Im trying to block .zip files from being received, i put this in the "Mail Content Filter".

Filter
MIME-Header Filter

Regexp. Pattern
/^Content-(Disposition|Type).*name\s*=\s*"?(.*\.(bat|exe|zip ))(\?=)?”?\s*(;|$)/x


But it doesnt work. Any suggestions

Cheers
John

stoney 29th March 2013 14:45

OK

Found out how to do this
subject contains "this" or "this" or "that"

i changed it in the custom rules to this

### BEGIN FILTER_ID:1
if header :regex ["subject"] [".*this|that"] {
fileinto "FOLDER";
stop;
}
### END FILTER_ID:1


Still trying to find how to block attachments

pititis 29th March 2013 23:58

Hello,

Try with this:

Code:

/name=[^>]*.(bat|com|exe|dll)/
Filter type: MIME-Header Filter


Cheers

stoney 30th March 2013 13:03

Thanks for the help

i did this in the end

/filename=\"?(.*)\.(bat|zip|cmd|com|do|exe|hta|jse| rm|scr|pif|vbe|vbs|vxd|xl)\"?$/

But i did find that i was being too quick in testing, i didn't realize that it took a little while for the filter to take affect.



Cheers


All times are GMT +2. The time now is 18:49.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.