0

I recently changed my gmail password and changed the password in server.conf as well, but now graylog's email alerting fails with:

Sending the email to the following server failed : smtp.gmail.com:587 (javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials h12sm2292608qkp.52 - gsmtp )

Here are the email entries in server.conf:

transport_email_enabled = true
transport_email_hostname = smtp.gmail.com
transport_email_port = 587
transport_email_use_auth = true
transport_email_use_tls = true
transport_email_auth_username = myemail@gmail.com
transport_email_auth_password = Fake!@$#%^&*()"password
transport_email_subject_prefix = [Log-Alerts]
transport_email_from_email = logs@domain.com

The settings are the same in the alert config in the web gui as well.

I know the username, email, port, server, and tls options are correct, as zabbix (hosted on the same server) is able to send emails to my gmail completely fine.

I am concerned that my new password containing special characters, !@#$%^&*" is tripping up the server.conf and it is reading the password wrong.

Is there a way to give the password field in server.conf an external file instead? Graylog does not mention this anywhere in their documentation.

ehammer
  • 75
  • 1
  • 10

1 Answers1

2

At the beggining of the configuration file, we can read the following:

# This is the Graylog configuration file. The file has to use ISO 8859-1/Latin-1 character encoding.
# Characters that cannot be directly represented in this encoding can be written using Unicode escapes
# as defined in https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.3, using the \u prefix.
# For example, \u002c.

So, double check that each chars in your password are listed in the ISO/IEC 8859-1 code page. Otherwise, you'll have to escape them. When in doubt, escape the char.

Swisstone
  • 6,357
  • 7
  • 21
  • 32
  • The character table you linked to does indeed have all the characters that are in my password represented in that table. I suppose I could try escaping all non alphanumeric characters to see what happens. – ehammer Oct 26 '21 at 00:22
  • 1
    Escaping all non-alphanumeric characters worked. Thanks! – ehammer Oct 26 '21 at 00:27