所以奇怪的是,我以前工作过的MailHog今天早上在我的Mac Mojave上停止了工作。
我按照本文中的步骤来运行MailHog:https://www.joshstauffer.com/send-test-emails-on-a-mac-with-mailhog/
后缀日志文件输出:(日志流--谓词'(process == "smtpd") --info)

My /etc/host文件包含一个条目,用于: 127.0.0.1本地主机
另外,当我做以下操作时,我得到(不确定它是否相关):
[12:26:22][~]#nslookup localhost
Server: 192.168.0.1
Address: 192.168.0.1#53
** server can't find localhost: NXDOMAIN我在etc/postfix/main.cf配置文件中的最后一节(以前所有内容都未更改):
#inet_protocols = all
inet_protocols = ipv4
message_size_limit = 10485760
mailbox_size_limit = 0
biff = no
mynetworks = 127.0.0.0/8, [::1]/128
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit
recipient_delimiter = +
tls_random_source = dev:/dev/urandom
smtpd_tls_ciphers = medium
inet_interfaces = loopback-only
# Adding this doesnt work:
#mydestination = localhost
# For MailHog
myhostname = localhost
relayhost = [localhost]:1025
compatibility_level = 2尝试根据inet_protocols = ipv4添加这个职位。
任何帮助都非常感谢!
发布于 2022-04-18 17:49:20
默认情况下,后缀只使用DNS解析名称,绕过任何系统解析配置(主机文件、ldap等)。若要使用本机系统解析,请设置以下配置选项:
smtp_host_lookup=native或者,如果在DNS中找不到记录,则回退本机选项。
smtp_host_lookup=dns,native根DNS服务器不允许返回任何本地主机的记录,因为它是保留的。但是,根据您的前提DNS解决方案或ISP,您可能仍然可以得到一个记录,尽管。
https://serverfault.com/questions/1097748
复制相似问题