SMTP setting doens't work with MAIL_URL and MAIL_FROM after Wekan v5.53
See original GitHub issueServer Setup Information:
- Did you test in newest Wekan?: Yes (Wekan v5.51, v5.52, v5.53 and v5.58)
- Wekan version: I tried use v5.58, but I downgrade wekan version to v5.51 to email notification worked again.
- Operating System: Debian 10
- Deployment Method(snap/docker/sandstorm/mongodb bundle/source): docker/docker-compose
- Http frontend if any (Caddy, Nginx, Apache, see config examples from Wekan GitHub wiki first): Lighttpd
- Node Version: v12.22.5
- MongoDB Version: v4.0.24
- Wekan only works on newest desktop Firefox/Chromium/Chrome/Edge/Chromium Edge and mobile Chrome. What webbrowser version are you using? Firefox 91.0 and Chrome 92.0.4515.159
Problem description:
When I updated Wekan to v5.58 the email notifications stopped to work. I use docker-compose to deploy wekan with this docker-compose file:
version: '3.6'
services:
wekan:
container_name: wekan
image: quay.io/wekan/wekan:v5.58
restart: always
volumes:
- /opt/wekan_attachments:/home/wekan/wekan_attachments
networks:
wekan-tier:
ipv4_address: 192.168.1.10
env_file:
- vars.env
networks:
wekan-tier:
driver: bridge
ipam:
config:
- subnet: '192.168.1.0/24'
To set the Environments I use the vars.env. The environment MAIL_URL and MAIL_FROM are configured as below:
#EMAIL CONFIGURATION
MAIL_URL=smtp://user:password@smtp.mycompany.com.br:587
MAIL_FROM=Wekan MyCompany <wekan@mycompany.com.br>
But when a I tried test the email (Admin Panel → Email → Send a test email to yourself) I got the error below:
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:587
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
So, I did some tests and I realize that problem started after the v5.53 Wekan release. I believe the the v5.53 fix (Try to fix MAIL_FROM) broke the MAIL_URL that mean the MAIL_URL is ignored and is use 127.0.0.1 as SMTP address, even with MAIL_URL configured with a different address.
The last wekan version that the SMTP works with MAIL_URL and MAIL_FROM is v5.51.
Best regards,
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:32 (14 by maintainers)
Top Related StackOverflow Question
There is only one Wekan version. At the same time, it is:
There is not any separate versions. Not any difference. All uses same code. There is not any setting for swithing between Enterprise and Community versions, because there is no difference.
@xet7 - thank you very much for this fix! That’s great!