diff options
Diffstat (limited to '.config/maildirproc')
-rw-r--r-- | .config/maildirproc/att.rc | 102 |
1 files changed, 30 insertions, 72 deletions
diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 381ce8f..71bc00c 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -1,20 +1,16 @@ -# -*- mode: python; indent-tabs-mode: t -*- +# -*- mode: python; -*- -import os import subprocess processor.maildir_base = "~/Maildir" processor.auto_reload_rcfile = True -processor.logfile = os.getenv('XDG_CACHE_HOME', "~/.cache")+"/maildirproc/att.log" def is_to_or_from(mail,address): """ Return true if [mail] is to or from an address that contains [address]. """ return ( - False - or mail["From"].contains(address) - or mail["Reply-To"].contains(address) + mail["From"].contains(address) or mail.target.contains(address)) def is_to_or_from_re(mail,address): """ @@ -76,11 +72,11 @@ def handle_incoming_unknown(mail): def my_filters(mail): # Sort mail from GNU mailing lists - for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub', 'bug-gnuzilla', 'bug-librejs' ]: + for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub' ]: if ( False or mail["List-Id"].matches(list+"\.gnu\.org") - or mail["Subject"].contains('['+list+']') + or mail["Subject"].contains(list) ): mail.move(".software."+list) return @@ -94,43 +90,15 @@ def my_filters(mail): mail.move(".software.social") return - if mail["List-Id"].matches("networkmanager-list\.gnome\.org"): - mail.move(".software.networkmanager") - return - if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"): - if mail["From"].contains("monit@"): - if mail["Message-Id"].contains("@repo.parabolagnulinux.org"): - if mail["Subject"].matches("^\[Maintenance\] monit alert -- (Execution|Connection) (succeeded|failed) sshd$"): - mail.move(".software.parabola-maintenance.monit-repo.sshd") - return - mail.move(".software.parabola-maintenance.monit-repo") - return - if mail["Message-Id"].contains("@rshg054.dnsready.net"): - mail.move(".software.parabola-maintenance.monit-rshg054") - return - if mail["Subject"].matches("Cron <.*@repo>"): - mail.move(".software.parabola-maintenance.cron-repo") - return - if mail["Subject"].matches("Cron <.*@rshg054>"): - mail.move(".software.parabola-maintenance.cron-rshg054") - return mail.move(".software.parabola-maintenance") return - - if is_to_or_from(mail, "parabola.nu"): - mail.move(".software.parabola-labs") - return - if ( False or mail["List-Id"].matches("parabolagnulinux.org") or is_to_or_from(mail, "parabolagnulinux.org") - or is_to_or_from(mail, "kiwwwi.com.ar") + or is_to_or_from(mail, "parabola.nu") ): - if mail["Subject"].contains("[Django]"): - mail.move(".software.parabola-maintenance.django") - return mail.move(".software.parabola-dev") return @@ -138,10 +106,6 @@ def my_filters(mail): mail.move(".software.pacman-dev") return - if (mail["List-Id"].matches("systemd-devel.lists.freedesktop.org")): - mail.move(".software.systemd-devel") - return - for subject_re in [ "\[Stow-[^\]]*\].*", ]: @@ -189,7 +153,6 @@ def my_filters(mail): or is_to_or_from(mail,"mitchprather@sbcglobal.net") or is_to_or_from(mail,"oa_wap@yahoo.com") or is_to_or_from(mail,"mytroop.us") - or is_to_or_from(mail,"crossroadsbsa.org") ): mail.move(".Troop276") return @@ -202,10 +165,8 @@ def my_filters(mail): for address in [ "justicejade10@aol.com", "parsonsjade@aol.com", - "parsonstjade@gmail.com", - "jadparso@umail.iu.edu", ]: - if is_to_or_from(mail,address): + if mail["From"].contains(address): mail.move(".misc.Jade") return @@ -228,29 +189,29 @@ def my_filters(mail): # Sort mail from FRC people for address in [ - "@ni.com", - "@usfirst.org", - "BBonahoom@stanleyworks.com", + "jeffreysmith@msdlt.k12.in.us", + "jason.zielke@gmail.com", "allison.m.babcock@gmail.com", - "bryanbonahoom@gmail.com", - "cdewalt3@yahoo.com", - "dave.nelson@ecolab.com", - "dickaustin190@yahoo.com", + "william.walk@gmail.com", + "BBonahoom@stanleyworks.com", + "wcxctrack829@aim.com", # Pat "djnels1@comcast.net", # Dave and Julie Nelson - "gamefreak207@gmail.com", # Brett Leedy - "jason.zielke@gmail.com", - "jeffreysmith@msdlt.k12.in.us", "sarahlittell@comcast.net", - "silioso@gmail.com", "skiplittell@comcast.net", + "dave.nelson@ecolab.com", + "@ni.com", + "@usfirst.org", + "gamefreak207@gmail.com", # Brett Leedy "tswilson4801@att.net", - "wcxctrack829@aim.com", # Pat - "william.walk@gmail.com", + "silioso@gmail.com", + "cdewalt3@yahoo.com", + "bryanbonahoom@gmail.com", ]: if is_to_or_from(mail,address): mail.move(".School.Robotics") return for subject_re in [ + "FIRST", "robotics", "1024", "kil-?a-?bytes", @@ -261,21 +222,19 @@ def my_filters(mail): # Sort mail from software people for address in [ - "@archlinux.org", - "@fsf.org", - "@github.com", - "canonical.org", - "cnuk.org", + "gnu.org", "eff.org", - "esr@thyrsus.com", - "foocorp.net", "gitorious.org", - "gnome.org", - "gnu.org", + "sourceforge.com", "ietf.org", "kde.org", - "sourceforge.com", "trustees@core3.amsl.com", + "esr@thyrsus.com", + "canonical.org", + "foocorp.net", + "cnuk.org", + "@archlinux.org", + "@github.com", ]: if is_to_or_from(mail,address): mail.move(".software") @@ -317,7 +276,6 @@ def my_filters(mail): or mail["Subject"].contains("newsletter") or mail["From"].contains("Info@mailing.jamendo.com") or mail["From"].contains("info@demandprogress.org") - or (mail["From"].contains("@sparkfun.com") and mail["Message-Id"].contains("rsgsv.net")) ): mail.move(".misc.Newsletters") return @@ -347,10 +305,10 @@ def my_filters(mail): return if ( False - #or mail["From"].contains(".edu") + or mail["From"].contains(".edu") or mail["From"].contains("admissions@") - #or mail["From"].contains("college") - #or mail["From"].contains("university") + or mail["From"].contains("college") + or mail["From"].contains("university") or mail["Subject"].contains("college") # now we get to the BS or mail["From"].contains("@dreamitdoitindiana.com") |