SMTP server on Monit

Started by newman87, January 21, 2022, 07:49:13 PM

Previous topic - Next topic
Hello,
I would like to receive e-mails from Suricata to my gmail address for some alerts e.g. when content is blocked.
In order to receive these e-mails I use Monit.However,I don't know what to add for the SMTP email server address,SMTP username and password.
Do I need to use something like Postfix?Or should I add for the STMP email server address "smtp.gmail.com" and also add in SMTP username/password my gmail credentials?

Any help would be helpful,
thanks



Hi there,

I use a gmail account for mine - configured with:

https://support.google.com/mail/answer/7126229?hl=en-GB#zippy=%2Cstep-change-smtp-other-settings-in-your-email-client

... port 465, SSL enabled, etc.

However, if you just put your regular gmail password in, you'll see the below in the Monit logs:

SMTP: Mailserver response error -- 534 5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor o18sm2679679ejb.111 - gsmtp

Once you configure an App specific password, and use this in Monit instead of your main/actual gmail password, then it works:

https://support.google.com/mail/search?q=application+specific+password&from_promoted_search=true