Sendmail Config Finding Wrong Relay

Home » CentOS » Sendmail Config Finding Wrong Relay
CentOS 6 Comments

Hi all,

I set my sendmail.mc file to have a SMART_HOST entry of mail.xyz.com I do “make” and “service sendmail restart” … I should be good, but no. :)

If I do “host mail.xyz.com” I get the correct address and if I “telnet mail.xyz.com 25” I get a connection.

however when I do a test mail – its trying to RELAY to another host.

I thought SMART_HOST was the only one it would try to relay to?
yes there is only one SMART_HOST in my file, and sendmail.cf shows the correct name.

How do I tell what is happening here?
the maillog only shows it trying to relay to the wrong host, not the one I
entered.

Any thoughts?

Thanks,

Jerry

6 thoughts on - Sendmail Config Finding Wrong Relay

  • By which you mean that sendmail.cf contains the line:

    DSrelay:mail.xyz.com ?

    SMART_HOST will relay mail to destinations for which it doesn’t have explicit routing information.

    Do you also have a mailertable defined which might include the recipient domain, for example?

    Try “sendmail -d60.5 -bv [user@example.com]” to see what might be going on with local address parsing.

  • Yes that is correct.

    have explicit routing information.

    domain, for example?
    No there are no other entries in the mailertable or access files.

    be going on with local address parsing.

    This looks OK. (names have been changed)
    sendmail -d60.5 -bv bob@address.com map_lookup(dequote, root, %0=root) => NOT FOUND (0)
    map_lookup(host, address.com, %0

  • Where is “somewhere else” and what in what part of the sendmail configuration do you have somewhere else defined, listed or mentioned?

  • Am 30.09.2015 um 22:18 schrieb Laurent Blume:

    Sorry, that’s not correct what you say about SMART_HOST.

    define(`SMART_HOST’, `host.domain.tld’)dnl

    is the right way to tell Sendmail to relay (the relay mailer is used implicitly) all outbound mail to that specified host.

    But it is important to pay attention for the order of statements in the sendmail.mc configuration files, as one of the first chapters of the cf/README explains.

    Alexander

LEAVE A COMMENT