0

I am trying to use a SMART_HOST on RHEL7 with sendmail. I have configured sendmail.mc as follows:

define(`SMART_HOST', `my.relay.com')dnl

After compiling I have this line in sendmail.cf:

# "Smart" relay host (may be null)
DS[my.relay.com]

So it seems to have accepted it. Restarted sendmail service. When sending a test mail, I find the following in the log and no mail arrives (obviously):

Apr 24 11:27:13 myhost sendmail[51939]: 13O9RDBi051939: to=webmaster@myhost.com, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30008, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (13O9RDpv051940 Message accepted for delivery)

For some reason it still relays to relay=[127.0.0.1] and I can't figure out the reason after sheer endless research. Any advice?

0

IF you use sendmail (by sendmail.org) command to send email THEN messages are passed to local sendmail daemon listening at 127.0.0.1:25.
It was introduced ib sendmail-8.12 to avoid installation as set root id program. It had been huge security risk.

Your smart host configuration in sendmail.cf should affect next hop.

5
  • Where could I continue to troubleshoot then? Mails are not delivered. To my understanding sendmail should use the SMART_HOST and this should also reflect in the log. – Dominik Mimra Apr 24 at 14:37
  • There should be TWO pairs of from= to= log entries. You may locate second pair by its queue-id reported in to= line of the first pair (13O9RDpv051940) – AnFi Apr 24 at 14:55
  • Apr 25 10:04:28 myhost sendmail[121754]: 13P84Ss8121754: from=myuser, size=23, class=0, nrcpts=1, msgid=<202104250804.13P84Ss8121754@myhost.com>, relay=root@localhost Apr 25 10:04:28 myhost sendmail[121754]: 13P84Ss8121754: to=someuser@realdomain.com, ctladdr=myuser (1001/1001), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30023, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown – Dominik Mimra Apr 25 at 8:14
  • Apr 25 10:04:28 myhost sendmail[121754]: 13P84Ss8121754: 13P84Ss9121754: DSN: User unknown Apr 25 10:04:28 myhost sendmail[121754]: 13P84Ss9121754: to=myuser, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31047, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (13P84S2N121755 Message accepted for delivery) – Dominik Mimra Apr 25 at 8:14
  • As root execute the two tests commands below: 1. echo 3,0 'someuser@realdomain.com' | sendmail -bt 2. sendmail -bv 'someuser@realdomain.com' . They quite likely will provide extra hints (They trace delivery selection) – AnFi Apr 25 at 17:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.