1

I have a sendmail server that's doing something funny. (Funny to me anyway)

It's on a RHEL box and there is an application on the same box that sends messages. The messages are set to send to (for example)

to: user@domain.com user2@domain.com from: postmaster@domain.com

and I don't get any of the emails. I added an external (gmail) account to the CC and get that email ok. Looking at the header on the email that is received, sendmail is changing the addresses to

user@www.domain.com user2@www.domain.com and postmaster@www.domain.com respectively.

This is because on our LAN if you ping domain.com, you get back www.domain.com through a CNAME record we have set up. We want any "invalid" addresses typed into IE to take you to our home page... so if you ping asdfasdfasd.domain.com, you'll go to www.domain.com

How can I modify sendmail to not do it's own DNS lookup on our domains? I did a packet capture on the traffic to verify that's what it is doing. A host file on the local machine has no effect, I'm sure I need to tell sendmail to actually USE the hosts file, or someting. Help is appreciated.

LVLAaron
  • 436
  • 6
  • 13
  • 1
    ...you _cannot_ CNAME `domain.com.` to `www.domain.com.`, can you? – user1686 Mar 03 '11 at 14:12
  • @grawity I think it's sort of like setting MX to a CNAME. You can't, but not all programs are sufficiently pedantic enough to care. – DerfK Mar 03 '11 at 17:31
  • @DerfK: No, it's different. Having CNAME and SOA&NS records on the same name causes the name and its target to have differing data. Pointing MX to a CNAME, afaik, is just "not recommended" because of extra DNS lookups (do they even happen when CNAMEing within the same zone?). – user1686 Mar 03 '11 at 18:16
  • You cannot have a CNAME RR for domain.com. What is the output of `host -t any domain.com`? – Mark Wagner Mar 03 '11 at 21:03

1 Answers1

0

What you are asking for is done via the /etc/mail/service.switch file. Its syntax is similar to the nsswitch.conf(5). However, your setup is complex, and flawed if indeed you've used CNAMEs in places you shouldn't have.

adamo
  • 6,867
  • 3
  • 29
  • 58
  • My service.switch file reads as hosts dns file aliases files The problem with our DNS configuration... for some reason (still tracking this down) there is a record for * pointing to www.domain.com - so if someone tries to go to domain.com or asdfasdfasdf.domain.com, they go to our website. – LVLAaron Mar 07 '11 at 14:22