Jeff Potter
2007-Jul-02 17:43 UTC
[CentOS] dumb sendmail question -- how to get outbound messages to use "example.com" instead of hostname?
Hi List, I have a dumb sendmail question, and I'm wondering if anyone can point me in the right direction (besides "sendmail list is two doors down on the left" ;-). One of our clients has a bunch of servers -- CentOS 5 -- that are on only a private network that's NATted to the outside world -- that is, those servers can initiate outbound connections fine, but don't have valid IPs / hostnames as far as the outside world is concerned. The problem is the hostnames of these machines don't exist in real DNS anywhere, so when they try to send mail to the outside world, other mail servers are seeing an invalid domain in the from address and summarily rejecting the messages (which makes sense). I need to figure out how to tell sendmail, when sending outbound messages, to use the domain name "example.com", instead of "subdomain.example.com". It would seem simple in /etc/mail/sendmail.mc: MASQUERADE_AS(`example.com')dnl LOCAL_DOMAIN(`example.com')dnl FEATURE(`masquerade_envelope')dnl FEATURE(masquerade_entire_domain)dnl MASQUERADE_DOMAIN(betsy.example.com)dnl (Followed by a make -C /etc/mail; service sendmail restart) This doesn't seem to work. The odd thing is that, when I send a message out to an external address of mine, the bounce back to root *does* get through successfully -- the from address at that point is "MAILER-DAEMON at example.com" so it allows it. Thoughts? I'm thinking I'm missing something realllllllly basic. best, Jeff
Brent L. Bates
2007-Jul-02 18:03 UTC
[CentOS] dumb sendmail question -- how to get outbound messages to use "example.com" instead of hostname?
On our servers here are some sendmail.mc lines referring to our domain. May be they will help. These are from our main server: define(`confDOMAIN_NAME',vigyan.com)dnl CLIENT_OPTIONS(`Family=inet,Addr=vigyan.com')dnl define(`SMART_HOST',`vigyan.com')dnl FEATURE(`smart_host_domain',`vigyan.com ')dnl These are from our slave servers: CLIENT_OPTIONS(`Family=inet,Addr=slave.vigyan.com')dnl MASQUERADE_AS(vigyan.com)dnl MASQUERADE_DOMAIN(vigyan.com)dnl FEATURE(`allmasquerade')dnl FEATURE(`masquerade_entire_domain')dnl FEATURE(`masquerade_envelope')dnl define(`SMART_HOST',`slave.vigyan.com')dnl FEATURE(`smart_host_domain',`vigyan.com ')dnl Good luck.
Chris Boyd
2007-Jul-02 20:53 UTC
[CentOS] dumb sendmail question -- how to get outbound messages to use "example.com" instead of hostname?
On Jul 2, 2007, at 12:43 PM, Jeff Potter wrote:> The problem is the hostnames of these machines don't exist in real > DNS anywhere, so when they try to send mail to the outside world, > other mail servers are seeing an invalid domain in the from address > and summarily rejecting the messages (which makes sense). > > I need to figure out how to tell sendmail, when sending outbound > messages, to use the domain name "example.com", instead of > "subdomain.example.com". It would seem simple in /etc/mail/ > sendmail.mc:You can set the host name other people see with something like define(`confDOMAIN_NAME', `your.server_name.com') -- Chris