mbok / logsniffer

logsniffer is a sophisticated open source web tool for parsing, viewing, monitoring and analyzing log data - smarter, collaborative and easier. [No longer maintaned]
GNU Lesser General Public License v3.0
104 stars 47 forks source link

Is TLS Supported for the SMTP Notification? #86

Open etraff opened 7 years ago

etraff commented 7 years ago

I've getting errors sending SMTP Mails out:

Caused by: org.springframework.mail.MailSendException: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM
; message exceptions (1) are:
Failed message 1: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM

As far as I can tell I've filled out the "from" field in the GUI - so not sure why I get this. The Mailserver used does not Support Plaintext - only TSL - maybe thats the reason?

mbok commented 7 years ago

The SMTP settings to set via the GUI are very limited. Additional SMTP settings including TSL/SSL can be passed via the config file under ${logsniffer.home}/config.properties (restart after a change). You find a full list of possible SMTP properties on this page: https://javamail.java.net/nonav/docs/api/com/sun/mail/smtp/package-summary.html

justinvoelker commented 6 years ago

Since I spent a couple hours trying to figure this out, I just wanted to post my resolution for anyone else that stumbles across this while Googling their failed emails. In my case, I needed to enable STARTTLS and all I had to do was add the following to my config.properties file:

mail.smtp.starttls.enable=true

Notice that it does not follow the pattern of other mail settings (logsniffer.mail.host, etc.).

mbok commented 6 years ago

Thanks for sharring this information I would add to the Wiki next days.