自建邮件服务器无法发附件,为何无法使用我搭建的postfix服务器发送邮件?

a :代表本地端,我的本地电脑,域名 localhost.localdomain

b is 我的vps ,搭建了一个 postfix

c is 我的yahoo 邮箱。

登录b(我的vps)后,

我可以用下面的命令发送邮件到yahoo邮箱。

echo "test"|mail -s "test" account-in-yahoo@yahoo.com

这个是b(我的vps)上面的设置。

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 = all

mail_owner = postfix

mailq_path = /usr/bin/mailq.postfix

manpage_directory = /usr/share/man

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

mydomain = domain.com

myhostname = mail.domain.com

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

unknown_local_recipient_reject_code = 550

下面,我想从本地端,调用b(我的vps) ,发送邮件到yahoo邮箱。

a(本地端)安装了msmtp.

cat .msmtprc

account default

host domain.com

user root

from root@mydomain.com

password xxxxxx

auth login

tls off

logfile .msmtp.log

在a(本地端)运行下面的命令

echo "test" | mail -v -s "test" xxxx@yahoo.com

cat /var/log/mail.log

Oct 7 08:09:50 localhost postfix/pickup[23565]: D6FA3482226: uid=1000 from=

Oct 7 08:09:50 localhost postfix/cleanup[25879]: D6FA3482226: message-id=<20171007120950.D6FA3482226@localhost.localdomain>

Oct 7 08:09:50 localhost postfix/qmgr[4739]: D6FA3482226: from=, size=359, nrcpt=1 (queue active)

Oct 7 08:09:55 localhost postfix/smtp[25881]: D6FA3482226: to=, relay=mta5.am0.yahoodns.net[98.136.216.26]:25, delay=4.3, delays=0.08/0/2.5/1.8, dsn=2.0.0, status=sent (250 ok dirdel)

Oct 7 08:09:55 localhost postfix/cleanup[25879]: 38BC7482228: message-id=<20171007120955.38BC7482228@localhost.localdomain>

Oct 7 08:09:55 localhost postfix/bounce[26007]: D6FA3482226: sender delivery status notification: 38BC7482228

Oct 7 08:09:55 localhost postfix/qmgr[4739]: 38BC7482228: from=<>, size=1988, nrcpt=1 (queue active)

Oct 7 08:09:55 localhost postfix/qmgr[4739]: D6FA3482226: removed

Oct 7 08:09:55 localhost postfix/smtp[26008]: 38BC7482228: to=, relay=none, delay=0.05, delays=0.03/0.01/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=localdomain.localdomain type=AAAA: Host not found)

Oct 7 08:09:55 localhost postfix/qmgr[4739]: 38BC7482228: removed

请问,为何无法在本地的电脑上调用我vps上的postfix ,发送邮件到yahoo邮箱?

b(vps)上的/etc/postfix/main.cf设置有问题?

mynetworks = 127.0.0.0/8

这里吗?还是哪里?

如何改?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值