Gitlab-Postfix 无法向外部域发送邮件

Gitlab-Postfix 无法向外部域发送邮件

在 Ubuntu 18.04 服务器 (VM) 上,我有一个配置了 LDAP 登录的 gitlab omnibus 安装 (12.10.6)。除了 LDAP,我没有更改配置默认值。

目前,gitlab 还无法发送电子邮件,例如提及问题等。以下是摘录/var/log/mail.log(我更改了真实的域和用户名,但除此之外,它是实际的日志):

Jul 27 16:33:53 gitlab postfix/pickup[16154]: 8FA4014029F: uid=998 from=<[email protected]>
Jul 27 16:33:53 gitlab postfix/cleanup[16388]: 8FA4014029F: message-id=<[email protected]>
Jul 27 16:33:53 gitlab postfix/qmgr[16155]: 8FA4014029F: from=<[email protected]>, size=27348, nrcpt=1 (queue active)
Jul 27 16:33:59 gitlab postfix/smtp[16394]: 8FA4014029F: to=<[email protected]>, relay=postrelay1.lrz.de[129.187.255.160]:25, delay=5.7, delays=0.07/0.01/5.5/0.11, dsn=5.0.0, status=bounced (host postrelay1.lrz.de[129.187.255.160] said: 550 Requested action not taken: mailbox unavailable (in reply to RCPT TO command))
Jul 27 16:33:59 gitlab postfix/cleanup[16388]: 3B7B81425B6: message-id=<[email protected]>
Jul 27 16:33:59 gitlab postfix/bounce[16401]: 8FA4014029F: sender non-delivery notification: 3B7B81425B6
Jul 27 16:33:59 gitlab postfix/qmgr[16155]: 3B7B81425B6: from=<>, size=29499, nrcpt=1 (queue active)
Jul 27 16:33:59 gitlab postfix/qmgr[16155]: 8FA4014029F: removed
Jul 27 16:33:59 gitlab postfix/local[16402]: 3B7B81425B6: to=<[email protected]>, relay=local, delay=0.04, delays=0.01/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Jul 27 16:33:59 gitlab postfix/qmgr[16155]: 3B7B81425B6: removed
Jul 27 16:45:03 gitlab postfix/pickup[16154]: DCECD14029F: uid=998 from=<[email protected]>
Jul 27 16:45:03 gitlab postfix/cleanup[17791]: DCECD14029F: message-id=<[email protected]>
Jul 27 16:45:03 gitlab postfix/qmgr[16155]: DCECD14029F: from=<[email protected]>, size=4954, nrcpt=1 (queue active)
Jul 27 16:45:04 gitlab postfix/smtp[17794]: DCECD14029F: to=<[email protected]>, relay=smtpin.rzone.de[81.169.145.97]:25, delay=0.3, delays=0.05/0.02/0.15/0.08, dsn=5.0.0, status=bounced (host smtpin.rzone.de[81.169.145.97] said: 550 Requested action not taken: mailbox unavailable (in reply to RCPT TO command))
Jul 27 16:45:04 gitlab postfix/cleanup[17791]: 31EDC1425B6: message-id=<[email protected]>
Jul 27 16:45:04 gitlab postfix/bounce[17795]: DCECD14029F: sender non-delivery notification: 31EDC1425B6
Jul 27 16:45:04 gitlab postfix/qmgr[16155]: 31EDC1425B6: from=<>, size=7094, nrcpt=1 (queue active)
Jul 27 16:45:04 gitlab postfix/qmgr[16155]: DCECD14029F: removed
Jul 27 16:45:04 gitlab postfix/local[17797]: 31EDC1425B6: to=<[email protected]>, relay=local, delay=0.05, delays=0.03/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Jul 27 16:45:04 gitlab postfix/qmgr[16155]: 31EDC1425B6: removed

尝试向[email protected]联系人发送电子邮件时postrelay1.lrz.de,邮件被退回550 Requested action not taken: mailbox unavailable (in reply to RCPT TO command)。我多次检查用户名是否正确,邮件是否可以投递给 gitlab 服务器之外的收件人。此外,其他域(例如 )也发生了同样的事情,[email protected]所以smtpin.rzone.de我认为问题出在其他地方。

我读过有时 550 也可能意味着服务器将电子邮件视为垃圾邮件...但我对邮件服务器不是很熟悉。

这是后缀main.cf

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mydestination = $myhostname, mydomain.intern, gitlab, localhost.localdomain, localhost
myhostname = mydomain.intern
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes

任何指示或想法表示赞赏

答案1

该消息550 Requested action not taken: mailbox unavailable表明收件人邮件服务器存在问题。大多数情况下,这意味着电子邮件地址无效。您唯一能做的就是确保您正确拼写了电子邮件地址。如果这不能解决问题,预期收件人将需要联系他们自己的电子邮件提供商寻求帮助。这不是你能解决的问题。

相关内容