Postfix SASL authentication failure

1,097 views
Skip to first unread message

Tunning Ing.

unread,
Oct 16, 2023, 7:50:27 AM10/16/23
to Wazuh | Mailing List
Hi team,

We are trying to implement an SMTP mail service, we are following the documentation (
SMTP server with authentication - Configuring email alerts) to the letter on our Master node (later we will also do it on the Workers nodes), but when executing the command To test the configuration, no email is received,
this is the description of the log we received:
"full_log": "Oct 13 15:24:21 Master postfix/smtp[3978555]: D3F7EB0FCA: to=<wazu...@gmail.com>, relay=smtp.gmail.com[64.xxx.xxx.109]:587, delay=2260, delays=2260/0.08/0.7/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.gmail.com[64.xxx.xxx.109]: invalid parameter supplied)"

Bin Do Tuan Anh

unread,
Oct 16, 2023, 8:45:54 AM10/16/23
to Wazuh | Mailing List
Hi, 

One of the reason may be related to the App Password. Please let me know if you have enabled "Sign In with app passwords"? You can check the way to create it here: https://support.google.com/accounts/answer/185833?hl=en.

Also, please do not forget to restart the Postfix service after the changes. 

Best regards. 

Tunning Ing.

unread,
Oct 16, 2023, 8:55:05 AM10/16/23
to Wazuh | Mailing List
Thanks for the quick reply.
Yes, it is configured with the Google application password and we have restarted all services after configuring.

Torsten Geile

unread,
Oct 16, 2023, 9:02:58 AM10/16/23
to Tunning Ing., Wazuh | Mailing List
Please show relevant part of main.cf and file where you stored your credentials, which is referenced in main.cf

--
You received this message because you are subscribed to the Google Groups "Wazuh | Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/98e71d7d-a605-4f12-bfcd-382d9457f350n%40googlegroups.com.

Tunning Ing.

unread,
Oct 16, 2023, 9:11:31 AM10/16/23
to Wazuh | Mailing List
There is the relevant part of main.cf:
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = Master.TUNNING.CL
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, Master, localhost.localdomain, , localhost
relayhost = [smtp.gmail.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = yes

and sasl_passwd have this format:
[smtp.gmail.com]:587 wazu...@gmail.com:puxxxxxxxxxxxxel
Reply all
Reply to author
Forward
0 new messages