Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"'ascii' codec can't decode byte 0xc2" #22

Closed
Nithanim opened this issue Dec 4, 2015 · 6 comments
Closed

"'ascii' codec can't decode byte 0xc2" #22

Nithanim opened this issue Dec 4, 2015 · 6 comments
Labels

Comments

@Nithanim
Copy link
Contributor

Nithanim commented Dec 4, 2015

Today I waited eagerly for a mail but I had to discover that it was zeyple that had trouble dealing with it:

Dec  4 19:56:49 vps108 postfix/qmgr[3471]: CB2D344125: from=<pm_bounces@###########>, size=17285, nrcpt=1 (queue active)
Dec  4 19:56:50 vps108 postfix/pipe[19895]: CB2D344125: to=<############@#####.##>, orig_to=<#############@nithanim.me>, relay=zeyple, delay=2.3, delays=0.79/0.01/0/1.5, dsn=5.3.0, status=bounced (Command died with status 1: "/usr/local/b
in/zeyple.py". Command output: Traceback (most recent call last):   File "/usr/local/bin/zeyple.py", line 264, in <module>     zeyple.process_message(message, recipients)   File "/usr/local/bin/zeyple.py", line 105, in process_message
  out_message = self._encrypt_message(in_message, key_id)   File "/usr/local/bin/zeyple.py", line 156, in _encrypt_message     payload = payload.encode('ascii') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 14112:
ordinal not in range(128) )

Since I don't have the original mail I cannot provide you with any more details (at least as far as I know). It would be really helpful if the mail would not have bounced and would have sent it unencrypted to me instead. ref /issues/20

@acatton
Copy link
Collaborator

acatton commented Dec 10, 2015

I can take a look at it @Nithanim . Quick question are you running zeyple on python2 or python 3?

@Nithanim
Copy link
Contributor Author

Thank you so much for that! I am not sure how postfix calles the script but when I type "python" in bash it prints "Python 2.7.3".

@Nithanim
Copy link
Contributor Author

So yesterday and today I waited for an email that bounced again (the send plain on bounce would still be great). This might be related to this issue but I am not sure about that.

Sep 12 16:48:23 host postfix/pipe[11251]: 7D00536A00A: to=<myemail>, orig_to=<mypublicemail>, relay=zeyple, delay=1.7, delays=0.53/0.04/0/1.1, dsn=5.3.0, status=bounced (Command died with status 1: "/usr/local/bin/zeyple.py". Command output: Traceback (most recent call last):   File "/usr/local/bin/zeyple.py", line 264, in <module>     zeyple.process_message(message, recipients)   File "/usr/local/bin/zeyple.py", line 105, in process_message     out_message = self._encrypt_message(in_message, key_id)   File "/usr/local/bin/zeyple.py", line 156, in _encrypt_message     payload = payload.encode('ascii') UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 431: ordinal not in range(128) )

The emails in question are the verification emails of discord. I hope there is nothing private in it: https://gist.github.com/Nithanim/e9a38c05b66201be922d81b098e9923d

Thank you in advance :)

@infertux
Copy link
Owner

Hi @Nithanim,

Thanks for your patience. This should be fixed now (please reopen the issue if not).

Here's a helper script to upgrade to v1.2.0: https://github.com/infertux/zeyple/blob/master/upgrade.sh

@Nithanim
Copy link
Contributor Author

Hello @infertux,

Thank you so much for your work!
Unfortunately, I had to convert my environment (from semi-production) to production completely and I had to disable zeyple in this process.
I might be able to enable it again when it is guaranteed that no email gets lost (#20) and no double encryption is possible (#32). However, I am still not so sure if zeyple is production-ready.
Since I still got no time for anything (including tinkering with this :( ), you can take all time you need :)

@infertux
Copy link
Owner

infertux commented Nov 29, 2016

No problem. I wouldn't use Zeyple for anything critical, at least until #20 is done like you say. I just wish I could spend more time on this project... hopefully it'll be production-ready one day :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants