我已经安装了 Open edX bitnami ami 并对其进行了测试。我面临 smtp 电子邮件配置的问题。我按照此处的说明进行操作:Bitnami Open edX - 如何配置出站电子邮件设置
但这不起作用。电子邮件没有被发送,我无法通过查看日志文件来追踪原因。然后我按照这里的配置:为 EDX(生产堆栈)启用 SMTP并配置postfix
了mandrill
smtp 邮件服务。从服务器此命令有效:
sendemail -f registration@myedx.com -t mymail@gmail.com -m "Message Body" -u "Message Subject"
但是形成edX
我得到错误的实例。该edx.log
文件如下所示:
Traceback (most recent call last):
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 109, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view
return view_func(*args, **kwargs)
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/views/decorators/http.py", line 41, in inner
return func(request, *args, **kwargs)
File "/opt/bitnami/apps/edx/edx-platform/common/djangoapps/student/views.py", line 1890, in password_reset
domain_override=request.get_host())
File "/opt/bitnami/apps/edx/edx-platform/common/djangoapps/student/forms.py", line 72, in save
send_mail(subject, email, from_email, [user.email])
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/core/mail/__init__.py", line 61, in send_mail
connection=connection).send()
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/core/mail/message.py", line 248, in send
return self.get_connection(fail_silently).send_messages([self])
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 85, in send_messages
new_conn_created = self.open()
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 50, in open
self.connection.ehlo()
File "/opt/bitnami/python/lib/python2.7/smtplib.py", line 413, in ehlo
self.putcmd(self.ehlo_msg, name or self.local_hostname)
File "/opt/bitnami/python/lib/python2.7/smtplib.py", line 341, in putcmd
self.send(str)
File "/opt/bitnami/python/lib/python2.7/smtplib.py", line 333, in send
raise SMTPServerDisconnected('please run connect() first')
SMTPServerDisconnected: please run connect() first
知道如何解决这个问题吗?或者如何在 bitnamiedX
实例中激活 smtp 电子邮件?