I have two hosts one of which can send emails to my address, while other can not. I am trying to figure how to make the other host send the mesg to first host so that the first host can send that mesg to reciepeint?
(they are on diff subnets)
host_A (solaris 10) (OK)
host_B (RHEL 6.5) (Problem)
- from host_A i can ssh into host_B
- from host_A i can send mesgs using sendmail to my company account.
- from host_B i get error.
I am wanting to know if i can send emails to my account from host_B using host_A.
errors/logs:
--from host_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 is not configured anywhere in sendmail.cf the configured DS smtp server is NOT reachable from this host (due to policy, no network route exist)
--from host_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)
...and the mesg is received in outlook inbox.
How can i make host_B to send all its mesgs to host_A for delivery?
************This is response to below suggestion about postfix, i tried to add a relay host for postfix *******
made changes to host_B postfix:
added line to: /etc/postfix/main.cf
relayhost = [host_A.company.com]
# service postfix restart
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]
sent mail....
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
i see nothing in queue:
# mailq
/var/spool/mqueue is empty
Total requests: 0
but i get no mail....
should i remove postfix?