Operating System - HP-UX
1823883 Members
4019 Online
109666 Solutions
New Discussion юеВ

mailertable doesn't work on sendmail

 
SOLVED
Go to solution
Manuela Italia
Advisor

mailertable doesn't work on sendmail

Hi All

I'm trying to configure mailertable on my HP-UX 11.11 system with sendmail 8.9.3 (PHNE_29774 sendmail(1m) 8.9.3 patch).

I added on sendmail.cf
Kmailertable hash /etc/mail/mailertable
and
DSrelay.domain.internal

and I wrote on /etc/mail/mailertable

domain.external smtp:relay.domain.external

after restarting sendmail, I tryed to send emails to user@domain.external but all emails were routed via DS smarthost relay.domain.internal

It seems that sendmail completely ignores mailertable rules.

Any suggestion?


Thank you!


Manuela


5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: mailertable doesn't work on sendmail

Shalom,

If you disabled smart relay, then mailertable rules might come into play.

I'm wondering what you were trying to accomplish?

At this point all outbound mail goes out via the smart relay. I can't even tell from the information posted if you use the system for inbound mail.

An example from mailertable and expected results would be helpful.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Manuela Italia
Advisor

Re: mailertable doesn't work on sendmail

Hi

I would like, using mailertable, to specify destination servers for specific mail domains:

If I send an email locally from my hp-ux system

mail to everyuser@domain.external
should be routed to host : relay.domain.external

mail to everyuser@domain.internal
should be routed to host : relay.domain.internal

thank you


Manuela
VK2COT
Honored Contributor
Solution

Re: mailertable doesn't work on sendmail

Hello,

a) Firstly, did you enable ALL relevant lines in /etc/mail/sendmail.cf. Here are defaults from an HP-UX server:

#Kmailertable dbm -o /etc/mail/mailertable
#R< $+ > $* $: < $(mailertable $1 $) > $2 lookup
### Ruleset 90 -- try domain part of mailertable entry ###
#R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4
#R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "."
#R< $* > $* $@ $2 no mailertable match

b) Secondly, did you create a HASH database
after editing the text file /etc/mail/mailertable. Something along the following lines:

cd /etc/mail
makemap hash mailertable
You can be even more creative in
mailertable. Here is an entry from
a production server for a company I manage:

domain.dom esmtp:server1.dom1:server2.dom2
domain3.dom3 smtp:[server4.dom4]:server5.dom5]

What it means: if server1.dom1 is avaiable,
email for domain.dom will be delivered to it,
if not, server2.dom2 will be tried...

The second example by-passes DNS and resolves
SMTP gateway hostnames through local hosts file (hence square brackets).

c) Thirdly, after changing sendmail.cf,
reload the daemon...

d) Finally, your version of Sendmail MTA is
insecure and very old. An upgrade
is strongly recommended.

Regards,

VK2COT
VK2COT - Dusan Baljevic
Sergey Akifiev_1
Frequent Advisor

Re: mailertable doesn't work on sendmail

one little note to Dusan Baljevic's post.
perhaps it might be worth to change `-o dbm' to '-o hash' in Kmailertable definition if you use `makemap hash'
Manuela Italia
Advisor

Re: mailertable doesn't work on sendmail

Hi Dusan,

I solved my problem following your hints.
I also disabled "DS" macro in sendmail.cf, defining smarthost rules on mailertable.


Thank you!
Regards.



Manuela