Operating System - HP-UX
1822437 Members
2582 Online
109642 Solutions
New Discussion юеВ

Sendmail Smart relay query

 
SOLVED
Go to solution
Scott Caporale_1
Occasional Contributor

Sendmail Smart relay query

Hello,

Currently all our UNIX e-mail goes via a UNIX host defined as a smart relay (DSsmtp:ccaent.ccamatil.com)
This server is to be decommissioned soon and I want to look at alturnatives.

I would like to configure all our unix hosts so that e-mail to other unix hosts (all within the same domain name) go directly to that host. Any unknown address mail I'd like to forwared via our SMTP gateway.

We often send e-mail from UNIX to lotus Notes and the internet via the SMTP gateway.

I have tried to remove the smart relay on some hosts and it then uses the MX record for thta domain to determine the e-mail gateway. This sorks well for e-mail address to our domain, however for internet e-mail sendmail does not know how to forward it on to the SMTP gateway.

Any Suggestions?

Cheers,
Scott
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor

Re: Sendmail Smart relay query

Hi Scott,

You need to have $m macro defined to get this working. Add the Dmyourdomain to
the sendmail.cf file.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Roger Baptiste
Honored Contributor
Solution

Re: Sendmail Smart relay query

Hi,

Here is the comments in the sendmail.cf file regarding this:
****

# Direct SMTP connection with local domain: #
# #
# To deliver mail destined for hosts within the local domain directly, #
# while sending all other mail to the "Smart Relay" listed above, you #
# will need to uncomment the line in ruleset 0 following the comment: #
# #
# # See if we are supposed to deliver to hosts in the local domain #
# #
# Also ensure the $m macro gets defined. It gets defined internally #
# from $j macro. You can check if it is set by doing the following: #
# #
# sendmail -bt #
# > $m #
# #
# If $m is undefined, you can define it as follows: #
# eg: if FOO.com is your local domain, define it as #
# DmFOO.com #
If $m is undefined, you can define it as follows: #
# eg: if FOO.com is your local domain, define it as #
# DmFOO.com

{The entry is:
# See if we are supposed to deliver to hosts in the local domain
#R$* < @ $* > $* $: $>check_local <$m> $1 < @ $2 > $3 Local Domain?
}

**

So, you can set the Dm entry and uncomments the ruleset to get it working.

HTH
raj
Take it easy.
Scott Caporale_1
Occasional Contributor

Re: Sendmail Smart relay query

Thanks Guys,

I have tested this on our test server and things are looking good so far. As we are using DNS I did not need to set the Dm macro.

when I ran # sendmail -bt
> $m

it returned with the correct domain.

What do I do if i have a few local domain I want to try sending directly to first. Can the Dm marco take more than one domain?

My understanding is that sendmail will apply any rules before forwarding the mail to the defind smart relay (our smtp gateway in this case). Is this correct?

Thanks, Scott