我刚开始使用 Linux,找到了一个基本的安装指南 在 Ubuntu 中安装 postfix
我已经安装了 Ubuntu 14.04 LTS
运行 sudo apt-get -update
并 sudo apt-get -upgrade
我超越了测试您的默认设置好的,没有任何问题。
我经历了设置 Postfix 对 Maildir 的支持最后它说“检查 fmaster 的邮箱”,但我收到“没有 fmaster 的邮件。——我想这是正确的。
我的主要问题在于添加本地域当它说“使用以下代码再次测试您的设置:”当我在 rcpt 中输入:[电子邮件保护]或 fmaster@localhost 我收到一条错误消息,提示“临时查找失败”,如果我重新启动计算机,仍然会收到相同的错误。
我已经删除虚拟机并重新启动了 3 次,但每次都出现相同的错误。我认为我没有做错任何事(3 次)或者我做错了吗?我该如何继续?
# 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
# 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 = Ubuntu
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.euroglen.com, localhost.localdomain, localhost, euroglen.com
relayhost =
mynetworks = 1270.0.0.0/8 192.168.1.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
mailbox_command =
“sudo cat /etc/aliases” 的输出
# See man 5 aliases for format
postmaster: root
答案1
运行newaliases
。如果/etc/aliases
不存在,则先创建,然后运行newaliases
。也可以更新/添加alias_maps = hash:/etc/aliases
以/etc/postfix/main.cf
消除其他警告。然后再试一次。
如果您使用 telnet 进行测试,则不需要工作 DNS。
编辑1
这是我的工作 postfix 中的工作 main.cf
cat /etc/postfix/main.cf
# 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
# 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 = xxx.yyy.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = xxx.yyy.net, localhost.yyy.net, localhost
relayhost = smtp.yyy.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
我使用relayhost
。这意味着我通过 ISP smtp 服务器发送的所有邮件。您可以复制/粘贴此配置并更改myhostname
、mydestination
、relayhost
...
尝试