canvas-lms icon indicating copy to clipboard operation
canvas-lms copied to clipboard

SMTP stopped sending emails

Open Waleed-Ramadan opened this issue 4 years ago • 7 comments

Summary:

we are using AWS ec2 canvas Bitnami LMS version 2020.12.16.47-1, and the email was working for like 1 month, suddenly the emails stopped without changing anything in the outgoing_mail.yml

here is the outgoing mail configuration we are using and it was working with it

production: enable_starttls_auto: true address: "smtp.postmarkapp.com" port: 587 user_name: "username" password: "password" authentication: plain

plain, login, or cram_md5

domain: "qasid.com" outgoing_address: "[email protected]" default_name: "Qasid Arabic Institute"

Waleed-Ramadan avatar Mar 31 '21 15:03 Waleed-Ramadan

Just a hunch, but sounds like its the new TLS 1.2 requirement. We had this happen with several services/servers/email servers. Once we disabled TLS 1.0/1.1, and forces TLS 1.2, all the problems went away.


From: Waleed-Ramadan @.> Sent: Wednesday, March 31, 2021 11:09:33 AM To: instructure/canvas-lms @.> Cc: Subscribed @.***> Subject: [instructure/canvas-lms] SMTP stopped sending emails (#1838)

Summary:

we are using AWS ec2 canvas Bitnami LMS version 2020.12.16.47-1, and the email was working for like 1 month, suddenly the emails stopped without changing anything in the outgoing_mail.yml

here is the outgoing mail configuration we are using and it was working with it

production: enable_starttls_auto: true address: "smtp.postmarkapp.com" port: 587 user_name: "username" password: "password" authentication: plain

plain, login, or cram_md5

domain: "qasid.com" outgoing_address: @.@.>" default_name: "Qasid Arabic Institute"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/instructure/canvas-lms/issues/1838, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA7A72ZYZUPGGUMNJAS6VYLTGM3K3ANCNFSM42E35AKA.

Revelation1714 avatar Mar 31 '21 15:03 Revelation1714

can you help me from where I should make these changes on TLS

Waleed-Ramadan avatar Mar 31 '21 15:03 Waleed-Ramadan

This is the post i used to figure it out on our bitnami canvas installation, and it worked: https://stackoverflow.com/questions/59417470/how-to-disable-tls-1-0-and-1-1-to-enable-only-tls-1-2-and-tls-1-3-in-apache-for

Note: not all bitnami images have an identical structure (i found out). So you may have to change some of the paths referenced in the post above to match your paths.


From: Waleed-Ramadan @.> Sent: Wednesday, March 31, 2021 11:37:55 AM To: instructure/canvas-lms @.> Cc: Revelation1714 @.>; Comment @.> Subject: Re: [instructure/canvas-lms] SMTP stopped sending emails (#1838)

can you help me from where I should make these changes on TLS

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/instructure/canvas-lms/issues/1838#issuecomment-811163680, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA7A723AEZLIN3J57YBXZVLTGM6VHANCNFSM42E35AKA.

Revelation1714 avatar Mar 31 '21 15:03 Revelation1714

try this psql canvas -c "select created_at, message, backtrace from error_reports order by id desc;"

change "canvas" for your actual database name, you will get a log of errors

designamx avatar Apr 21 '21 17:04 designamx

Hi, I launched a site using bitnami LMS Canvas and I tried to set up an SMTP for my site. I tried several SMTP hosts like mailchimp(madrill SMTP), gmail SMTP and AWS SES. The test mail is working perfectly(SMTP Online tester) but in CANVAS it is not working. I edited my outgoing_mail.yml file and checked. The mail is not sending in any of the SMTP Server I have mentioned above and also the madrill SMTP worked for a while but it is also not working now.

outgoing_mail.yml: While using gmail SMTP:

production: address: "smtp.gmail.com" tls : true port: "587" user_name: "XXXXXX" password: "XXXXXXXXXXXXX" authentication: "login" # plain, login, or cram_md5 domain: "XXXXXXXXXXX.in" outgoing_address: "XXXXXXXX" default_name: "XXXXXXXX"

While using madrill SMTP: production: address: "smtp.mandrillapp.com" tls : true port: "587" user_name: "XXXXXX" password: "XXXXXXXXXXXXX" authentication: "login" # plain, login, or cram_md5 domain: "XXXXXXXXXXX.in" outgoing_address: "XXXXXXXX" default_name: "XXXXXXXX"

While using AWS(SES) SMTP: production: address: "XXXXXXXXXXXXXXX(The host I got from AWS SES)" tls : true port: "587" user_name: "XXXXXX" password: "XXXXXXXXXXXXX" authentication: "login" # plain, login, or cram_md5 domain: "XXXXXXXXXXX.in" outgoing_address: "XXXXXXXX" default_name: "XXXXXXXX"

   I don't know what I am missing and also madrill SMTP is worked for a while but I don't know why it is not working now. Could anybody please reply and correct me if I am done anything wrong. 

Thanks.

impnandhu avatar Feb 22 '22 06:02 impnandhu

my issue was from one of the Database tables, it wasn't created automatically because of the user permission that's why the email didn't go through, you need to check the DB log to see if there is any table that is not created automatically

the table that I was having an issue with is this: "public.messages_2021_x" does not exist at character 8 so i have to created manually until i fixed the user permission to make it automatically

so maybe you have the same issue,

Waleed-Ramadan avatar Feb 22 '22 07:02 Waleed-Ramadan

Thanks waleed... I saw some some of the errors in in the error_reports table and rectified it... But now I got a new error in the error_reports table:

Message delivery failed 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbv

I searched in google and tried to rectify this error but the error is not solved. Again and again I got the same error in the error_reports table.

and also I checked messages table it is showing that "staged" in the workflow_state column for all the mails I tried to sent. I executed the following query: select id,created_at,"to","from",workflow_state from messages order by id desc;

id | created_at | to | from | workflow_state -----+----------------------------+---------------------------------------+--------------------+---------------- XX | XXXXXXXXXXXXXXXXXXX | (mail_id) of my student | | staged

Could anyone please provide any suggestion to solve this... Thanks in advance

impnandhu avatar Mar 01 '22 11:03 impnandhu

Best resources for support for OSS Canvas is the Mailing List or IRC Channel.

http://instructure.github.io/

johntheocs avatar Nov 05 '22 00:11 johntheocs