Hello There,
I’m trying to configure email alerts on graylog (using docker to run it, mongo and elastic, working fine for logs), but for mails it is not working and I’m not sure why, my email server is on another server.
Config:
graylog:
image: graylog/graylog:4.1.2
environment:
- GRAYLOG_ROOT_TIMEZONE=Etc/GMT+3
- GRAYLOG_PASSWORD_SECRET=blablabla
- GRAYLOG_ROOT_PASSWORD_SHA2=blablabla
- GRAYLOG_WEB_ENDPOINT_URI=http://10.10.0.5:9000/api
- GRAYLOG_TRANSPORT_EMAIL_ENABLED=true
- GRAYLOG_TRANSPORT_EMAIL_PROTOCOL=smtp
- GRAYLOG_TRANSPORT_EMAIL_HOSTNAME=10.0.0.189
- GRAYLOG_TRANSPORT_EMAIL_PORT=587
- GRAYLOG_TRANSPORT_EMAIL_USE_AUTH=true
- GRAYLOG_TRANSPORT_EMAIL_AUTH_USERNAME=user@mydomain.com
- GRAYLOG_TRANSPORT_EMAIL_AUTH_PASSWORD=useremailpassword
- GRAYLOG_TRANSPORT_EMAIL_USE_TLS=true
- GRAYLOG_TRANSPORT_EMAIL_USE_SSL=false
- GRAYLOG_TRANSPORT_EMAIL_FROM_EMAIL=user@mydomain.com
- GRAYLOG_TRANSPORT_EMAIL_SUBJECT_PREFIX=[graylog]
links:
................
If I connect on the graylog container (docker exec) and try to connect via openssl to the mail server (10.10.0.5) and send an email manually it works just fine.
[root@ip-10-10-0-5:/docker]: openssl s_client -starttls smtp -connect 10.0.0.189:587
CONNECTED(00000003)
...........
verify error:num=18:self signed certificate
verify return:1
...........
---
250 CHUNKING
EHLO mydomain.com
250-mailing.mydomain.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250 CHUNKING
AUTH PLAIN AHBvcnRhbDE1OTczAFdjSjhIbUxGWWExRXRVSTVBcz
235 2.7.0 Authentication successful
MAIL FROM: user@mydomain.com
250 2.1.0 Ok
rcpt to: user@othereemail.com
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Hello from manual mail inside the container
.
250 2.0.0 Ok: queued as 2F1BBCA750
quit
221 2.0.0 Bye
closed
Don’t know what else can I try, or how to debug this.
Thanks for any help.