aboutsummaryrefslogtreecommitdiffstats
path: root/interfaces/email/interactive/send_pgp_mime.py
Commit message (Collapse)AuthorAgeFilesLines
* Used PyCharms inspectors.Matěj Cepl2024-03-301-16/+16
|
* WIP plenty of clean-ups and porting to Python 3.Matěj Cepl2024-01-211-7/+7
|
* 2to3 conversion of the repo.Matěj Cepl2024-01-181-15/+15
|
* Ran update-copyright.py.W. Trevor King2012-10-161-1/+1
|
* Ran update-copyright.py.W. Trevor King2012-02-161-10/+10
|
* Run update_copyright.py.W. Trevor King2011-05-251-1/+2
|
* Raise an exception for unrecognized errors in send_pgp_mime.W. Trevor King2011-04-161-1/+1
|
* Bumped to version 1.0.01.0.0Chris Ball2011-01-081-1/+1
|
* Ran update_copyright.pyW. Trevor King2010-06-221-12/+14
|
* Updated copyright informationW. Trevor King2010-01-011-1/+1
|
* Fixed email.Parser typo in send_pgp_mime.py imports for Python 2.4.W. Trevor King2009-09-171-1/+1
|
* Typo EncryptedMessageFactory -> PGPMimeMessageFactory in send-pgp-mime.pyW. Trevor King2009-09-111-2/+2
| | | | | | I changed the class name in commit wking@drexel.edu-20090718201613-n242qfl4s3j3kfjf but missed two references.
* Cleaned up be-handle-mail's subscriber notification emails (fewer attachments).W. Trevor King2009-07-271-12/+22
| | | | | | | | | | | Previously, every node in the DiffTree created it's own attachment. Now they're consolidated into a single attachment per bug. higher level nodes are still one attachment per node. Also: * added send_pgp_mime.append_text() * pulled guess_encoding() out of send_pgp_mime.encodedMIMEText(). * renamed data_string -> data_part in libbe.diff, since it needn't be a string.
* Broke encodedMIMEText out of send-pgp-mime.PGPMimeMessageFactory.W. Trevor King2009-07-231-20/+21
| | | | | It's useful enough even when you're not intending to encrypt something.
* Assorted bugfixes to get reworked be-handle-mail working.W. Trevor King2009-07-181-1/+1
|
* Major be-handle-mail rewrite to make things more modular.W. Trevor King2009-07-181-2/+2
| | | | | Added Command and Message classes, and use new flexibility in send_pgp_mime.py.
* Oops, forgot to reset from/to_addr in send_pgp_mime.py unittestsW. Trevor King2009-07-181-2/+2
|
* Major send_pgp_mime.py reorganization to better integrate with email.Message.W. Trevor King2009-07-181-119/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | Now send_pgp_mime.py passes it's unittests again, and it should be easier to use from be-handle-mail :). Renamed Mail -> EncryptedMessageFactory, since its role is to generate message bodies of various types (plain, signed, encrypted, ...) Separated the header processing from Mail, now you need to header_from_text() your header text to create an email.Message which you can use in EncrypedMessageFactory.sign(), .encrypt(), ... Once you've created the body message you want, you can attach it to the header with attach_root(header, root_part) where both header and root_part are email.Message instances. Made EncryptedMessageFactory doctests more robust, through the use of # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE which removed the need for the .strip*() methods. Also added the configurable from_addr and to_addr, which allows you to run the doctests with successful gpg calls. Just set them to some address from your private keyring, and pass the passphrase for that key in to your test via a file (or gpg-agent...) python send_pgp_mime.py -tP path/to/pasphrase/file
* Normalized whitespace in be-handle-mail and send_pgp_mime.py.W. Trevor King2009-07-181-35/+35
| | | | | | | | | | | | | | | | | | | | | Also removed "commit after every message" from be-handle-mail, because a) not implemented yet b) don't want to commit spam, since we'd have to find a way to remove it later. Suggested future workflow: * "bzr diff" to poll for activity, blank output = no activity. * on activity: 1) look at changes 2) remove whatever 3) commit email-interface repo. 4) merge changes into your private repo * on private repo changes: * if activity in email-interface repo: 1) deal with email activity as above * push your private repo onto the email-interface repo (and update the email repos' working tree, if required)
* Added "to_unicode" to send_pgp_mime.flatten()W. Trevor King2009-07-181-3/+5
| | | | | | | | | | | be-handle-mail wants unicode output, since all it's internal processing is done with unicode. However, the flatten calls in send_pgp_mime work with the encoded binary string output, and execute(sendmail, stdin=flatten(msg, to_unicode=True)) fails with Exception: u while executing /usr/sbin/sendmail -t sendmail: fatal: wking(1001): No recipient addresses found in message header
* send_pgp_mime.py attempts to avoid UTF-8 for MIMEText messages.W. Trevor King2009-07-181-5/+15
| | | | | | This keeps the transfer-encoding out of base64 if possible. Also added a "help" example to interafaces/email/interactive/examples.
* Added send_pgp_mime.Mail.encodedMIMEText() for unicode handling.W. Trevor King2009-07-181-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Now be-handle-mail handles examples/unicode without crashing cat examples/unicode | ./be-handle-mail -o -l - But the output email is encoded in base64: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 From: BE Bugs <wking@thor.physics.drexel.edu> To: John Doe <jdoe@example.com> Date: Sat, 18 Jul 2009 12:22:05 +0000 Subject: [be-bug] Re: show In-reply-to: <abcd@example.com> UmVzdWx0cyBvZiBydW5uaW5nOiAoZXhpdCBjb2RlIDApCiAgc2hvdyAKCnN0ZG91dDoKCjw/eG1s IHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9IlVURi04IiA/Pgo8YnVnPgogIDx1dWlkPmY3Y2NkOTE2 LWI1YzctNDg5MC1hMmUzLThjOGFjZTE3YWUzYTwvdXVpZD4KICA8c2hvcnQtbmFtZT5mN2M8L3No b3J0LW5hbWU+CiAgPHNldmVyaXR5Pm1pbm9yPC9zZXZlcml0eT4KICA8c3RhdHVzPmZpeGVkPC9z ... This is perhaps the best we can get out of python < 3.1/2.7, see http://bugs.python.org/issue1368247
* Add unicode-header handling to send_pgp_mime.pyW. Trevor King2009-07-151-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | Also: Switched email.message_from_string() to email.parser.Parser().parsestr() for parsing the header, for access to the headersonly option. Adjusted module import order to alphebetize non-mime email modules. Added return_realname to source_email(), which makes it more useful to be-handle-mail (currently uncommitted). Added a doctest for the plain() output and removed redundant Content-Type line from the doctests (which we'd removed from the output with the last commit). Note that many doctests _will_fail_ unless me@big.edu and you@big.edu are in your gpg keyring. At some point I should make those addresses options to --test...
* Minor tweaks in send_pgp_mime.pyW. Trevor King2009-07-151-3/+1
| | | | | * No reason to set maxheaderlen to something other than the default. * MIMEText sets content-type and charset automatically.
* Added --mode=plain option to send_pgp_mime.W. Trevor King2009-07-151-0/+574
Also a few more tweaks to get things working. I think be-handle-mail is parsing the incoming messages correctly now, but I'm not getting replies back for some reason. Some of the adjustments: * Moved send_pgp_mime -> send_pgp_mime.py, otherwise Python doesn't recognize it as an importable module. * I use postfix now instead of msmtp, so send_pgp_mime.sendmail now points to postfix's sendmail-compatable frontend. * Added "--mode=plain" option to send_pgp_mime.py, so I can test my procmail rules and send_pgp_mime itself without worrying about be-handle-mail. * Fixed some typos in be-handle-mail.