diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-04-11 23:01:21 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-04-11 23:01:21 -0400 |
commit | 6c0a5af3aba9902206a73a62e2be2e4dd67be9da (patch) | |
tree | cbc0dbb938716a80cc0248b5aff97dc34f21c756 /.maildirproc/default.rc | |
parent | ebc4f813d517d44ddf7440fd8043c5d41adf8932 (diff) | |
parent | a96ee608ce4be813ce381a6a0c195591f633986e (diff) |
Merge branch 'hp-dv6426us-par' into identica-mode-1.2hp-dv6426us-par/identica-mode-1.2
Conflicts:
.emacs
Diffstat (limited to '.maildirproc/default.rc')
-rw-r--r-- | .maildirproc/default.rc | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/.maildirproc/default.rc b/.maildirproc/default.rc index 7ea1ef0..d7351c5 100644 --- a/.maildirproc/default.rc +++ b/.maildirproc/default.rc @@ -6,10 +6,17 @@ processor.maildir_base = "~/Maildir" processor.auto_reload_rcfile = True def is_to_or_from(mail,address): + """ + Return true if [mail] is to or from an address that contains [address]. + """ return ( mail["From"].contains(address) or mail.target.contains(address)) def is_to_or_from_re(mail,address): + """ + Return true if [mail] is to or from an address that matches the + regex [address]. + """ return ( mail["From"].matches(address) or mail.target.matches(address)) @@ -85,17 +92,33 @@ def my_filters(mail): mail.move(".software.social") return - if mail["List-ID"].matches("dev.lists.parabolagnulinux.org"): + if mail["List-Id"].matches("help-grub.gnu.org"): + mail.move(".software.help-grub") + return + + if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"): + mail.move(".software.parabola-maintenance") + return + if ( + False + or mail["List-Id"].matches("parabolagnulinux.org") + or is_to_or_from(mail, "parabolagnulinux.org") + or is_to_or_from(mail, "parabola.nu") + ): mail.move(".software.parabola-dev") return # Sort email from some social websites - if mail["From"].matches("@facebook(|mail)\.com"): + if mail["From"].matches("facebook(|mail)\.com"): mail.move(".Social.Facebook") return - if mail["From"].matches("identi\.ca"): + if ( + False + or mail["From"].matches("identi\.ca") + or mail["From"].matches("statusnet") + ): mail.move(".Social.Identica") return @@ -125,6 +148,7 @@ def my_filters(mail): or is_to_or_from(mail,"solorzano.luis@rocketmail.com") or is_to_or_from(mail,"eldredmac@comcast.net")# MacDonell or is_to_or_from(mail,"mitchprather@sbcglobal.net") + or is_to_or_from(mail,"oa_wap@yahoo.com") ): mail.move(".Troop276") return @@ -147,11 +171,13 @@ def my_filters(mail): "dave.nelson@ecolab.com", "@ni.com", "@precisepath.com", + "@usfirst.org", "gamefreak207@gmail.com", # Brett Leedy "tswilson4801@att.net", "justicejade10@aol.com", "silioso@gmail.com", "cdewalt3@yahoo.com", + "bryanbonahoom@gmail.com", ]: if is_to_or_from(mail,address): mail.move(".School.Robotics") @@ -176,7 +202,6 @@ def my_filters(mail): "esr@thyrsus.com", "canonical.org", "foocorp.net", - "parabolagnulinux.org", "cnuk.org", ]: if is_to_or_from(mail,address): @@ -206,11 +231,11 @@ def my_filters(mail): mail.move(".CompTIA") return - if mail["From"].contains("@lnnorthstar.org"): + if is_to_or_from(mail, "@lnnorthstar.org"): mail.move(".School.Newspaper") return - if mail["From"].contains("susyphil@aol.com"): + if is_to_or_from(mail,"susyphil@aol.com"): mail.move(".PMCH") for address in [ @@ -238,6 +263,7 @@ def my_filters(mail): if ( False or mail["From"].contains("@msdlt.k12.in.us") + or mail["From"].contains("naviance.com") or is_to_or_from(mail,"ibwhite@comcast.net") or mail["Subject"].contains("IOA") or mail["From"].contains("nths.org") @@ -294,7 +320,6 @@ def my_filters(mail): handle_mapping = { ".": handle_incoming_unknown, - ".Inbox": handle_incoming_unknown, ".spam-training": handle_incoming_spam_training, ".ham-training": handle_incoming_ham_training, ".Ham": handle_incoming_ham, |