Sendmail Config Finding Wrong Relay

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

Hi all,

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

If I do “host” I get the correct address and if I “telnet 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 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

Any thoughts?



6 thoughts on - Sendmail Config Finding Wrong Relay

  • By which you mean that contains the line: ?

    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 []” 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 map_lookup(dequote, root, %0=root) => NOT FOUND (0)
    map_lookup(host,, %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 configuration files, as one of the first chapters of the cf/README explains.