0

Is it possible to configure sendmail to use the hosts and resolv.conf files other then the ones located in /etc/?

4
  • What are you trying to accomplish? Are you trying to specify a different destination for a particular domain?
    – ewwhite
    Oct 26, 2010 at 9:57
  • @ewwhite: No, I just want sendmail to use other DNS servers then the ones specified in /etc/resolv.conf. I'm a developer working on an embedded platform. The system itself is a huge pile of loosely coupled apps and no one knows what programs will modify the /etc/ files any more. So I want to have special copies of these files just for sendmail. Don't bash me if that's a stupid question - I don't usually do stuff like that and had my first contact with sendmail just yesterday...
    – user58292
    Oct 26, 2010 at 10:04
  • An embedded system where you can't trust your own /etc? Not trying to #bash you here, but get a #grep on your platform. :-) If you can't trust something as basic as dns lookups then something else is also bound to break eventually. Then some poor soul will have to wade through your dns hacks looking for the other problem.
    – Caleb
    Oct 26, 2010 at 11:33
  • If it were up to me I'd euthanize the platform right away LOL Did I mention the kernel version? Well it's 2.4.29... in the XXI century!
    – user58292
    Oct 27, 2010 at 7:38

2 Answers 2

0

In short, not that I know of. Most programs use standard system calls for any name resolution and leave the details to the OS.

Now, if you're concerned about people/programs changing file contents, take a look at the chattr command. You can set files such that they can't be overwritten without removing the immutable flag first. It's highly unlikely any program will be written to do that.

0

One option might be setting up postfix and using transport maps to send email where you want it to go.

Bit much to post all the detail on that as it may not be what you want, but to give you an idea.

in main.cf
transport_maps = hash:/etc/postfix/transport

/etc/postfix/transport:
example.com   smtp:[inside-gateway.example.com]

With this setup you can redirect domain names to wherever you want, regardless of dns on the box.

You must log in to answer this question.