LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-03-2004, 09:07 AM   #1
topkart94
LQ Newbie
 
Registered: Aug 2003
Posts: 8

Rep: Reputation: 0
Unhappy Sendmail / Mailertable not working!


Hi,

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:

.test.com. smtp:[172.16.130.3]
test.com. smtp:[172.16.130.3]

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?

Regards,
 
Old 03-03-2004, 10:48 AM   #2
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
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?
 
Old 03-03-2004, 11:32 AM   #3
topkart94
LQ Newbie
 
Registered: Aug 2003
Posts: 8

Original Poster
Rep: Reputation: 0
"FEATURE(`mailertable', `dbm /usr/lib/mailertable') "

Hi,

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?

thanks
 
Old 03-03-2004, 01:20 PM   #4
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
Hi mate

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.

Compile 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.

Restart sendmail.

$ service sendmail restart



hope this helps
 
Old 03-04-2004, 06:54 AM   #5
topkart94
LQ Newbie
 
Registered: Aug 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Hi,

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.
 
Old 03-05-2004, 07:44 AM   #6
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
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 foo@test.com

http://www.freebsd.org/doc/en_US.ISO...smtp-uucp.html

This link will help.
 
Old 03-05-2004, 11:27 AM   #7
topkart94
LQ Newbie
 
Registered: Aug 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Hi Mate,

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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail - virtualusertable / mailertable Ratclaws Linux - Software 0 07-07-2005 12:34 PM
sendmail mailertable RedHat123 Linux - Networking 5 04-09-2005 02:43 PM
Help Getting Sendmail working Like I want it shilo Slackware 14 06-07-2004 01:34 PM
Sendmail seems working but not Swift&Smart Linux - Software 2 05-14-2003 07:14 AM
Sendmail not working at all. EL3CTRO Linux - Networking 13 05-03-2003 06:06 AM


All times are GMT -5. The time now is 04:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration