首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >后缀问题:电子邮件未出现

后缀问题:电子邮件未出现
EN

Server Fault用户
提问于 2019-02-11 11:45:07
回答 1查看 593关注 0票数 0

有人教我如何使用PostFix来提供个人的跨域邮件服务。

我被困在这上面有一段时间了但是..。下面是发生的事。在这种情况下,DNS和邮件服务器以及目的地都是相同的位置。通过本地网络连接的两个虚拟机,解决了它们的挖掘/查找名称。

如果我试图发送到同一个域/机器

代码语言:javascript
运行
复制
Feb 11 12:32:58 mx1 postfix/cleanup[3109]: A94C7C8BF9: message-id=<20190211113258.A94C7C8BF9@mx1.mailantonio.com>
Feb 11 12:32:58 mx1 postfix/qmgr[1176]: A94C7C8BF9: from=, size=346, nrcpt=1 (queue active)
Feb 11 12:32:58 mx1 postfix/local[3111]: A94C7C8BF9: to=, relay=local, delay=0.2, delays=0.19/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Feb 11 12:32:58 mx1 postfix/qmgr[1176]: A94C7C8BF9: removed

收到电子邮件,但邮件中没有显示

当我试图发送到另一个域时

代码语言:javascript
运行
复制
Feb 11 12:33:32 mx1 postfix/pickup[1175]: 368FDC8BFC: uid=1001 from=
Feb 11 12:33:32 mx1 postfix/cleanup[3109]: 368FDC8BFC: message-id=<20190211113332.368FDC8BFC@mx1.mailantonio.com>
Feb 11 12:33:32 mx1 postfix/qmgr[1176]: 368FDC8BFC: from=, size=334, nrcpt=1 (queue active)
Feb 11 12:33:32 mx1 postfix/local[3111]: 368FDC8BFC: to=, relay=local, delay=0.13, delays=0.1/0/0/0.03, dsn=5.1.1, status=bounced (unknown user: "test")
Feb 11 12:33:32 mx1 postfix/cleanup[3109]: 4039EC8BFA: message-id=<20190211113332.4039EC8BFA@mx1.mailantonio.com>
Feb 11 12:33:32 mx1 postfix/qmgr[1176]: 4039EC8BFA: from=<>, size=2204, nrcpt=1 (queue active)
Feb 11 12:33:32 mx1 postfix/bounce[3128]: 368FDC8BFC: sender non-delivery notification: 4039EC8BFA
Feb 11 12:33:32 mx1 postfix/qmgr[1176]: 368FDC8BFC: removed
Feb 11 12:33:32 mx1 postfix/smtpd[3131]: connect from localhost[127.0.0.1]
Feb 11 12:33:32 mx1 postfix/smtp[3130]: warning: host mx1[127.0.1.1]:25 greeted me with my own hostname mx1.mailantonio.com
Feb 11 12:33:32 mx1 postfix/smtp[3130]: warning: host mx1[127.0.1.1]:25 replied to HELO/EHLO with my own hostname mx1.mailantonio.com
Feb 11 12:33:32 mx1 postfix/smtp[3130]: 4039EC8BFA: to=, relay=mx1[127.0.1.1]:25, delay=0.04, delays=0.01/0.01/0.03/0, dsn=5.4.6, status=bounced (mail for mx1 loops back to myself)
Feb 11 12:33:32 mx1 postfix/qmgr[1176]: 4039EC8BFA: removed
Feb 11 12:33:32 mx1 postfix/smtpd[3131]: disconnect from localhost[127.0.0.1] ehlo=1 quit=1 commands=2

邮件不会发送,因为它会被重定向到自己的FQDN?

他们都在同一个本地网络里。机器Mx1为10.0.0.1-> mailantonio.com域.机器Mx2为10.0.0.2-> mailgarcia.com

下面是后缀配置文件。老实说,我不知所措,我一直在寻找什么可能是错误的.MX1

代码语言: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 = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
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.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mx1.mailantonio.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, localhost.$mydomain, localhost $mydomain, mx2,mailgarcia.com, mailgarcia.com, mx2
relayhost = 
mynetworks = 10.0.0.0/24
mailbox_size_limit = 0
recipient_delimiter = 
default_transport = smtp
relay_transport = smtp
relay_domains =  mailgarcia.com
inet_interfaces = all
inet_protocols = ipv4

MX2

代码语言: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 = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
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.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mx2.mailgarcia.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mx1.mailantonio.com, mailantonio.com, mx1 
relayhost = 
mynetworks = 10.0.0.0/24
mailbox_size_limit = 0
recipient_delimiter = 
default_transport = smtp
relay_transport = smtp
relay_domains = mailantonio.com
inet_interfaces = all
inet_protocols = ipv4
home_mailbox = Maildir/

创建Maildir目录,包含每个用户的cur、new和tmp .我使用基于Ubuntu的linux。据我所知,这些配置应该是相同的。邮递员,IMAP和POP已安装。

对答案的回应。

MX1 Config

代码语言:javascript
运行
复制
mydomain = mailantonio.com
myorigin = $mydomain
mydestination = $myhostname, mx1.$mydomain, $mydomain, mx2.mailgarcia.com, mailgarcia.com, mx2

MX2 Config

代码语言:javascript
运行
复制
mydomain = mailgarcia.com
myorigin = $mydomain
mydestination = $myhostname, mx2.$mydomain, $mydomain, mx1.mailantonio.com, mailantonio.com, mx1 

把它发送给自己,现在起作用了。然而,跨域仍然是不确定的。

日志后缀

代码语言:javascript
运行
复制
Feb 11 16:03:51 mx1 postfix/smtp[3007]: 6AF41C8BC8: to=, relay=none, delay=0.03, delays=0/0.01/0.01/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=mx1 type=MX: Host not found, try again)

以test3的身份发送消息,从机器mx1.mailantonio.com发送到test@mailgarcia.com,我是否必须删除信任上的自引用目的地?

EN

回答 1

Server Fault用户

回答已采纳

发布于 2019-02-11 13:44:59

您正在使用mydestination = localhost.$mydomain。这可不妙。使用MX2.mx1。而不是本地主机。

在你发布的信息中没有我的领域。这也可能是个问题。您应该在这两种信任中添加mydomain = yournames.com。

如果myhostname、mydestination不正确,您可能会遇到回环问题。

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

https://serverfault.com/questions/953342

复制
相关文章

相似问题

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