Email Authentication error


(Amit Kashyap) #1

I am getting authentication error while sending mail throug logstash.
below is my Email configuration I set

	email {
	  debug => true
	  authentication => "login"
	  address => "**my mail server IP**"
	  port => 25
	  username => "**service account name**"
	  password => "**service account password**"
	  body => "text mail to check notification"
	  from => "**my mail id**"
	  subject => "Test mail to check notification"
	  to => "**my mail id**"
	}

I am getting below error

[2017-02-08T09:39:02,129][ERROR][logstash.outputs.email ] Something happen while delivering an email {:exception=>#<Net::SMTPSyntaxError: 504 5.7.4 Unrecognized authentication type

}

am I missing any mail parameter which is causing this error or I have to set different value for authentication?


(Magnus Bäck) #2

Try setting authentication to "plain". If that doesn't help, please telnet to port 25 of your email server, type EHLO yourhostname (insert your hostname) and report the response. It should look similar to this but hopefully with an AUTH line:

250-PIPELINING
250-SIZE 25067520
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

(Amit Kashyap) #3

Thank you Magnus. but setting authentication to "plain" did not work. here is the response after running EHLO hostname:

EHLO host name
250-host name Hello [IP]
250-SIZE 36700160
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250 CHUNKING

I have removed server specific detals for privacy..


(Magnus Bäck) #4

That server doesn't offer SMTP authentication. Switch to one that does or disable authentication on the Logstash side.


(Amit Kashyap) #5

Thank you. in our email server, authentication was not enabled and after removing the authentication entry, I was able to generate the mail.


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.