Email set up gone wrong?

Hi,

I have tried to configure the email smtp feature within an ironwood.master install. This is running on AWS ubuntu 16.04 t2.large ec2.

When I click forgot password - an email isnt’ sent. When registering a new user a confirmation email isn’t sent either.

Here is the error message from /edx/var/log/lms/edx.log

Jan 25 14:15:58 ip-172-31-21-82 [service_variant=lms][edx.celery.task][env:sandbox] ERROR [ip-172-31-21-82  6153] [tasks.py:48] - Unable to send activation email to user from "servicedesk@edxplatform.com
Traceback (most recent call last):
File "/edx/app/edxapp/edx-platform/common/djangoapps/student/tasks.py", line 23, in send_activation_email
mail.send_mail(subject, message, from_address, [dest_addr], fail_silently=False)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/mail/__init__.py", line 62, in send_mail
return mail.send()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/mail/message.py", line 348, in send
return self.get_connection(fail_silently).send_messages([self])
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 111, in send_messages
sent = self._send(message)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 127, in _send
self.connection.sendmail(from_email, recipients, message.as_bytes(linesep='\r\n'))
File "/usr/lib/python2.7/smtplib.py", line 751, in sendmail
raise SMTPDataError(code, resp)
SMTPDataError: (554, 'Message rejected: Email address is not verified. The following identities failed the check in region EU-WEST-1: useremailaddress@gmail.com')
Jan 25 14:15:58 ip-172-31-21-82 [service_variant=lms][celery.worker.job][env:sandbox] ERROR [ip-172-31-21-82  2369] [log.py:282] - Task student.tasks.send_activation_email[13a21020-7025-48$
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
return self.run(*args, **kwargs)
File "/edx/app/edxapp/edx-platform/common/djangoapps/student/tasks.py", line 50, in send_activation_email
raise Exception
Exception
Jan 25 14:16:05 ip-172-31-21-82 [service_variant=lms][openedx.core.djangoapps.catalog.utils][env:sandbox] WARNING [ip-172-31-21-82  3030] [utils.py:103] - Failed to get program UUIDs from $
Jan 25 14:20:02 ip-172-31-21-82 [service_variant=lms][openedx.core.lib.log_utils][env:sandbox] INFO [ip-172-31-21-82  3110] [log_utils.py:36] - ApiKeyHeaderPermission used: ip="127.0.0.1",$
Jan 25 14:20:02 ip-172-31-21-82 [service_variant=lms][py.warnings][env:sandbox] WARNING [ip-172-31-21-82  3110] [paginator.py:119] - /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-p$
paginator = self.django_paginator_class(queryset, page_size)

The smtp configurations utilise an AWS workmail email address - this is working fine when testing via workmail directly…

Can anyone suggest how I solve this?

@kribby
Check if all the necessary ports are open in the ec2 instance and same are allowed in aws console.

These are the ports that are open - am I missing something?

inbound rules
image

outbound rules
image

@kribby, this error message is coming from the SMTP server that your instance is configured to use. As it looks like you are using Amazon SES, can you check if the sender domain and email address are verified? Also if your account is in the SES sandbox, which all new accounts are in unless requested explicitly, you can only send emails to verified email addresses and domains. You can read more about these restrictions at Moving out of the Amazon SES sandbox - Amazon Simple Email Service.

1 Like

Thanks @guruprasad - the problem was the account was still in the SES sandbox.

For future reference to others here is a link to AWS error codes