Comments (6)
Okay, this was easier than I thought
Optional decode is a flag indicating whether the payload should be decoded or not, according to the Content-Transfer-Encoding header.
I only had to set decode=true
in get_payload()
. Additionally, I cannot reproduce the same problem with a multipart message. I guess this is because of the different way you are getting the payload.
However, I could not find an according flag in python3 documentation:
https://docs.python.org/3/library/email.message.html
Can you test this code with py3 (I don't understand your python test file for now)?
from zeyple.
Thanks a lot for the thorough writeup. Looking at the comment above, it seems we're deleting the header to fix a bug in Thunderbird. IIRC this used to crash Thunderbird a while ago. I would suggest to simply remove this line thereby keeping the header intact then check if Thunderbird has been fixed. Do you use Thunderbird by any chance?
from zeyple.
Simply leaving the header doesn't help aswell, as it applies to the encrypted text in the mail payload. Encrypted data never has umlauts in it. We really need to decode the quoted-printable text, re-encode to UTF8, and then encrypt.
I'm currently using Apple Mail :-)
from zeyple.
Hmm okay I don't see why we need to decode the quoted-printable text though. Is this how Thunderbird and Apple Mail handle it? Sorry I can't investigate that right now.
On a side note, I'd like to avoid adding dependencies as much as possible, especially if it's not compatible with Python 3.
from zeyple.
I may be wrong, but if you simply encrypt a string =E4
, how could gpg
know that =E4
is encoded? The header only applies to the mail client, but not to gpg
(AFAIK).
But I have to do further investigation. I'll test if simply leaving the header alive would actually help, and come back to you later.
from zeyple.
I can confirm, that leaving the header Content-Transfer-Encoding: quoted-printable
doesn't fix this problem. It doesn't even help when I add the same header to the attached inline file "encrypted.asc".
I'll write a proof of concept (hopefully without adding dependencies ;-)) and come back to you later.
from zeyple.
Related Issues (20)
- HTML mail evaluates as non-multipart HOT 2
- postfix - Relay access denied HOT 1
- Support both IPv4/6
- Possible issue on character encoding with php-mailer HOT 1
- Docker image HOT 1
- Protect headers by using autocrypt memoryhole HOT 2
- Sender address is not allowed.
- Suggestions / small fix
- Replace python-gpgme with python-gpg HOT 4
- Support manual key import? HOT 2
- Look up final recipient via aliases HOT 2
- Senmail support? HOT 2
- Script died with status 1 HOT 8
- Debian 10 : python-gpgme is obsolete HOT 1
- Debian package fails to configure if pip is not insatlled HOT 1
- Keys with empty name (uid) fields cannot be found
- zeyple breaks opendkim HOT 1
- End to End Encryption for using K-9 Mail/Open Keychain
- New release
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zeyple.