Our SMTP server will no longer accept unauthorized access and requires STARTTLS
. For the DataStoreServer I added the following entries in service.properties
, which work perfect:
mail.smtp.starttls.enable = true
mail.smtp.starttls.required = true
mail.smtp.ssl.protocols = TLSv1.2
mail.smtp.auth = true
mail.smtp.host = ***.bam.de
mail.smtp.user = ***@bam.de
mail.smtp.password = ***
mail.from = ***@bam.de
For the UsageReportingTask
I added the same lines to the service.properties
of the ApplicationServer, but it doesnt work. When trying to send a mail an exception is thrown. Looks like it is not even trying to initialize the STARTTLS
connection. Do I need to set other configuration values for the AS then for the DSS?
Thank you!
2023-04-25 08:35:39,771 INFO [usage-reporting - Maintenance Plugin] OPERATION.MailClient - Sending message from '***@bam.de' to recipients '[***@bam.de]'
2023-04-25 08:35:39,795 ERROR [usage-reporting - Maintenance Plugin] OPERATION.MaintenancePlugin - Exception when running maintenance task 'ch.systemsx.cisd.openbis.generic.server.task.UsageReportingTask'.
ch.systemsx.cisd.common.exceptions.EnvironmentFailureException: Sending e-mail with subject 'Usage report for the period from 2023-04-16 until 2023-04-23' to recipients [***@bam.de] failed.
Detailed failure description:
javax.mail.AuthenticationFailedException: 334 NTLM supported
at ch.systemsx.cisd.common.mail.MailClient.privateSendMessage(MailClient.java:440)
at ch.systemsx.cisd.common.mail.MailClient.sendEmailMessageWithAttachment(MailClient.java:376)
at ch.systemsx.cisd.openbis.generic.server.task.UsageReportingTask.sendReport(UsageReportingTask.java:220)
at ch.systemsx.cisd.openbis.generic.server.task.UsageReportingTask.execute(UsageReportingTask.java:167)
at ch.systemsx.cisd.common.maintenance.MaintenancePlugin$MaintenanceTimerTask.doRun(MaintenancePlugin.java:243)
at ch.systemsx.cisd.common.maintenance.MaintenancePlugin$MaintenanceTimerTask.run(MaintenancePlugin.java:227)
at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
at java.base/java.util.TimerThread.run(Timer.java:506)
Caused by: javax.mail.AuthenticationFailedException: 334 NTLM supported
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:648)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:583)
at javax.mail.Service.connect(Service.java:313)
at javax.mail.Service.connect(Service.java:172)
at javax.mail.Service.connect(Service.java:121)
at javax.mail.Transport.send0(Transport.java:190)
at javax.mail.Transport.send(Transport.java:120)
at ch.systemsx.cisd.common.mail.MailClient.send(MailClient.java:455)
at ch.systemsx.cisd.common.mail.MailClient.privateSendMessage(MailClient.java:415)
... 7 more