Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 2fbe8b70cd
Fetching contributors…

Cannot retrieve contributors at this time

executable file 29 lines (22 sloc) 0.758 kB
#!/usr/bin/env python
import mailbox
import os
maildir = '/home/nelhage/OracleMail'
src = '/INBOX'
# = '/home/nelhage/OracleMail/Termination'
def box(name):
return mailbox.Maildir(os.path.join(maildir, name), factory=None)
INBOX = box("INBOX")
Termination = box("Termination")
Archived = box("Archived")
termination_addr = '<daily_termination_notices_any_ww@oracle.com>'
signup_addr = 'ksplice_signups_us_grp@oracle.com'
for k in INBOX.keys():
msg = INBOX[k]
if termination_addr in msg.get('Cc', '').lower() or \
termination_addr in msg.get('To', '').lower():
Termination.add(msg)
INBOX.remove(k)
elif signup_addr in msg.get('To', '').lower():
Archived.add(msg)
INBOX.remove(k)
Jump to Line
Something went wrong with that request. Please try again.