Linux 服务器下搭建Postfix邮箱服务器:本地发送接收不了

一杯咖啡的时间 2018-06-12 03:42:11

Linux的版本:
[root@fxlh-sec ~]# uname -a
Linux fxlh-sec 3.10.0-862.3.2.el7.x86_64 #1 SMP Mon May 21 23:36:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Hostname:
[root@fxlh-sec ~]# hostname
fxlh-sec

Postfix config设置:
[root@fxlh-sec ~]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost,$mydomain
mydomain = fxlh-security.com
myhostname = fxlh-sec
mynetworks = 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP postfix
unknown_local_recipient_reject_code = 550

telnet邮件发送没有问题:

[root@fxlh-sec ~]# telnet 45.76.169.245 25
Trying 45.76.169.245...
Connected to 45.76.169.245.
Escape character is '^]'.
220 fxlh-sec ESMTP postfix
helo localhost
250 fxlh-sec
mail from:root
250 2.1.0 Ok
rcpt to:root
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
dddd
.
250 2.0.0 Ok: queued as 578CA5ED92
quit
221 2.0.0 Bye
Connection closed by foreign host.
[root@fxlh-sec ~]# mail
No mail for root


邮件log:


[root@fxlh-sec ~]# tail -f /var/log/maillog
Jun 12 07:28:31 localhost postfix/postfix-script[1043]: starting the Postfix mail system
Jun 12 07:28:31 localhost postfix/master[1045]: daemon started -- version 2.10.1, configuration /etc/postfix
Jun 12 07:29:47 localhost postfix/smtpd[1088]: warning: hostname 45.76.169.245.vultr.com does not resolve to address 45.76.169.245: Name or service not known
Jun 12 07:29:47 localhost postfix/smtpd[1088]: connect from unknown[45.76.169.245]
Jun 12 07:30:19 localhost postfix/smtpd[1088]: 578CA5ED92: client=unknown[45.76.169.245]
Jun 12 07:30:25 localhost postfix/cleanup[1093]: 578CA5ED92: message-id=<20180612073019.578CA5ED92@fxlh-sec>
Jun 12 07:30:25 localhost postfix/qmgr[1047]: 578CA5ED92: from=<root@fxlh-security.com>, size=285, nrcpt=1 (queue active)
Jun 12 07:30:25 localhost postfix/local[1094]: 578CA5ED92: to=<root@fxlh-security.com>, orig_to=<root>, relay=local, delay=16, delays=16/0.03/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Jun 12 07:30:25 localhost postfix/qmgr[1047]: 578CA5ED92: removed
Jun 12 07:30:27 localhost postfix/smtpd[1088]: disconnect from unknown[45.76.169.245]

...全文
1330 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
域名解析如下

23,121

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧