Closed Aerius42 closed 5 years ago
@Aerius42 Thank you for reporting the issue. This is indeed a bug; regression introduced when trying to fix #100.
We believe we fixed your issue. Could you please try with image kamax/mxisd:1.2.2-1-gdf44428
using your regular SMTP config please?
If it works, it is safe for you to keep using that docker image in production.
@maxidor Thank you for your reactivity. With kamax/mxisd:1.2.2-1-gdf44428 everything seems to be ok so far. Thank you a lot !
Do you know if it is possible to force mxisd to send a test email ?
With kamax/mxisd:1.2.2-1-gdf44428 everything seems to be ok so far. Thank you a lot !
@Aerius42 Very happy to hear!
Do you know if it is possible to force mxisd to send a test email ?
No such capability at this time, sorry
I see this is included in v1.3.0, but I'm getting the same problem. Emails are failing for the same reason.
I installed mxisd today, so I have no idea if it was working before :)
I installed using this JAR, on CentOS 7: https://github.com/kamax-matrix/mxisd/releases/download/v1.3.0/mxisd.jar
Feb 13 00:26:54 myhost mxisd: [XNIO-1 task-4] INFO io.kamax.mxisd.session.SessionManager - Session 1550017614236 for io.kamax.matrix.ThreePid@80be73ef: sending validation notification
Feb 13 00:26:54 myhost mxisd: [XNIO-1 task-4] INFO io.kamax.mxisd.threepid.generator.GenericTemplateNotificationGenerator - Generating notification content for 3PID Session validation
Feb 13 00:26:54 myhost mxisd: [XNIO-1 task-4] INFO io.kamax.mxisd.threepid.connector.email.EmailSmtpConnector - Sending invite to myemail@example.com via SMTP using myhost.example.com:465
Feb 13 00:26:54 myhost mxisd: [XNIO-1 task-4] INFO io.kamax.mxisd.threepid.connector.email.EmailSmtpConnector - Connecting to myhost.example.com:465
Feb 13 00:26:54 myhost mxisd: [XNIO-1 task-4] INFO io.kamax.mxisd.threepid.connector.email.EmailSmtpConnector - Using SMTP authentication
Feb 13 00:29:39 myhost mxisd: [XNIO-1 task-4] ERROR io.kamax.mxisd.http.undertow.handler.SaneHandler - Unknown error when handling http://matrix.example.com/_matrix/identity/api/v1/validate/email/requestToken
Feb 13 00:29:39 myhost mxisd: java.lang.RuntimeException: Unable to send e-mail invite to myemail@example.com
Feb 13 00:29:39 myhost mxisd: at io.kamax.mxisd.threepid.connector.email.EmailSmtpConnector.send(EmailSmtpConnector.java:122)
Feb 13 00:29:39 myhost mxisd: at io.kamax.mxisd.threepid.notification.email.EmailRawNotificationHandler.send(EmailRawNotificationHandler.java:64)
Feb 13 00:29:39 myhost mxisd: at io.kamax.mxisd.threepid.notification.email.EmailRawNotificationHandler.send(EmailRawNotificationHandler.java:31)
Feb 13 00:29:39 myhost mxisd: at io.kamax.mxisd.threepid.notification.GenericNotificationHandler.sendForValidation(GenericNotificationHandler.java:72)
Feb 13 00:29:39 myhost mxisd: at io.kamax.mxisd.notification.NotificationManager.sendForValidation(NotificationManager.java:78)
Feb 13 00:29:39 myhost mxisd: at io.kamax.mxisd.session.SessionManager.create(SessionManager.java:134)
Feb 13 00:29:39 myhost mxisd: at io.kamax.mxisd.http.undertow.handler.identity.v1.SessionStartHandler.handleRequest(SessionStartHandler.java:58)
Feb 13 00:29:39 myhost mxisd: at io.kamax.mxisd.http.undertow.handler.SaneHandler.handleRequest(SaneHandler.java:65)
Feb 13 00:29:39 myhost mxisd: at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
Feb 13 00:29:39 myhost mxisd: at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
Feb 13 00:29:39 myhost mxisd: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Feb 13 00:29:39 myhost mxisd: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Feb 13 00:29:39 myhost mxisd: at java.lang.Thread.run(Thread.java:748)
Feb 13 00:29:39 myhost mxisd: Caused by: javax.mail.MessagingException: Could not connect to SMTP host: myhost.example.com, port: 465, response: -1
Feb 13 00:29:39 myhost mxisd: at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2197)
Feb 13 00:29:39 myhost mxisd: at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
Feb 13 00:29:39 myhost mxisd: at javax.mail.Service.connect(Service.java:366)
Feb 13 00:29:39 myhost mxisd: at javax.mail.Service.connect(Service.java:246)
Feb 13 00:29:39 myhost mxisd: at javax.mail.Service.connect(Service.java:267)
Feb 13 00:29:39 myhost mxisd: at io.kamax.mxisd.threepid.connector.email.EmailSmtpConnector.send(EmailSmtpConnector.java:112)
Feb 13 00:29:39 myhost mxisd: ... 12 more
Feb 13 00:29:39 myhost mxisd: [XNIO-1 task-4] INFO io.kamax.mxisd.http.undertow.handler.BasicHttpHandler - Request POST http://matrix.example.com/_matrix/identity/api/v1/validate/email/requestToken - Error M_UNKNOWN: Unable to send e-mail invite to myemail@example.com)
Could not connect to SMTP host: myhost.example.com, port: 465, response: -1
It seems like mxisd cannot connect to your configured SMTP server, most likely because of a network restriction or because the SMTP server closed the connection on its side. So far, it doesn't look like a mxisd problem.
465 is usually used for TLS. Maybe try 587 for STARTLS with the appropriate config option?
Port 587 worked! Thanks very much. Easy fix :)
@nunoperalta I think I've found the issue in the meantime. STARTLS is supported, but not SSL/TLS. Thank you for your report, it allowed us to discover the underlying issue! I'll open another issue to keep track of it so we can fix it for the next release.
Hello,
When I try to send a registration email, I received the following error statement in the log for the versions 1.2.2 and 1.2.1:
But with the versions 1.2.0, 1.1.1 and 1.0.0, everything goes fine:
I'm currently using the docker container version of MXISD and Synapse:
I'm also using Mailjet as SMTP server with TLS but without TLS, I have the same results. I tried also to replace the host name by its IP address, same result.
My mxisd.yaml config:
That's really weird, seems to be a bug. Thank you for your work and your help !