

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
4 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Three questions and s...| From | Sent On | Attachments |
|---|---|---|
| Han Boetes | Nov 28, 2003 6:18 pm | |
| Sean Rima | Nov 29, 2003 2:51 am | |
| Brook Humphrey | Nov 29, 2003 5:47 pm | |
| Brook Humphrey | Nov 29, 2003 5:48 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [maildropl] Three questions and some more stuff from a just converted | Actions... |
|---|---|---|
| From: | Brook Humphrey (ba...@webmedic.net) | |
| Date: | Nov 29, 2003 5:47:52 pm | |
| List: | net.sourceforge.lists.courier-maildrop | |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thursday 27 November 2003 10:37 pm, Han Boetes wrote:
What is wrong with this recipy?
# dump all kind of m$ crap (99.99% virusses) if (/^Content-Type:.*multipart/ && \ /^Content-Type:.*(audio/x-|application).*name=.*\.(ad[ep]|asd|ba[st]|chm|cm d|cpl|crt|dll|eml|exe|hlp|hta|in[fs]|isp|jse?|lnk|md[betw]|ms[cipt]|nws|ocx| ops|pcd|p[ir]f|reg|sc[frt]|sh[bsm]|swf|url|vb[esx]?|vxd|ws[cfh])/:b) to Mail/zspam
maildrop complains about a missing ')', while emacs says they match fine.
not sure about this one han but I did add anomy-sanitizer to cooker contribs so you should be able to grab it from there. Then I have a filter set up like this.
this is only hte pertinate parts my .mailfilter is much larger than this and does a bunch of other goodies also. For the most part does waht you want to do but it also defangs bad html. It also has variable filter levels. Anyway enjoy.
LOGS = 1 SANITIZE = 1 CCSANITIZE = 1
LMB="Maildir" UNSANITIZED="Maildir/.Unsanitized" SANITIZED="Maildir/.Sanitized" ANOMY=/usr/lib/perl5/vendor_perl/5.8.1/
`test -d $LMB` if( $RETURNCODE == 1) { `maildirmake++ $LMB` }
if($LOGS) { logfile "$HOME/.maildrop.log"
log "========" } ##################################### # # Running Anomy-sanitizer # This only works if SANITIZE=1 above # #####################################
if($SANITIZE) { if( $LOGS == 1) { log "------------------------------------------------------------- Send to Anomy" } # Set up the environment variable ANOMY to keep Anomy happy. # # Filter the message via stdin to Anomy, with the config # file specified, logging output being appended to the # Maildrop log file and then the output being piped to # cat so cat's stdout sends it back to Maildrop. The use # of "2>>" for appending stderr with the log material means # we need the "| cat". # # If Anomy's conf file has: # # feat_log_inline = 0 # feat_log_stderr = 1 # # Then a report of Anomy's progress in working on the message # will be appended to the Maildrop log file. This seems to # work fine, so presumably each "log" line for Maildrop # means it opens and closes the log file.
if($CCSANITIZE) { if($LOGS) { log "------------------------------------------------------------- Save unsanitized." } `test -d $UNSANITIZED` if( $RETURNCODE == 1) { `maildirmake++ -f Unsanitized $LMB` cc "$UNSANITIZED" } exception { # Only uncomment this if you mail program can handle it. #DELTAG=1 cc "$UNSANITIZED" } }
if($LOGS) { xfilter "/usr/bin/sanitizer.pl /etc/anomy-sanitizer.conf 2>>~/.maildrop.log | cat" } exception { xfilter "/usr/bin/sanitizer.pl /etc/anomy-sanitizer.conf 2>>/dev/null" }
if($LOGS) { log "------------------------------------------------------------- Anomy done." }
# Watch out for text added to body by Anomy Sanitizer # when it *drops* a file, not just when it renames # or in some other way defangs one. This is a part # of the drop message I added. # ":b" means look in the body, rather then the headers.
if ( /^*** Attached file dropped ***/:b) { if($LOGS) { log "------------------------------------------------------------- VIRUS. " } # To make it not go to the Inbox, this "cc" into a "to" # and comment out the next three lines. #cc "Maildir/.Virus" #DELTAG=1 xfilter "subjadd -----[VIRUS]----- " `test -d $SANITIZED` if( $RETURNCODE == 1) { `maildirmake++ -f Sanitized $LMB` to "$SANITIZED" } exception { to "$SANITIZED" } } }
- -- -~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~- Brook Humphrey Mobile PC Medic, 420 1st, Cheney, WA 99004, 509-235-9107 http://www.webmedic.net, ba...@webmedic.net, ba...@linux-mandrake.com Holiness unto the Lord -~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/yUwKnT1TkA6FgPgRAosvAKCAXV/4e1xTL8hrJcq6i2TZmynCzQCfaplA vQ72RGzbO2Bxkp5A4PH+XgQ= =iUS+ -----END PGP SIGNATURE-----







