################################################################################ # Filename: $HOME/.procmail/kill-rc # Purpose: kill mails with procmail :-) # Author: Michael Prokop - www.michael-prokop.at # Latest change: Mon Feb 02 00:14:32 CET 2004 ################################################################################ # variables # ========= DATESTRING=`date +%Y-%m` # create a cache with message-IDs and move duplicates to special folder :0 Wh: msgid.lock | formail -D 1048576 ~/.msgid.cache :0 a: kill_duplicates # delete mails from a specific author or with defined subject # the authors and subject are defined in # $HOME/.procmail/kill-users and $HOME/.procmail/kill-subjects # # This script is from Era Eriksson # killfile - Authors FROM=`formail -rtzxTo:` :0 * ? /bin/fgrep -qxis "$FROM" $HOME/.procmail/kill-users { LOG=" trashed: $FROM is in kill file" :0: kill_author } ################################################################################# # Old, currently not used stuff but which might be useful # ======================================================= # if mail with a subject mentioned in ~/.procmail/kill-thread arives # assign "status read" #:0 fhw #* ^Subject:[ ]*\/[^ ](.*[^ ])? #* ? echo "$MATCH" | /bin/fgrep -f $HOME/.procmail/kill-thread #| formail -I "Status: RO" # Wenn Mail in der suse-linux-Liste ankommt und einer der Einträge # in ~/.procmail/kill-topic im Subject vorkommt, wird ein Header # "Status: RO" hinzugefügt. Damit werden diese Mails beim Lesen # von neuen Mails übersprungen. #:0 fhw #* ^X-Mailinglist:.*suse-linux #* ^Subject:[ ]*\/[^ ](.*[^ ])? #* ? echo "$MATCH" | /bin/fgrep -f $HOME/.procmail/kill-topic #| formail -I "Status: RO" # Mails from the suse-linux mailinglist from persons in the warn-suse-list # get an additional header # # Wenn Mails aus der suse-linux Liste von Personen kommen, die in # der warn-suse Liste stehen, bekomme ich eine extra Headerzeile #FROM=`formail -rtzxTo:` #:0 fh #* ^X-Mailinglist:.*suse-linux #* ? /bin/fgrep -qxis "$FROM" $HOME/.procmail/warn-suse #| formail -A "X-Warned: $FROM" # people mentioned in kill-suse are killfiled ;-) # # Wenn Mails aus der suse-linux Liste von Personen kommen, die in # der kill-suse Liste stehen, landen sie im Bitmülleimer #:0 #* ^X-Mailinglist:.*suse-linux #* ? /usr/bin/fgrep -qxis "$FROM" $HOME/.procmail/kill-suse #{ # LOG=" trashed: $FROM not in suse-linux inbox" # :0: # trash_suse_$DATESTRING #} ############### END OF FILE #####################################################