[See solution below]
I'm trying to configure Zabbix to use my own SMTP server (the one I use in my email clients, all the products that needs to send emails etc).
Problem is, it doesn't seem like Zabbix is correctly sending credential and authentication is always refused. Things like :
[30/Mar/2018 15:05:44] SMTP server connection from x.x.x.x closed after 3 bad commands
[30/Mar/2018 15:43:27] Failed SMTP login from x.x.x.x with SASL method DIGEST-MD5.
SMTP Auth is enabled :
28150:20180330:175847.491 ****** Enabled features ******
28150:20180330:175847.491 SNMP monitoring: YES
28150:20180330:175847.491 IPMI monitoring: YES
28150:20180330:175847.491 Web monitoring: YES
28150:20180330:175847.491 VMware monitoring: YES
28150:20180330:175847.491 SMTP authentication: YES
28150:20180330:175847.491 Jabber notifications: YES
28150:20180330:175847.491 Ez Texting notifications: YES
28150:20180330:175847.491 ODBC: YES
28150:20180330:175847.491 SSH2 support: YES
28150:20180330:175847.491 IPv6 support: YES
28150:20180330:175847.491 TLS support: YES
28150:20180330:175847.491 ******************************
I successfully configured it with my google mail using google SMTP server, but I want it to run through my mail server.
I know I could configure postfix locally to workaround this but I should be able to talk to my SMTP server directly.
Maybe we can tweak CURL options when it comes to authentication method? How?
EDIT :
Here is a debug of the SMTP session with zabbixtest / Test123# as password
# Server
250-myserver.org
250-AUTH CRAM-MD5 PLAIN LOGIN DIGEST-MD5
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-PIPELINING
250-ETRN
250-DSN
250 HELP
# Zabbix
AUTH DIGEST-MD5
# Server
334 cmVhbG09InNydjIudHluc29lLm9yZyIsbm9uY2U9IkZtNGR6WT NyR08xRWVZbE5YTUJlNWc9PSIscW9wPSJhdXRoIixhbGdvcml0 aG09bWQ1LXNlc3M=
# Note, here is the decoded content :
# realm="myserver.org",nonce="Fm4dzY3rGO1EeYlNXMBe5g ==",qop="auth",algorithm=md5-sess
# Zabbix
dXNlcm5hbWU9InphYmJpeHRlc3QiLHJlYWxtPSJzcnYyLnR5bn NvZS5vcmciLG5vbmNlPSJGbTRkelkzckdPMUVlWWxOWE1CZTVn PT0iLGNub25jZT0iMDFiZmYzNmUiLG5jPSIwMDAwMDAwMSIsZG lnZXN0LXVyaT0ic210cC9zcnYyLnR5bnNvZS5vcmciLHJlc3Bv bnNlPTZhNzdjMmVjNWE4YTk5YWVkZDQ5NTBkMjAxM2Q2ZDk2
# Note, here is the decoded content
# username="zabbixtest",realm="myserver.org",nonce=" Fm4dzY3rGO1EeYlNXMBe5g==",cnonce="01bff36e",nc="00 000001",digest-uri="smtp/myserver.org",response=6a77c2ec5a8a99aedd4950d2013 d6d96
# Server
535 5.7.0 Authentication failed
I'm trying to configure Zabbix to use my own SMTP server (the one I use in my email clients, all the products that needs to send emails etc).
Problem is, it doesn't seem like Zabbix is correctly sending credential and authentication is always refused. Things like :
[30/Mar/2018 15:05:44] SMTP server connection from x.x.x.x closed after 3 bad commands
[30/Mar/2018 15:43:27] Failed SMTP login from x.x.x.x with SASL method DIGEST-MD5.
SMTP Auth is enabled :
28150:20180330:175847.491 ****** Enabled features ******
28150:20180330:175847.491 SNMP monitoring: YES
28150:20180330:175847.491 IPMI monitoring: YES
28150:20180330:175847.491 Web monitoring: YES
28150:20180330:175847.491 VMware monitoring: YES
28150:20180330:175847.491 SMTP authentication: YES
28150:20180330:175847.491 Jabber notifications: YES
28150:20180330:175847.491 Ez Texting notifications: YES
28150:20180330:175847.491 ODBC: YES
28150:20180330:175847.491 SSH2 support: YES
28150:20180330:175847.491 IPv6 support: YES
28150:20180330:175847.491 TLS support: YES
28150:20180330:175847.491 ******************************
I successfully configured it with my google mail using google SMTP server, but I want it to run through my mail server.
I know I could configure postfix locally to workaround this but I should be able to talk to my SMTP server directly.
Maybe we can tweak CURL options when it comes to authentication method? How?
EDIT :
Here is a debug of the SMTP session with zabbixtest / Test123# as password
# Server
250-myserver.org
250-AUTH CRAM-MD5 PLAIN LOGIN DIGEST-MD5
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-PIPELINING
250-ETRN
250-DSN
250 HELP
# Zabbix
AUTH DIGEST-MD5
# Server
334 cmVhbG09InNydjIudHluc29lLm9yZyIsbm9uY2U9IkZtNGR6WT NyR08xRWVZbE5YTUJlNWc9PSIscW9wPSJhdXRoIixhbGdvcml0 aG09bWQ1LXNlc3M=
# Note, here is the decoded content :
# realm="myserver.org",nonce="Fm4dzY3rGO1EeYlNXMBe5g ==",qop="auth",algorithm=md5-sess
# Zabbix
dXNlcm5hbWU9InphYmJpeHRlc3QiLHJlYWxtPSJzcnYyLnR5bn NvZS5vcmciLG5vbmNlPSJGbTRkelkzckdPMUVlWWxOWE1CZTVn PT0iLGNub25jZT0iMDFiZmYzNmUiLG5jPSIwMDAwMDAwMSIsZG lnZXN0LXVyaT0ic210cC9zcnYyLnR5bnNvZS5vcmciLHJlc3Bv bnNlPTZhNzdjMmVjNWE4YTk5YWVkZDQ5NTBkMjAxM2Q2ZDk2
# Note, here is the decoded content
# username="zabbixtest",realm="myserver.org",nonce=" Fm4dzY3rGO1EeYlNXMBe5g==",cnonce="01bff36e",nc="00 000001",digest-uri="smtp/myserver.org",response=6a77c2ec5a8a99aedd4950d2013 d6d96
# Server
535 5.7.0 Authentication failed
Comment