首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >与Docker后缀:连接到SMTP - 454 4.7.1:中继访问被拒绝的错误

与Docker后缀:连接到SMTP - 454 4.7.1:中继访问被拒绝的错误
EN

Server Fault用户
提问于 2020-11-17 11:34:59
回答 1查看 2.3K关注 0票数 0

所以我有下面的设置

安装有后缀的Ubuntu16.04服务器,运行BigBlueButton

在这一点上,我有一个带有绿色照明的码头集装箱,它基本上是BigBlueButton的前端。

此Docker容器具有IP 172.18.0.3 (我在后缀配置文件中将其添加到网络中)

当我跑的时候

代码语言:javascript
运行
复制
docker run --rm --env-file .env bigbluebutton/greenlight:v2 bundle exec rake conf:check

要检查配置和邮件是否正常工作,我将获得以下输出:

代码语言:javascript
运行
复制
Checking environment: Passed
Checking Connection: Passed
Checking Secret: Passed
Checking SMTP connection: Failed
Error connecting to SMTP - 454 4.7.1 : Relay access denied

.env文件中的(Docker) SMTP Config:

代码语言:javascript
运行
复制
SMTP_SERVER=mydomain.example.com
SMTP_PORT=25
SMTP_DOMAIN=mydomain.example.com
#SMTP_USERNAME=
#SMTP_PASSWORD=
#SMTP_AUTH=
SMTP_STARTTLS_AUTO=true

# Specify the email address that all mail is sent from
SMTP_SENDER=no-reply@mydomain.example.com

# Specify the recipient for test emails (needed for providers like Microsoft, who are very
# strict about RFC 2606)
SMTP_TEST_RECIPIENT=my@testemail.com

我的后缀main.cf文件:

代码语言:javascript
运行
复制
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file=/etc/letsencrypt/live/mydomain.example.com/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/mydomain.example.com/privkey.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

mydomain = mydomain.example.com
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mydomain.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mydomain.example.com, localhost.example.com, localhost, localhost.localdomain, $mydomain, $myhostname
relayhost =
mynetworks = localhost, 127.0.0.1, 172.18.0.2, 172.18.0.3
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
virtual_mailbox_domains=mydomain.example.com
relay_domains = $mydestination
html_directory = /usr/share/doc/postfix/html

我尝试过对我的网络设置进行各种更改,包括将其设置为0.0.0.0,据我所知,这应该允许任何人发送邮件,但仍然没有效果。

编辑:

这是我的后缀日志:

代码语言:javascript
运行
复制
connect from unknown[172.17.0.2]
Nov 17 13:42:58 webinar postfix/smtpd[5604]: NOQUEUE: reject: RCPT from unknown[172.17.0.2]: 454 4.7.1 : Relay access denied; from=$ from= to= proto=ESMTP helo=

Nov 17 13:42:58 webinar postfix/smtpd[5604]: disconnect from unknown[172.17.0.2] ehlo=2 starttls=1 mail=1 rcpt=0/1 quit=1 commands=5/6
EN

回答 1

Server Fault用户

回答已采纳

发布于 2020-11-17 14:19:29

你确定你的IP地址正确吗?根据您的后缀日志,发送者是172.17.0.2,而不是172.18.0.3。

您可以在mynetworks中添加172.17.0.2并再试一次吗?

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1042884

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档