我在 digital-ocean 上构建的 gitlab 无法向新用户发送邮件

my gitlab build on digital-ocean cannot send mail to new user

我尝试在我的 Gitlab 实例中配置 SMTP(遵循 this 指南)。但不要让它工作。

gitlab.rb

gitlab_rails['gitlab_email_from'] = "admin@example.com"
gitlab_rails['gitlab_support_email'] = "admin@example.com"
#nginx['redirect_http_to_https'] = false
#nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.crt"
#nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.key"

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = 'smtp.exmail.qq.com'
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = 'admin@example.com'
gitlab_rails['smtp_password'] = 'has been removed'
gitlab_rails['smtp_domain'] = 'smtp.qq.com'
gitlab_rails['smtp_authentication'] = :plain
gitlab_rails['smtp_enable_starttls_auto'] = true

production.log

Sent mail to i@example.com (8017.5ms)

mail.log

May  9 09:02:14 nday postfix/smtp[27203]: B16EF12019C: to=<i@example.com>, relay=none, delay=1049, delays=1017/0.04/32/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=mxbiz2.qq.com type=AAAA: Host not found, try again)s
May  9 09:02:14 nday postfix/smtp[27202]: 40274120CA7: to=<i@example.com>, relay=none, delay=988, delays=955/0.04/32/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=mxbiz2.qq.com type=AAAA: Host not found, try again)

顺便说一句:我已经更改了 DNS 并刷新了。 mail.log 还没有记录我的操作。这是旧日志。

您的帐户是 Digital Ocean 上的新帐户吗?

如果是,您需要要求他们解锁 sendmail 功能。

本次解锁是账号解锁,不是droplet。 解锁后,您将可以在您创建的所有其他 Droplet 中使用 sendmail。