我的VM上安装了
Linux Ubuntu 14.04.最近我使用
GitLab
site上的说明安装了GitLab 7.8.2,并在使Gitlab发送邮件时遇到了问题.
例如,当我尝试使用Web界面创建新用户时,我没有收到来自服务器的任何确认邮件.
>我已将postfix配置到我的环境(设置“mynetworks”,“myhostname”),并使用sendmail成功将测试邮件发送到我的yahoo帐户.
>我将这些行添加到文件/opt/gitlab/embedded/service/gitlab-ci/config/environments/production.rb:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "127.0.0.1",
port: 25,
enable_starttls_auto: false
}
>我在注册到我的GitLab实例时已经添加了/var/log/mail.log,并设法看到GitLab实际上与postfix交互但未成功.日志表明操作不成功,因为ip被阻止,但我不认为这是正确的,因为我可以使用sendmail命令发送邮件.
/var/log/mail.log:
Mar 6 10:58:32 ubuntu postfix/qmgr[12506]: 5BEE724E74: from=, size=630, nrcpt=1 (queue active)
Mar 6 10:59:02 ubuntu postfix/smtp[19746]: connect to example.com[93.184.216.34]:25: Connection timed out
Mar 6 10:59:02 ubuntu postfix/smtp[19746]: connect to example.com[2606:2800:220:1:248:1893:25c8:1946]:25: Network is unreachable
Mar 6 10:59:02 ubuntu postfix/smtp[19746]: 5BEE724E74: to=, relay=none, delay=30, delays=0.16/0.1/30/0, dsn=4.4.1, status=deferred (connect to example.com[2606:2800:220:1:248:1893:25c8:1946]:25: Network is unreachable)
Mar 6 11:00:50 ubuntu postfix/pickup[12505]: 07BF424E7A: uid=999 from=
Mar 6 11:00:50 ubuntu postfix/cleanup[19923]: 07BF424E7A: message-id=<54f9f961dca8d_4cc8fc2c6882575@ubuntu.mail>
Mar 6 11:00:50 ubuntu postfix/qmgr[12506]: 07BF424E7A: from=, size=626, nrcpt=1 (queue active)
Mar 6 11:00:51 ubuntu postfix/smtp[19925]: 07BF424E7A: to=, relay=mta6.am0.yahoodns.net[66.196.118.33]:25, delay=1.1, delays=0.02/0.01/0.86/0.18, dsn=5.7.1, status=bounced (host mta6.am0.yahoodns.net[66.196.118.33] said: 553 5.7.1 [BL21] Connections will not be accepted from 109.65.131.14, because the ip is in Spamhaus's list; see http://postmaster.yahoo.com/550-bl23.html (in reply to MAIL FROM command))
Mar 6 11:00:51 ubuntu postfix/smtp[19925]: 07BF424E7A: lost connection with mta6.am0.yahoodns.net[66.196.118.33] while sending RCPT TO
Mar 6 11:00:51 ubuntu postfix/cleanup[19923]: 1A85F24E7C: message-id=<20150306190051.1A85F24E7C@ubuntu>
Mar 6 11:00:51 ubuntu postfix/qmgr[12506]: 1A85F24E7C: from=<>, size=2643, nrcpt=1 (queue active)
Mar 6 11:00:51 ubuntu postfix/bounce[19929]: 07BF424E7A: sender non-delivery notification: 1A85F24E7C
Mar 6 11:00:51 ubuntu postfix/qmgr[12506]: 07BF424E7A: removed