sendmail中继问题

sendmail中继问题

我有两台主机,其中一台可以向我的地址发送电子邮件,而另一台则不能。我试图弄清楚如何让其他主机将消息发送到第一个主机,以便第一个主机可以将该消息发送到收件人?

(它们位于不同的子网上)

host_A(Solaris 10)(确定)

host_B(RHEL 6.5)(问题)

  • 我可以从 host_A ssh 进入 host_B
  • 从 host_A 我可以使用 sendmail 向我的公司帐户发送消息。
  • 从 host_B 我收到错误。

我想知道是否可以使用 host_A 从 host_B 向我的帐户发送电子邮件。

错误/日志:

--来自主机_B:

maillog:Sep 26 20:08:04 host_B sendmail[53378]: q8RK90Tl063478: [email protected], ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=124738, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 7D2F5G7)
maillog:Sep 26 20:09:04 host_B postfix/smtp[53381]: 7D2F5G7: to=<[email protected]>, relay=none, delay=60, delays=0.01/0/60/0, dsn=4.4.1, status=deferred (connect to mx0a-00191d01.pphosted.com[67.231.149.140]:25: Connection timed out)

x0a-00191d01.pphosted.com 未在 sendmail.cf 中的任何位置进行配置 从该主机无法访问已配置的 DS smtp 服务器(由于策略,不存在网络路由)

--来自主机_A:

Sep 26 20:13:04 host_A sendmail[28177]: [ID 801593 mail.info] q8WAD3Tf028177: from=user, size=63, class=0, nrcpts=1, msgid=<201809262013.q8WAD3Tf028177@host_A.company.com>, relay=user@localhost
Sep 26 20:13:04 host_A sendmail[28692]: [ID 801593 mail.info] q8WKT44s028672: from=<user@host_A.company.com>, size=355, class=0, nrcpts=1, msgid=<201809262013.q8WAD3Tf028177@host_A.company.com>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Sep 26 20:13:04 host_A sendmail[28177]: [ID 801593 mail.info] q8WAD3Tf028177: [email protected], ctladdr=user (60183/200), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30063, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q8WKT44s028672 Message accepted for delivery)
Sep 26 20:13:04 host_A sendmail[28764]: [ID 801593 mail.info] q8WKT44s028672: to=<[email protected]>, ctladdr=<user@host_A.company.com> (60183/200), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120355, relay=smtp.company.com. [xx.xx.xx.xx], dsn=2.0.0, stat=Sent (w8QKD4cS004690 Message accepted for delivery)

...并且该消息会在 Outlook 收件箱中收到。

我怎样才能让host_B将其所有消息发送到host_A进行传递?

************这是对以下有关 postfix 的建议的回应,我尝试为 postfix 添加中继主机 ********

对 host_B 后缀进行了更改:

添加行到:/etc/postfix/main.cf

relayhost = [host_A.company.com]

# service postfix restart
Shutting down postfix:                                     [  OK  ]
Starting postfix:                                          [  OK  ]

发送邮件....

host_B# mailx  -s 'my test' -v [email protected]
welcome
.
EOT
[email protected]... Connecting to [127.0.0.1] via relay...
220 host_B.localdomain ESMTP Postfix
>>> EHLO host_B.in.company.net
250-host_B.localdomain
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
>>> MAIL From:<root@host_B.in.company.net> SIZE=217
250 2.1.0 Ok
>>> RCPT To:<[email protected]>
>>> DATA
250 2.1.5 Ok
354 End data with <CR><LF>.<CR><LF>
>>> .
250 2.0.0 Ok: queued as 6FDB9125
[email protected]... Sent (Ok: queued as 6FDB9125)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 Bye

我在队列中看不到任何内容:

# mailq
/var/spool/mqueue is empty
                Total requests: 0

但我没有收到邮件....


我应该删除 postfix 吗?

相关内容