我尝试在我的Gitlab实例中配置SMTP(遵循this指南)。但是不要让它发挥作用。
gitlab.rb
gitlab_rails['gitlab_email_from'] = "admin@dennx.com"
gitlab_rails['gitlab_support_email'] = "admin@dennx.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@dennx.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@dennx.com (8017.5ms)
mail.log
May 9 09:02:14 nday postfix/smtp[27203]: B16EF12019C: to=<i@dennx.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@dennx.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)
BTW:我已经更改了DNS并刷新了。 mail.log
没有记录我的操作。这是旧日志。
答案 0 :(得分:2)
您的帐户在Digital Ocean上是新用户吗?
如果是,您需要让他们解锁sendmail功能。
此解锁是按帐户进行的,而不是通过Droplet进行的。 在解锁后,您可以在您创建的所有其他飞沫中使用sendmail。