Gomail: could not send email

Hi!

Im using Kapacitor version 1.2.0.

I have configured alerts to be sent via SMTP (using AWS SES).
Sometimes the emails don’t send properly, with the following error message:
[smtp] 2017/05/11 00:33:30 E! error closing connection to SMTP server: 421 Timeout waiting for data from client.
[smtp] 2017/05/11 00:34:30 E! gomail: could not send email 1: 421 Timeout waiting for data from client.
[smtp] 2017/05/11 00:35:00 E! error closing connection to SMTP server: EOF

I found this thread about the subject:

But I can not really figure out how to implement that in Kapacitor. Is there a timeout option for SMTP?

@hasselrot Looks like your error is coming from this line. Have you tried changing the idle-timeout:

$ kapacitord config
...
[smtp]
  enabled = false
  host = "localhost"
  port = 25
  username = ""
  password = ""
  no-verify = false
  global = false
  state-changes-only = false
  from = ""
  idle-timeout = "30s"
...

If that doesn’t work for you I would suggest opening an issue on kapacitor.

@jackzampolin yes you are right. A lower idle-timeout gives less timeout errors :slight_smile:

Seems to work well for us now. Thanks!

1 Like

@hasselrot Glad that worked!