我正在尝试在AWS EC2实例上设置Discourse,但是在通过AWS SES发送电子邮件方面遇到了问题.
首先,我在AWS SES上设置了电子邮件和域并进行了确认(不在沙盒模式下),我可以从AWS SES仪表板成功发送测试电子邮件,也可以通过在Discourse机器实例上运行的后缀手动进行发送./p>
我尝试按照此处的说明进行操作: stroupaloop/blog/discourse-setup-using-aws/(尽管现在意识到这已经很老了,所以现在的配置可能有所不同),并且还找到了请使用Discourse SES AWS工作的app.yml文件示例-但此配置也不适用于我.
有关信息,我正在通过...来编辑app.yml文件.
$ sudo ./launcher stop app $ sudo nano ./containers/app.yml[进行编辑并保存]
$ sudo ./launcher bootstrap app[它告诉我它已正确引导]
$ sudo ./launcher start app[我现在可以查看讨论站点,但是由于未发送确认电子邮件,因此无法登录任何帐户]
当前,我的app.yml文件中有此文件(已替换敏感信息):
DISCOURSE_SMTP_ADDRESS: email-smtp.eu-west-1.amazonaws DISCOURSE_SMTP_PORT: 587 DISCOURSE_SMTP_USER_NAME: XXXXXXXXXXXXXXXX DISCOURSE_SMTP_PASSWORD: XXXXXXXXXXXXXXXXXXXX DISCOURSE_SMTP_ENABLE_START_TLS: true DISCOURSE_SMTP_AUTHENTICATION: "login" DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none DISCOURSE_SMTP_DOMAIN: mydomain DISCOURSE_SMTP_FROM_ADDRESS: me@mydomain此外,在SES发送统计信息面板中,我什至没有看到它正在尝试发送电子邮件.
因此,即使是一个很好的起点,也要知道Discourse Docker容器中是否有电子邮件日志文件,我可以查看该文件以了解问题所在.
在这里我要哪里出错的任何帮助,将不胜感激.
解决方案我遇到了类似的问题,并通过编辑app.yml并将此行添加到末尾(默认情况下已注释掉了该行)来解决此问题:
- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse'"您必须用与您的SES凭据关联的经过验证的电子邮件地址替换info@unconfigured.discourse.您可以在AWS-> SES->身份管理->电子邮件地址下检查已验证的电子邮件地址身份,必须验证验证状态.如果您设法从此处发送和接收测试电子邮件,则可能已经设置好了.
一旦应用了这些更改,请重新运行安装脚本以获取更改:
sudo ./discourse-setup希望这对您有用!
I'm trying to get Discourse set up on an AWS EC2 instance, but am having problems getting the emails to send via AWS SES.
Firstly I have an email and a domain set up and confirmed (not in sandbox mode) on AWS SES and I can successfully send test emails from the AWS SES dashboard, and also manually through postfix running on the Discourse machine instance.
I have attempted to follow instructions here: stroupaloop/blog/discourse-setup-using-aws/ (though realise this is quite old now, so perhaps the config is different now) and also found Discourse SES AWS working app.yml file example please - but this config isn't working for me either.
For info, I'm editing the app.yml file by doing....
$ sudo ./launcher stop app $ sudo nano ./containers/app.yml[making the edits and saving]
$ sudo ./launcher bootstrap app[it tells me it has bootstrapped correctly]
$ sudo ./launcher start app[I can now view the discourse site, but can;t login to any accounts as the confirmation emails aren't getting sent]
Currently I have this in my app.yml file (sensitive info replaced):
DISCOURSE_SMTP_ADDRESS: email-smtp.eu-west-1.amazonaws DISCOURSE_SMTP_PORT: 587 DISCOURSE_SMTP_USER_NAME: XXXXXXXXXXXXXXXX DISCOURSE_SMTP_PASSWORD: XXXXXXXXXXXXXXXXXXXX DISCOURSE_SMTP_ENABLE_START_TLS: true DISCOURSE_SMTP_AUTHENTICATION: "login" DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none DISCOURSE_SMTP_DOMAIN: mydomain DISCOURSE_SMTP_FROM_ADDRESS: me@mydomainAlso, in the SES sending stats dashboard, I'm not even seeing that it's trying to send the email.
So even a good starting point would be to know if there is an email log file somewhere in the Discourse docker container that I can look at to see what the issue may be.
Any help on where I'm going wrong here would be much appreciated.
解决方案I had a similar issue and I fixed it by editing app.yml and adding this line towards the end (the line is commented out by default):
- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse'"You must replace info@unconfigured.discourse with the validated email address associated with your SES credentials. You can check your validated email address identities under AWS -> SES -> Identity Management -> Email Addresses, the Verification Status must be verified. If you managed to send and receive a test email from here, you probably have this already set up.
Once you have applied these changes, re-run the setup script to pick up the changes:
sudo ./discourse-setupHope this works at your end!
更多推荐
AWS SES的话语电子邮件配置
发布评论