Skip to content

mdornseif/hd_MailToolbox

 
 

Repository files navigation

This is a collection of tools we use to handle too much mail. At Hudora we have users receiving more than 30 GB of mail per year and there are issues in effectively handling that load.

The whole code collection is somewhat ad-hoc but you might find on or another tool helpful.

departicularifier

Extracts files from message/partial MIME messages generated by NRG MP 161 scanfax appliances.

See this blogposting for further details.

gmailsignature

Set all signatures for all users on a Google Apps account.

imap2html

Archive mails.

RemoveAttachments

A utility to help you handle too many email attachments.

It can archive attachments in a CouchDB database, remove attachments from emails, or both. Some filtering options allow you to restrict the search to only mails sent after a certain date, or mails that are larger than a certain size.

When modifying emails to remove attachments, this script attempts to preserve message flags and its internal date.

This script will recurse through all folders (mailboxes) on the server that you connect it to.

The CouchDB database will be created if it does not already exist.

Run the script with the --help parameter to see the options. It is self explanatory from there.

You almost certainly want to use --gmail when contacting a Gmail IMAP server.

Known issues:

  • httplib2-0.5.0 has a bug which badly breaks couchdb-python. Use v0.4.0 http://code.google.com/p/couchdb-python/issues/detail?id=85
  • Might be some minor behavioural issues with some email clients. For example, Mozilla Thunderbird only stores local records of manually-marked-as-unread emails. So those emails might be marked as read by this script, when it removes attachments.
  • You can't delete mails over Gmail's IMAP interface, you have to use the web interface. The default remove-attachments settings will not quite work: removing the email from the IMAP server will delete it from all labels but it will still remain stored in "All Mail" and occupying space. To work around this, use the --gmail option, which works around this by copying the mails into the Trash folder before removing them from the original folder. Gmail will then delete the mail after 30 days, or when you manually empty trash from the web interface.
  • The star on Gmail starred messages is lost when attachments are deleted. I can't find a way to apply this flag through the IMAP interface, and it does not apply the "\Flagged" mail flag on request.
  • Because of the dance that we have to do to work with gmail, mails that are marked as unread in Gmail are displayed as read after this script removes the attachments. The Gmail server is not complying to the standards here and it does not seem possible to retain this flag without hacks that I wouldn't trust in the long run.

About

Tools for handling too much Mail

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published