import datetime from imap_tools import EmailAddress DATA = dict( subject='Fwd: Signed email causes file attachments', from_='xxxxxxxxx.xxxxxxx@gmail.com', to=('xxxxx@xxxxxxxxx.com',), cc=(), bcc=(), reply_to=('xxxxxxxxx.xxxxxxx@gmail.com',), date=datetime.datetime(2005, 5, 8, 14, 9, 11, tzinfo=datetime.timezone(datetime.timedelta(days=-1, seconds=68400))), date_str='Sun, 8 May 2005 14:09:11 -0500', text='We should not include these files or vcards as attachments.\r\n\r\n---------- Forwarded message ----------\r\nFrom: xxxxx xxxxxx \r\nDate: May 8, 2005 1:17 PM\r\nSubject: Signed email causes file attachments\r\nTo: xxxxxxx@xxxxxxxxxx.com\r\n\r\n\r\nHi,\r\n\r\nJust started to use my xxxxxxxx account (to set-up a GTD system,\r\nnatch) and noticed that when I send content via email the signature/\r\ncertificate from my email account gets added as a file (e.g.\r\n"smime.p7s").\r\n\r\nObviously I can uncheck the signature option in the Mail compose\r\nwindow but how often will I remember to do that?\r\n\r\nIs there any way these kind of files could be ignored, e.g. via some\r\nsort of exclusions list?\r\n', html='', headers={'return-path': ('',), 'x-original-to': ('xxxxx@xxxxx.xxxxxxxxx.com',), 'delivered-to': ('xxxxx@xxxxx.xxxxxxxxx.com',), 'received': ('from localhost (localhost [127.0.0.1])\r\n\tby xxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 06C9DA98D\r\n\tfor ; Sun, 8 May 2005 19:09:13 +0000 (GMT)', 'from xxxxx.xxxxxxxxx.com ([127.0.0.1])\r\n by localhost (xxxxx.xxxxxxxxx.com [127.0.0.1]) (amavisd-new, port 10024)\r\n with LMTP id 88783-08 for ;\r\n Sun, 8 May 2005 19:09:12 +0000 (GMT)', 'from xxxxxxx.xxxxxxxxx.com (xxxxxxx.xxxxxxxxx.com [69.36.39.150])\r\n\tby xxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 10D8BA960\r\n\tfor ; Sun, 8 May 2005 19:09:12 +0000 (GMT)', 'from zproxy.gmail.com (zproxy.gmail.com [64.233.162.199])\r\n\tby xxxxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 9EBC4148EAB\r\n\tfor ; Sun, 8 May 2005 14:09:11 -0500 (CDT)', 'by zproxy.gmail.com with SMTP id 13so1233405nzp\r\n for ; Sun, 08 May 2005 12:09:11 -0700 (PDT)', 'by 10.36.10.16 with SMTP id 16mr1012493nzj;\r\n Sun, 08 May 2005 12:09:11 -0700 (PDT)', 'by 10.36.5.10 with HTTP; Sun, 8 May 2005 12:09:11 -0700 (PDT)'), 'domainkey-signature': ('a=rsa-sha1; q=dns; c=nofws;\r\n s=beta; d=gmail.com;\r\n h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references;\r\n b=cid1mzGEFa3gtRa06oSrrEYfKca2CTKu9sLMkWxjbvCsWMtp9RGEILjUz0L5RySdH5iO661LyNUoHRFQIa57bylAbXM3g2DTEIIKmuASDG3x3rIQ4sHAKpNxP7Pul+mgTaOKBv+spcH7af++QEJ36gHFXD2O/kx9RePs3JNf/K8=',), 'message-id': ('',), 'date': ('Sun, 8 May 2005 14:09:11 -0500',), 'from': ('xxxxxxxxx xxxxxxx ',), 'reply-to': ('xxxxxxxxx xxxxxxx ',), 'to': ('xxxxx xxxx ',), 'subject': ('Fwd: Signed email causes file attachments',), 'in-reply-to': ('',), 'mime-version': ('1.0',), 'content-type': ('multipart/mixed; \r\n\tboundary="----=_Part_5028_7368284.1115579351471"',), 'references': ('',)}, attachments=[ dict( filename='smime.p7s', content_id='', content_disposition='attachment', content_type='application/pkcs7-signature', payload=b'0\x80\x06\t*\x86H\x86\xf7\r\x01\x07\x02\xa0\x800\x80\x02\x01\x011\x0b0\t\x06\x05+\x0e\x03\x02\x1a\x05\x000\x80\x06\t*\x86H\x86\xf7\r\x01\x07\x01\x00\x00\xa0\x82\x06\x140\x82\x02\xcd0\x82\x026\xa0\x03\x02\x01\x02\x02\x03\x0e\\\xf90\r\x06\t*\x86H\x86\xf7\r\x01\x01\x04\x05\x000b1\x0b0\t\x06\x03U\x04\x06\x13\x02ZA1%0#\x06\x03U\x04\n\x13\x1cThawte Consulting (Pty) Ltd.1,0*\x06\x03U\x04\x03\x13#Thawte Personal Freemail Issuing CA0\x1e\x17\r050329093910Z\x17\r060329093910Z0B1\x1f0\x1d\x06\x03U\x04\x03\x13\x16Thawte Freemail Member1\x1f0\x1d\x06\t*\x86H\x86\xf7\r\x01\t\x01\x16\x10smhaunch@mac.com0\x82\x01"0\r\x06\t*\x86H\x86\xf7\r\x01\x01\x01\x05\x00\x03\x82\x01\x0f\x000\x82\x01\n\x02\x82\x01\x01\x00\x9f\xdd\x1d>\xc6\x12\xdc\xb8\xdf1\x8d\xb5\xd4\xe4\x98\xac4\x0b\xcf\x03X>P\x0b\xef\xef\xf4\\\x0f\xa4w/?\xad\x19\xf2\x10qF\xc2\x13B\x0eh4\x07\xaaq\x0b\xbc\xf7\xc7\x12C\xff\xc1\x9f\t\xdf\x88aE\rQ\x05y\x9b\xd3$\xc5\xf3\xfd\xa55WeR\x18-\xa0p\xa3\xccR\xdc\r\x1a\xd4\xb5\xdejW&\x94F\xc9\x89\xb9\x8a\x90F\xa8]\xc8\xb72\x1a\xf2.\nZk\xe2\xa4\xfe\xc1\xf4\xd9#Z\xb43\xb5\xbd-\xbcl\xfb"m\x9a\\s\xa7^\x16\xb9Z\x85&\'/\xe3\xd6\xe7\x89\x83La\xc8p#v}\xbc\x7fc\xaa\xac\xa7:\xa6\xb4\xa6\x97\xae\xfe\xf94\x1bn\xcb\xd7\x01\xe8\xac\xd4\xe2=\xb1]\xb4\xe4\x03\x0c\xf7\xa5\x14\xa0\x84\x92Z\x03\x07i\xfb""\xbc\x00\xf7\xbe\xbd$$M\xe9\xf8L\xf7\xe0s!\xdfq\x17\x12\x91hY\xc3~0!\x10d?V\x9eaU\x88\xca\xef~\xf3\x17,eEA\xf0\x00p-:\xd1\xe1\x85I\x12ue\x0fTU\x02\x03\x01\x00\x01\xa3-0+0\x1b\x06\x03U\x1d\x11\x04\x140\x12\x81\x10smhaunch@mac.com0\x0c\x06\x03U\x1d\x13\x01\x01\xff\x04\x020\x000\r\x06\t*\x86H\x86\xf7\r\x01\x01\x04\x05\x00\x03\x81\x81\x00@\xca\xe0\xd6}\xa9]U\xadx\xfe\xc1\x06?\x8f\x93u\x1fb\xd6\xee\x1d\xbe6\xb8w\x0b&7\xe3\x9d\x19G\xec\x0cgK\n\xdd/q\xc4\x0fm9\xc3p\xaa\xf1>\xed\xcd\\H\x8d\x14K;\xf9c\xabA\x9eu \x85\x06L\xbby\x8a5>\xb5\xe1\xce\xd1\x87\t4\x81\x86\xc8\x96v,\x8b[\x12\xa5;\x11\x80\xc0\x97?\x94\xc3\'\xc2\xa2\xcev\xb4\x1c\xa0_\xd8\x81\xb8\xdeiANA\xb5!\xf7\x8c=T3iY\x96\x02g\x070\x82\x03?0\x82\x02\xa8\xa0\x03\x02\x01\x02\x02\x01\r0\r\x06\t*\x86H\x86\xf7\r\x01\x01\x05\x05\x000\x81\xd11\x0b0\t\x06\x03U\x04\x06\x13\x02ZA1\x150\x13\x06\x03U\x04\x08\x13\x0cWestern Cape1\x120\x10\x06\x03U\x04\x07\x13\tCape Town1\x1a0\x18\x06\x03U\x04\n\x13\x11Thawte Consulting1(0&\x06\x03U\x04\x0b\x13\x1fCertification Services Division1$0"\x06\x03U\x04\x03\x13\x1bThawte Personal Freemail CA1+0)\x06\t*\x86H\x86\xf7\r\x01\t\x01\x16\x1cpersonal-freemail@thawte.com0\x1e\x17\r030717000000Z\x17\r130716235959Z0b1\x0b0\t\x06\x03U\x04\x06\x13\x02ZA1%0#\x06\x03U\x04\n\x13\x1cThawte Consulting (Pty) Ltd.1,0*\x06\x03U\x04\x03\x13#Thawte Personal Freemail Issuing CA0\x81\x9f0\r\x06\t*\x86H\x86\xf7\r\x01\x01\x01\x05\x00\x03\x81\x8d\x000\x81\x89\x02\x81\x81\x00\xc4\xa6\x07\xbf@\x80\x02d\xd7\xa7\xa6\xbb\x9fe\xd1\xc5*T\x85\x0fH\x04\x7f\xa7\xb6\xd1\xc7\xc7N{\xa1W\xd8\xf0S\x1e\xbe