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 (test.com) should be directed to an internal Ip on the network e.g. 172.16.130.3.
Outgoing emails work fine.
I made an entry in the mailer table (Domain Routing) which are like this:
though still, all emails sent to the domain test.com, sendmail is still trying to solve the mx records for them instead of forwarding them directly to the smarthost. Any ideas please?
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 test.com?
"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?
Make a backup of sendmail.mc and sendmail.cf.
First check your /etc/mail/sendmail.mc for a line like
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
If not present then add it.
$ m4 /etc/mail/sendmail.mc>/etc/mail/sendmail.cf
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.
$ service sendmail restart
hope this helps
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.
How are you testing whether it is trying to use DNS?
What happens when you run sendmail in test mode?
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 3,0 email@example.com
This link will help.
It worked fine. I tried everything from scratch and it worked. I checked this document http://www.sendmail.org/m4/mailertables.html (as you told me exactly) and it worked. Thanks very much for your help :)
|All times are GMT -5. The time now is 03:26 PM.|