1

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: to=user@company.com, 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=<user@company.com>, 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: to=user@company.com, 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=<user@company.com>, 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 user@company.com
welcome
.
EOT
user@company.com... 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:<user@company.com>
>>> DATA
250 2.1.5 Ok
354 End data with <CR><LF>.<CR><LF>
>>> .
250 2.0.0 Ok: queued as 6FDB9125
user@company.com... 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?

  • host_A appears to be using Sendmail while the problematic host_B instead appears to have both Sendmail (for the MDA) and Postfix (for the MTA)... is that correct? – thrig Sep 26 '18 at 21:54
  • hmm. you are right, i do not see postfix installed on solaris system, but redhat system has postfix. – rajeev Sep 26 '18 at 23:39
  • ..adding more response as edit to question because i am not sure how to format here. – rajeev Sep 26 '18 at 23:53
  • you'll need to install sendmail everywhere, and configure it the same, or copy the sendmail config also into sendmail. the system mail logs may indicate what postfix (or sendmail) did with the mail on the strange hybrid system you appear to have – thrig Sep 27 '18 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.