Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Sending mails fails if SMTP server advertises CRAM-MD5 authentication #1637
I've installed privacyidea 3.0 on a debian stretch in an virtualenv with python 2.7. There were a problem so the smtp module did not works as exprected.
If you try to use a smtp server privacyidea throws the exception: "character mapping must return integer, None or unicode"
Here's the stack:
Thanks for the update! Indeed, it seems like sending mails is broken under Python 2 + privacyIDEA 3.0 if the SMTP server advertises CRAM-MD5.
I checked the behavior under privacyIDEA 2.23.5 to see if we had this bug prior to 3.0:
So there might be 2.23.5 installations which currently work and would break with an update to 3.0 or 3.0.1.
referenced this issue
May 21, 2019
I've pushed a fix to #1638. Could you test if this patch fixes the bug?
You mentioned you have installed privacyIDEA in a virtualenv. You can then apply the fix with the following command:
But beware, only do this in a test environment :)
I've tested it by using the eMail send dialog from:
But if I use the smtp server from the hoster of my dyndns domain, which allows every sender address in the dns domains of my hosted domain, I get the error: "character mapping must return integer, None or unicode" and the stack trace is:
I hope I've done no mistake by testing your fix ;)
Thanks for testing! Good news that it's working for one of the SMTP servers.
The traceback looks weird because it contains lines that can't really be part of the traceback (e.g.
If this doesn't fix it, can you retry applying the fix using