Internal mail routing

UNIX (AIX) sendmail

servername.companyname.com sends directly to all servers in the same
domain level and to sub domains fine BUT mail from sub domains such as
sub.companyname.com won't send directly to servers in the parent
domain and instead sends to the relay.

Summary:
I have several sendmail servers and one smart relay.

All internal company email recipients are handled in an alias file. I
put this alias file on all boxes and configured a .cw file and the .cf
file to deliver messages directly to the server where the recipient
receives mail and if an external address to send to the relay. This
is to reduce network traffic.

This all works correctly with one exception.

In a correct example, mail sent to user [at] companyname.com is aliases to
user [at] server1. When the email is sent, it sends directly to server1.
server1 lookup in DNS will retun the IP address and the full name
server1.companyname.com.

I have a few servers named with a sub. For example,
server2.sub.companyname.com. If I send an email to
user2 [at] companyname.com aliased to user [at] server2 and the mail is coming
from server1 (server1.companyname.com)it is delivered directly to
server2. BUT if an email is sent to user [at] companyname.com aliased to
user [at] server1 FROM server2.sub.companyname.com...it sends to the relay.

DNS lookups from server2.sub.companyname.com to server1 are correct,
so even though server2 can nslookup server1 without specifying the
full name and sendmail can in fact alias it, it still sends it to the
relay instead of directly to server1.

I know this may sound confusing.

How do I get my servers in the sub domains to directly send to servers
in the parent domain without going to the relay?

Any help will be greatly appreciated.
bard9 [ Di, 23 Oktober 2007 17:43 ] [ ID #1852889 ]

Re: Internal mail routing

In article <1193154183.246388.75200 [at] e34g2000pro.googlegroups.com> bard9
<bard_9 [at] hotmail.com> writes:
>
>DNS lookups from server2.sub.companyname.com to server1 are correct,
>so even though server2 can nslookup server1 without specifying the
>full name and sendmail can in fact alias it, it still sends it to the
>relay instead of directly to server1.
>
>I know this may sound confusing.
>
>How do I get my servers in the sub domains to directly send to servers
>in the parent domain without going to the relay?

Using a standard sendmail config built from a .mc file that has
FEATURE(mailertable), and in the mailertable you specify

..companyname.com esmtp:%1%0
.. esmtp:your.relay.host

Note the leading dot on the first entry (makes it match
<anything>.companyname.com, with %1 = <anything> and %0 =
..companyname.com) and the lone dot on the second (matches anything not
matched by more specific entries).

--Per Hedeland
per [at] hedeland.org
per [ Do, 25 Oktober 2007 01:38 ] [ ID #1854853 ]
Miscellaneous » comp.mail.sendmail » Internal mail routing

Vorheriges Thema: sm-client and sending mail
Nächstes Thema: Relaying all outbound mail to MX servers