Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

Enable MX in sendmail (V8.7.1 in HPUX10.20)?

discoverer
Frequent Advisor

Enable MX in sendmail (V8.7.1 in HPUX10.20)?

As title.

I only found the following lines in sendmail.cf:
# fallback MX host
#O FallbackMXhost=fall.back.host.net

# if we are the best MX host for a site, try it directly instead of config err
#O TryNullMXList

But it seems they are of no use.

I just want to let this sendmail server relay the non-local-domain mails to other mail servers.

Any ideas?

Thanks & Merry X-mas!

/discoverer


Listen, then discover, then succeed!
7 REPLIES
Sridhar Bhaskarla
Honored Contributor

Re: Enable MX in sendmail (V8.7.1 in HPUX10.20)?

Hi,

MX=mail exchange host is to be specified in the DNS configuration. Check with your DNS administrator.

As per your solution, you need to configure your sendmail.cf with a combination of DS and Dm macros.

Edit your sendmail.cf and search for DS
and add your mailserver there. So all the non-local mail will be forwarded through this server.

And add an entry like Dm yourdomain.com and uncomment the line starting with R$* < @ $* > $* in the ruleset.


Then restart sendmail using /sbin/init.d/sendmail script.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Marco Paganini
Respected Contributor

Re: Enable MX in sendmail (V8.7.1 in HPUX10.20)?

Hello,

"MX" refers to a DNS record, not a specific sendmail configuration. The MX record will be used to tell other mail agents where to deliver email for your domain.

If you want to relay non-local mails to another place, check the DS configuration parameter on your /etc/sendmail.cf.

Regards,
Paga
Keeping alive, until I die.
discoverer
Frequent Advisor

Re: Enable MX in sendmail (V8.7.1 in HPUX10.20)?

Hi Sridhar Bhaskarla & Marco Paganini & other friends,

Thanks for your help!

Yes, I think DS can realize this function, but it ***didn't use the MX record*** of the target mailserver in the DNS server.

Sorry about that I didn't express my situation clearly.
Now Let me clarify it more clear:

* Goal:
let the sendmail server sends the non-local-domain mails to other specific mail servers ***via DNS server's MX record***. (just like the real world: you send a mail to me, through your company's mail server to mime, via the Internet DNS server's MX record)

* situation:
1. mailserver1's full hostname: mail.domain1.mycompany.com.am
2. mailserver2's full hostname: mail.domain2.mycompany.com.am
3. mailserver3 .........
3. DNS SERVER's config: (already have the MX record for both domain1.mycompany.com.am & domain2.mycompany.com.am)
/etc/named.data/db.mycompany :
domain1 IN MX 10 mail.domain1.mycompany.com.am.
domain2 IN MX 10 mail.domain2.mycompany.com.am.
domain3 ...........

* issue:
Now, from mailserver1 I send a mail to user@domain2.mycompany.com.am, but failed to send. Following is the log in mailserver1's /var/adm/syslog/maillog

Dec 26 11:43:05 .... sendmail[1239]: XAA27568: to=, delay=12:08:31, xdelay=00:00:00, mailer=smtp, relay=domain2.mycompany.com.am, stat=Deferred: Name server: domain2.mycompany.com.am: host name lookup failure

Anything unclear pls tell me.

Thanks for your consideration!

/Discoverer
THINKING makes the life colorful!
Listen, then discover, then succeed!
Steven Sim Kok Leong
Honored Contributor

Re: Enable MX in sendmail (V8.7.1 in HPUX10.20)?

Hi,

Verify the MX records in your DNS server:

# nslookup
> set type=mx
> domain2.xyz.com.am

domain2.xyz.com.am mail exchanger = 10 mail.domain2.xyz.com.am

Check also the name resolution configuration ie. /etc/resolv.conf, /etc/nsswitch.conf and /etc/hosts if any of them are used.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Email: steven@beepz.com. Homepage: https://www.beepz.com
discoverer
Frequent Advisor

Re: Enable MX in sendmail (V8.7.1 in HPUX10.20)?

Hi Steven & other friends,

MX record was verified OK in all the mailservers & DNS server.

To be clearly,
Mailserver1 uses qmail(smtp+pop3) system, and mailserver2 uses sendmail+qpopper, they all have the correct MX record in a same DNS server.
I can send a mail to: user@domain2.mycompany.com.am via mailserver1's qmail-SMTP,but fail in reverse .

So, I think something of sendmail must be configed to use the MX record.

Any idea?

/discoverer
THINKING makes the life colorful!
Listen, then discover, then succeed!
discoverer
Frequent Advisor

Re: Enable MX in sendmail (V8.7.1 in HPUX10.20)?

Additional to avoid misunderstanding:
'fail in reverse' means:
sent a mail to user@domain1.mycompany.com.am via mailserver2's sendmail, but failed

/discoverer
Listen, then discover, then succeed!
discoverer
Frequent Advisor

Re: Enable MX in sendmail (V8.7.1 in HPUX10.20)?

Oops, all my friends

Finally I FOUND THE REASON!! :

After create/remove the /etc/resolv.conf in the sendmail server, the sendmail daemon must restart to use or not to use DNS.
Just don't like others command which can notice the change immediately, e.g. nslookup/telnet/...

So, now it's the author, my respected Eric Allman's turn ...
:-)

Thanks for everybody's help!!!

/Stupid Discoverer
Listen, then discover, then succeed!