VERBOSE=off LOGFILE=/tmp/virus.log SUBJECT=`formail -xSubject:` ARRIVED=`formail -xDate:` TOEMAIL=`formail -xTo:` SENDMAIL=/usr/sbin/sendmail ATTACH=`grep -i -E "\.(vbs|wsf|vbe|wsh|hta|scr|pif|com|exe|shs|bat|bas|mp3|mp2|scr|wav|mpg|avi|eml|dll|jpg)"` #looping sanity ## At the first recipe use for filtering duplicate Message-ID: :0 Wh: msgid.lock |formail -D 8192 msgid.cache ## First off, lets get some safe headers happening, dont filter stuff we've already looked at :0 H * !^X-Loop: Attachment scanner { :0 f ## Add our header, yup we've read it alright |formail -A"X-Loop: Attachment scanner" # Things to look for in the body :0 B * name=.*\.(vbs|wsf|vbe|wsh|hta|scr|pif|com|exe|shs|bat|bas|mp3|mp2|scr|wav|mpg|avi|eml|dll) { :0 /tmp/virus.save } :0 H * ^Subject.*(sex|viagra|nude|money|100|MORTGAGE|Rates|Casino|\$| Free |Panty|gamble|deal| Win |Life Insurance|e weight|improve your|Prize|Happy Father|Million Dollar|vitamin) { :0 /tmp/virus.save } :0 H * ^From.*(offer|Gambling|link2buy.com|dealnow|mb00.net|northcity|freecash) { :0 /tmp/virus.save } }