阿里邮件服务参数设置问题


(admini) #1

首先我的/var/discourse/containers/app.yml 配置如下:

##TODO: The domain name this Discourse instance will respond to
DISCOURSE_HOSTNAME: ‘118.xxx.xxx.71’

##Uncomment if you want the container to be started with the same
##hostname (-h option) as specified above (default “$hostname-$config”)
#DOCKER_USE_HOSTNAME: true

##TODO: List of comma delimited emails that will be made admin and developer
##on initial signup example 'user1@example.com,user2@example.com’
DISCOURSE_DEVELOPER_EMAILS: ‘admin@mail.xxxxxx.com’

##TODO: The SMTP mail server used to validate new accounts and send notifications
DISCOURSE_SMTP_ADDRESS: smtpdm.aliyun.com # required
DISCOURSE_SMTP_PORT: 80 # (optional, default 587)
DISCOURSE_SMTP_USER_NAME: admin@mail.xxxxxx.com # required
DISCOURSE_SMTP_PASSWORD: ZJmail1234567 # required, WARNING the char ‘#’ in pw can cause problems!
DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)

##If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
#LETSENCRYPT_ACCOUNT_EMAIL: me@example.com

##The CDN address for this Discourse instance (configured to pull)
##see https://meta.discourse.org/t/14857 for details
#DISCOURSE_CDN_URL: //discourse-cdn.example.com

##The Docker container is stateless; all data is stored in /shared
volumes:

  • volume:
    host: /var/discourse/shared/standalone
    guest: /shared
  • volume:
    host: /var/discourse/shared/standalone/log/var-log
    guest: /var/log

##Plugins go here
##see https://meta.discourse.org/t/19157 for details
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git

##Any custom commands to run after building
run:

  • exec: echo “Beginning of custom commands”
    ##If you want to set the ‘From’ email address for your first registration, uncomment and change:
    ##After getting the first signup email, re-comment the line. It only needs to run once.
  • exec: rails r “SiteSetting.notification_email=‘531864800@qq.com’”
  • exec: echo “End of custom commands”

大家好我安装在腾讯云,用阿里邮件服务但总是接收不到邮件想请大神帮我解释一下这些参数:

DISCOURSE_DEVELOPER_EMAILS: ‘admin@mail.xxxxxx.com’

DISCOURSE_SMTP_ADDRESS: smtpdm.aliyun.com # required
DISCOURSE_SMTP_PORT: 80 # (optional, default 587)
DISCOURSE_SMTP_USER_NAME: admin@mail.xxxxxx.com # 我的阿里邮件推送的发信域名的发信地址
DISCOURSE_SMTP_PASSWORD: ZJmail1234567 # 发信地址的smtp密码

  • exec: rails r “SiteSetting.notification_email=‘531864800@qq.com’” #我自己的邮箱

我的域名为xxxxxx.com,请问我以上的参数设置正确吗?
另外还有看别人帖子说DISCOURSE_DEVELOPER_EMAILS 要和DISCOURSE_SMTP_USER_NAME 相同?但如果相同的话我怎么接受邮件呢?
SiteSetting.notification_email要设置吗?是不是随便设置我自己的邮箱就可以?
DISCOURSE_SMTP_ADDRESS和端口号是正确的吗?

还有发信地址和企业邮箱账号/子账号有什么关系吗?
小白谢谢解答,感激不尽。