Mailer password length restriction is too short
Hi, thanks for making such a robust product. I'm trying to set up Mailgun for a user mailing profile, but the password field is restricted to 48 characters and Mailgun passwords are 50 characters long. If I edit the database (table mailer_usermailer
, column backend_data
) to include the two missing characters then I am able to successfully send a test message.
I'm still able to send system emails configured using the EMAIL_HOST_PASSWORD
setting because this doesn't suffer from the same restriction. I am running Version 3.2.6
, Build number: v3.2.6_Wed Jul 10 03:18:15 2019 -0400
, from the pre-built docker container.
Steps to reproduce:
- Log into Mayan and navigate to System → Setup → Mailing profiles
- Click Actions → Create mailing profile...
- Pick
Django SMTP backend
- Enter details as required, with a password that is more than 48 characters.
- Save the configuration and try to send a test message for this mailer.
Expected behaviour: password is not truncated and an email is sent.
Real behaviour: password is truncated and the sending fails. For me, this resulted in an error in the docker container log and no visible change in the web interface.
Suggested resolution: Increase the password length limit to 64 in ./mayan/apps/mailer/mailers.py:81
. There is no fixed-size database column for this field, and the backend data is serialised into a LONGTEXT
column for me (with MariaDB) so I think this should be safe to change.
Thanks in advance and please let me know if there's any more information I can provide.