AMIES can't send email on Adullact's infrastructure
Summary
AMIES can't send email on Adullact's infrastructure
Steps to reproduce (STR)
- Go to AMIES registration page
- Fulfill name and email
- Validate
What is the current bug behavior? (CBB)
- The confirmation email is never received (mail is not sent, cf logs)
What is the expected correct behavior? (ECB)
- Confirmation Email should be sent
Relevant logs and/or screenshots
Jun 26 13:23:31 aglae java[3825]: 2019-06-26 15:23:31.319 ERROR 3825 --- [ task-3] .a.i.SimpleAsyncUncaughtExceptionHandler : Unexpected exception occurred invoking async method: public void net.a
dullact.amies.service.mail.RegistrationMailer.sendEmail(net.adullact.amies.event.UserRegistered)
Jun 26 13:23:31 aglae java[3825]: org.springframework.mail.MailSendException: Failed messages: javax.mail.SendFailedException: Invalid Addresses;
Jun 26 13:23:31 aglae java[3825]: nested exception is:
Jun 26 13:23:31 aglae java[3825]: #011com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 unknown[51.75.192.230] Client host rejected: Access denied
Jun 26 13:23:31 aglae java[3825]: #011at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:490) ~[spring-context-support-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
Jun 26 13:23:31 aglae java[3825]: #011at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:360) ~[spring-context-support-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
Jun 26 13:23:31 aglae java[3825]: #011at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:355) ~[spring-context-support-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
Jun 26 13:23:31 aglae java[3825]: #011at net.adullact.amies.service.mail.Mailer.send(Mailer.kt:28) ~[classes!/:na]
Jun 26 13:23:31 aglae java[3825]: #011at net.adullact.amies.service.mail.TemplateBasedMailer.sendEmail(TemplateBasedMailer.kt:44) ~[classes!/:na]
Jun 26 13:23:31 aglae java[3825]: #011at net.adullact.amies.service.mail.RegistrationMailer.sendEmail(RegistrationMailer.kt:44) ~[classes!/:na]
Jun 26 13:23:31 aglae java[3825]: #011at net.adullact.amies.service.mail.RegistrationMailer$$FastClassBySpringCGLIB$$d2a741b.invoke(<generated>) ~[classes!/:na]
Jun 26 13:23:31 aglae java[3825]: #011at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
Jun 26 13:23:31 aglae java[3825]: #011at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749) ~[spring-aop-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
Jun 26 13:23:31 aglae java[3825]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
Jun 26 13:23:31 aglae java[3825]: #011at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.1.5.RELEASE.jar!/:5.1
.5.RELEASE]
Jun 26 13:23:31 aglae java[3825]: #011at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
Jun 26 13:23:31 aglae java[3825]: #011at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
Jun 26 13:23:31 aglae java[3825]: #011at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) ~[spring-aop-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
Jun 26 13:23:31 aglae java[3825]: #011at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_212]
Jun 26 13:23:31 aglae java[3825]: #011at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_212]
Jun 26 13:23:31 aglae java[3825]: #011at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_212]
Jun 26 13:23:31 aglae java[3825]: #011at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_212]
Possible fixes
- Adullact's mail infrastructure uses TLS protocol (port 587) + authentication (login/password). Could this be piece of clue ?
/cc @mfaure