Skip to main content

Graylog 設定 SMTP 服務

GraylogSMTP 在網頁上是無法設定的,所以只能在 graylog 設定檔裡面做設定


  • vim /etc/graylog/server/server.conf 設定檔裡面新增
# Email transport
#transport_email_enabled = false
#transport_email_hostname =
#transport_email_port = 587
#transport_email_use_auth = true
#transport_email_auth_username = [email protected]
#transport_email_auth_password = secret
#transport_email_subject_prefix = [graylog]
#transport_email_from_email = [email protected]

 Email transport
transport_email_enabled = false
transport_email_hostname =
transport_email_port = 587
transport_email_use_auth = true
transport_email_auth_username = [email protected]
transport_email_auth_password = secret
transport_email_subject_prefix = [graylog]
transport_email_from_email = [email protected]

# Encryption settings
#    Using SMTP with STARTTLS *and* SMTPS at the same time is *not* possible.

# Use SMTP with STARTTLS, see
#transport_email_use_tls = true
transport_email_use_tls = true

在 3.0 之後這個設定方式是不能啟用的,不然 graylog 會有問題,所以只註解 graylog 目前只支援 STARTTLS 認證
# Use SMTP over SSL (SMTPS), see
# This is deprecated on most SMTP services!
#transport_email_use_ssl = true

# Specify and uncomment this if you want to include links to the stream in your stream alert mails.
# This should define the fully qualified base url to your web interface exactly the same way as it is accessed by your users.
#transport_email_web_interface_url =
transport_email_web_interface_url =


  • 檢查 mail 憑證問題


The Graylog server encountered an error while trying to send an email. This is the detailed error message: org.apache.commons.mail.EmailException: Sending the email to the following server failed : (javax.mail.MessagingException: Could not convert socket to TLS; nested exception is: Remote host terminated the handshake)


openssl s_client -starttls smtp -showcerts -connect mail主機:587 -servername mail主機