Popular recipes tagged "header" but not "auto"http://code.activestate.com/recipes/tags/header-auto/2010-03-19T09:32:05-07:00ActiveState Code Recipesworking with an email's headers (Python) 2010-03-19T09:32:05-07:00Shamil Bikineyevhttp://code.activestate.com/recipes/users/4173185/http://code.activestate.com/recipes/577128-working-with-an-emails-headers/ <p style="color: grey"> Python recipe 577128 by <a href="/recipes/users/4173185/">Shamil Bikineyev</a> (<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/header/">header</a>). </p> <p>email utils (decode_header, get_header, parseaddr, formataddr) that useful while working with an email's parts</p> Fix invalid mail headers when moving from Thunderbird to IMAP (Python) 2008-08-30T20:08:02-07:00Krys Wilkenhttp://code.activestate.com/recipes/users/4166805/http://code.activestate.com/recipes/576471-fix-invalid-mail-headers-when-moving-from-thunderb/ <p style="color: grey"> Python recipe 576471 by <a href="/recipes/users/4166805/">Krys Wilken</a> (<a href="/recipes/tags/cyrus/">cyrus</a>, <a href="/recipes/tags/header/">header</a>, <a href="/recipes/tags/imap/">imap</a>, <a href="/recipes/tags/invalid/">invalid</a>, <a href="/recipes/tags/mail/">mail</a>, <a href="/recipes/tags/maildir/">maildir</a>, <a href="/recipes/tags/mbox/">mbox</a>, <a href="/recipes/tags/thunderbird/">thunderbird</a>). </p> <p>Removes ">From" and "From " lines from mail headers.</p> <p>Thunderbird adds invalid mail headers to it's local folders. Cyrus IMAP is strict about them. This script walks through all files in the given directories and removes any line that starts with ">From" or "From " (note the space and no colon).</p> <p>Requires Python 2.5+.</p>