Wrong behavior of SMTP authentication during post commit email
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Invalid
|
Medium
|
Amit Saha |
Bug Description
When the password is not specified in 'bazaar.conf'), SMTP authentication on post commit email hook fails (the password is not asked for) when the SMTP port number is given in only 'bazaar.conf' and not 'authentication
This happens even when the remote SMTP port is the default.
How to reproduce:
1. Start with a 'bazaar.conf' without smtp_user and smtp_password. For eg:
<code>
[DEFAULT]
email = Amit Saha <email address hidden>
post_
smtp_
</code>
2. In the 'authentication
<code>
[mymail]
scheme=smtp
host=mail-foo.com
user=Amit
</code>
3. Give the port number in only the bazaar.conf files along with the SMTP server address, like 'mail.com:52'
(You will need to have a post-commit email hook installed)
Doing a commit will throw up: "bzr: ERROR: SMTP error: 530 5.7.0 No AUTH command has been given" during the email sending stage.
description: | updated |
description: | updated |
summary: |
- Wrong behavior of SMTP authentication when port is specified + Wrong behavior of SMTP authentication on during post commit email |
summary: |
- Wrong behavior of SMTP authentication on during post commit email + Wrong behavior of SMTP authentication during post commit email |
description: | updated |
description: | updated |
description: | updated |
This is related to the smtplib library, used by bzrlib/ smtp_connection .py. The smtp_server is allowed to ends with ':<port' to simplify library usage.
This conflicts with AuthenticationC onfig.get_ user()/ get_password( ) that requires the port to be specified explicitly.