Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an out-of-box package-based installation of Sendmail on a CentOS 5.4 machine and am attempting to configure it to act as the public-facing relay server for various internal servers that handle e-mail for various domains. All the proper MX entries point to this public-facing server.

I've performed these steps so far:

  • Installed sendmail via yum, which gave me stock sendmail.{mc,cf} files.
  • Ensured that the mailertable option in sendmail.mc is defined and not commented out.
  • Ensured that the Kmailertable option appears in sendmail.cf after running make.
  • Edited mailertable to include the domains I wish to relay to internal servers in lieu of using MX. (i.e., domainx.com: relay:mail1.internal.com)
  • Run make and ensured that changes were committed to mailertable.db.
  • Restarted sendmail.

The problem occurs when I actually attempt to relay mail destined for one of the mailertable domains through this box. The resulting entry in maillog reports config error: mail loops back to me (MX problem?) and subsequently DSN: Local configuration error. At no point does it mention attempting to use the relays I've explicitly provided; it is doing pure MX-based routing instead. This is the same end result I get when I disable mailertable, so it appears it's completely disregarding it altogether. As a side note I've attempted using domainx.com: smtp:mail1.internal.com with no change.

Is there a step in the process that I'm missing to get this working correctly?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

OK, I steered you incorrectly in your last question. The proper format for mailertable is:

domain.com         relay:some.other.system

...ie, no colon after the intended destination.

Sorry about that -- going too fast on my part. I've fixed the other question too so it won't mislead people in future.

share|improve this answer
    
Excellent! That did the trick indeed. Thanks for all your help. –  Brian Cline Dec 16 '09 at 1:07
add comment

Please don't use sendmail. There are several better, easier to configure replacements for sendmail, like exim or postfix. You should only use sendmail where you have an existing sendmail infrastructure and you have a significant experience with it. You'll probably find you can set up and replace sendmail with exim in the time it takes you to sort out why sendmail isn't working, and there'll be a lot more help available for you here and on other sites.

share|improve this answer
2  
You make several false assumptions: (1) that posting a question about a specific feature of sendmail means one has no experience with sendmail whatsoever; (2) that, because I haven't provided you with specifics of my internal infrastructure, that I must not be running sendmail anywhere else; (3) that I don't already have reasons for choosing sendmail, despite this not being a question posing the question "what daemon should I use"; (4) that nobody here can help with sendmail problems. All are false assumptions. –  Brian Cline Dec 16 '09 at 1:00
    
Additionally, you've mistakenly posted your comment as an answer. You might consider posting a comment instead. –  Brian Cline Dec 16 '09 at 1:01
    
I agree with Brian. If the question is "how might I do this relaying?" a valid answer would be "it might be easier to look into exim or postfix." –  David Mackintosh Dec 16 '09 at 13:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.