-   Linux - Networking (
-   -   Sendmail / Mailertable not working! (

topkart94 03-03-2004 09:07 AM

Sendmail / Mailertable not working!

I installed Redhat Linux 9 with Sendmail. I want to use sendmail as a gateway. All mails that reach sendmail are send directly to the internet (by solving the mx records and being sent directly to the resposible mailserver) and for one particular domain ( should be directed to an internal Ip on the network e.g.
Outgoing emails work fine.
I made an entry in the mailer table (Domain Routing) which are like this: smtp:[] smtp:[]

though still, all emails sent to the domain, sendmail is still trying to solve the mx records for them instead of forwarding them directly to the smarthost. Any ideas please?


linuxxed 03-03-2004 10:48 AM

I hope you've built support for mailer table in the .mc file, compiled using m4 and restarted sendmail.

sorry to point out the obvious but many people commit this mistake.

FEATURE(`mailertable', `dbm /usr/lib/mailertable')

Does the smtp server to which the mail is forwarded recognize itself as

topkart94 03-03-2004 11:32 AM

"FEATURE(`mailertable', `dbm /usr/lib/mailertable') "


sorry but i am a newbie to sendmail. I was making the configuration through webmin. If I edit the .mc file then how can i effect the changes of sendmail in .cf file pleaese? I just run this command "make -C /etc/mail"
could you please guide me?


linuxxed 03-03-2004 01:20 PM

Hi mate

Make a backup of and

First check your /etc/mail/ for a line like

FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl

If not present then add it.

Compile it.

$ m4 /etc/mail/>/etc/mail/

Add your entries to /etc/mail/mailertable.
Generate the database by
$ makemap hash /etc/mail/mailertable </etc/mail/mailertable
This will create mailertable.db file.

Restart sendmail.

$ service sendmail restart

hope this helps

topkart94 03-04-2004 06:54 AM


That line you mentioned was in the mc file, therefore there was no need to recompile right?

Also, I edited maileirtable and run the command you gave me, but still without success. I tried deleting mailertable.db and recreating it again by running that command, but the mails are still trying to use DNS Server for delivery. Any ideas?

Btw what is the difference between SMTP and relay when setting up the mailer table?

Thanks in advance for all your valuable help.

linuxxed 03-05-2004 07:44 AM

How are you testing whether it is trying to use DNS?

What happens when you run sendmail in test mode?

sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 3,0

This link will help.

topkart94 03-05-2004 11:27 AM

Hi Mate,

It worked fine. I tried everything from scratch and it worked. I checked this document (as you told me exactly) and it worked. Thanks very much for your help :)

All times are GMT -5. The time now is 06:14 PM.