Added support for LOGIN AUTH for the SMTP sender#1530
Added support for LOGIN AUTH for the SMTP sender#1530santanoce wants to merge 2 commits intobinwiederhier:mainfrom
Conversation
|
I am quite interested in merging this, but I don't know how to test it. |
@binwiederhier, you may use Docker Mailserver. For example: services:
mailserver:
image: mailserver/docker-mailserver:latest
hostname: mail.example.com
container_name: mailserver
ports:
- "587:587"
volumes:
- ./dovecot.cf:/tmp/docker-mailserver/dovecot.cf
environment:
- ENABLE_SPAMASSASSIN=0
- ENABLE_CLAMAV=0
- ENABLE_FAIL2BAN=0
- [email protected]
cap_add:
- NET_ADMIN
restart: alwaysand inside The application needs an account to start with, that you can create with the following command: docker exec -ti mailserver setup email add [email protected] mypasswordNow you can check the available authentication mechanism via nc localhost 587
EHLO localhostAt this point ntfy can be configured with: Now you should be able to check that the LOGIN authentication method is actually working. Indeed, if you try to send a message without my commits you will receive an |
This should fix #1020, even though it seems that Microsoft 365 Outlook is no longer allowing base authentication for personal accounts, so I wasn't able to actually test it with a Microsoft account. I did however test it using a simple SMTP server supporting LOGIN AUTH and it works.
I basically followed the suggestion in #930, more specifically using the code from here, which in turn is an adaptation of code in the net/smtp package.