Amazon SES not working with Discourse new install


(Ramandeep Singh) #1

Hi all,
I am trying to set-up Discourse from last 4 days on DigitalOcean. One-click setup was pretty easy. Getting confirmation is easy a difficult task. I tried everything. Everything is fine on DG and Amazon SES. I have verified the domain as well the email on Amazon SES console. I am using my domain email via Zoho mail.

DISCOURSE_SMTP_ADDRESS: email-smtp.us-east-1.amazonaws.com # (mandatory)
DISCOURSE_SMTP_PORT: 587 # (optional)
DISCOURSE_SMTP_USER_NAME: srr%^^TTGGG # (optional)
DISCOURSE_SMTP_PASSWORD: %$R$RTRrrfr3466 # (optional, WARNING the char ‘#’ in pw can cause problems!)
DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
DISCOURSE_SMTP_AUTHENTICATION: “login”

Everything is as per setup instructions. I tried to get my answer here but nobody is having time to answer.

I don’t want to use Mandrill because they are merging with Mailchimp and their pricing plans will increase by 1000%. I want to use Amazon SES because I am already using it and satisfied with it.

Anybody here, who can fix the bug.


(Régis Hanol) #2

Well, what kind of errors are you having? Have you tried sending a test email? Have you checked your.discourse/logs?


(Ramandeep Singh) #3

I am unable to login into the admin dashboard yet, well auth.log file is quite. Pasting last few lines

Mar 15 05:21:57 IBPStoday-NEW sshd[1733]: Invalid user webalizer from 202.138.102.3
Mar 15 05:21:57 IBPStoday-NEW sshd[1733]: input_userauth_request: invalid user webalizer [preauth]
Mar 15 05:21:57 IBPStoday-NEW sshd[1733]: pam_unix(sshd:auth): check pass; user unknown
Mar 15 05:21:57 IBPStoday-NEW sshd[1733]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=202.138.102.3 
Mar 15 05:21:59 IBPStoday-NEW sshd[1733]: Failed password for invalid user webalizer from 202.138.102.3 port 47901 ssh2
Mar 15 05:21:59 IBPStoday-NEW sshd[1733]: Received disconnect from 202.138.102.3: 11: Bye Bye [preauth]
Mar 15 05:22:00 IBPStoday-NEW login[1090]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=/dev/tty1 ruser= rhost=  user=root
Mar 15 05:22:03 IBPStoday-NEW login[1090]: FAILED LOGIN (1) on '/dev/tty1' FOR 'root', Authentication failure
Mar 15 05:22:14 IBPStoday-NEW login[1090]: FAILED LOGIN (2) on '/dev/tty1' FOR 'root', Authentication failure
Mar 15 05:22:28 IBPStoday-NEW sshd[1795]: Invalid user ubnt from 185.110.132.54
Mar 15 05:22:28 IBPStoday-NEW sshd[1795]: input_userauth_request: invalid user ubnt [preauth]
Mar 15 05:22:28 IBPStoday-NEW sshd[1795]: pam_unix(sshd:auth): check pass; user unknown
Mar 15 05:22:28 IBPStoday-NEW sshd[1795]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=185.110.132.54 
Mar 15 05:22:31 IBPStoday-NEW sshd[1795]: Failed password for invalid user ubnt from 185.110.132.54 port 51143 ssh2
Mar 15 05:22:31 IBPStoday-NEW sshd[1795]: Received disconnect from 185.110.132.54: 11: Bye Bye [preauth]
Mar 15 05:22:45 IBPStoday-NEW login[1090]: pam_unix(login:account): expired password for user root (root enforced)
Mar 15 05:23:13 IBPStoday-NEW login[1090]: pam_unix(login:chauthtok): password changed for root
Mar 15 05:23:14 IBPStoday-NEW login[1090]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Mar 15 05:23:14 IBPStoday-NEW login[1894]: ROOT LOGIN  on '/dev/tty1'
Mar 15 05:24:23 IBPStoday-NEW sshd[1987]: reverse mapping checking getaddrinfo for abts-north-dynamic-124.63.173.122.airtelbroadband.in [122.173.63.124] failed - POSSIBLE BREAK-IN ATTEMPT!
Mar 15 05:24:23 IBPStoday-NEW sshd[1987]: Accepted password for root from 122.173.63.124 port 29699 ssh2
Mar 15 05:24:23 IBPStoday-NEW sshd[1987]: pam_unix(sshd:session): session opened for user root by (uid=0)
Mar 15 05:28:43 IBPStoday-NEW sshd[2352]: Invalid user webalizer from 202.138.102.3
Mar 15 05:28:43 IBPStoday-NEW sshd[2352]: input_userauth_request: invalid user webalizer [preauth]
Mar 15 05:28:43 IBPStoday-NEW sshd[2352]: pam_unix(sshd:auth): check pass; user unknown
Mar 15 05:28:43 IBPStoday-NEW sshd[2352]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=202.138.102.3 
Mar 15 05:28:44 IBPStoday-NEW sshd[2352]: Failed password for invalid user webalizer from 202.138.102.3 port 36969 ssh2
Mar 15 05:28:44 IBPStoday-NEW sshd[2352]: Received disconnect from 202.138.102.3: 11: Bye Bye [preauth]
Mar 15 05:35:28 IBPStoday-NEW sshd[2807]: Invalid user webalizer from 202.138.102.3
Mar 15 05:35:28 IBPStoday-NEW sshd[2807]: input_userauth_request: invalid user webalizer [preauth]
Mar 15 05:35:28 IBPStoday-NEW sshd[2807]: pam_unix(sshd:auth): check pass; user unknown
Mar 15 05:35:28 IBPStoday-NEW sshd[2807]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=202.138.102.3 
Mar 15 05:35:29 IBPStoday-NEW sshd[2807]: Failed password for invalid user webalizer from 202.138.102.3 port 54269 ssh2
Mar 15 05:35:30 IBPStoday-NEW sshd[2807]: Received disconnect from 202.138.102.3: 11: Bye Bye [preauth]

(Everaldo Gomes) #5

Hello @raman2572

Take a look at this link:

Troubleshooting email on a new Discourse install

Remember: after changing app.yml you have to use launcher rebuild (if you are using Docker).

The only way I could get it fixed was creating an admin user manually, then fixing email settings inside admin dashboard.

Take a look at this link too:

Best regards,
Everaldo


(Anton) #6

Will Amazon SES work for transactional email alone, or will it only work as a complementary service to those who buy EC2 or something else from Amazon?

I mean, can I use Amazon SES only?

Finally, are there any benefits of using Mandrill over Amazon SES?


(Timothee Besset) #7

I have the same problem. I believe it is because the SMTP password generated by SES sometimes has a forward slash (/). Discourse chokes on that. In discourse-setup:

sed -i -e "s/^ #DISCOURSE_SMTP_PASSWORD:.*/ DISCOURSE_SMTP_PASSWORD: \"$smtp_password\"/w $changelog" $config_file

A simple workaround is to enter a dummy password with no bad characters, then later write the correct one directly in app.yml