How to redirect mail sent to root to external mailbox?

Greg Barniskis nalists at
Mon Nov 14 17:42:33 GMT 2005

Mark J. Sommer wrote:
>>-----Original Message-----
>>From: Greg Barniskis [mailto:nalists at] 
>>Sent: Monday, November 14, 2005 8:02 AM
>>To: Mark J. Sommer
>>Cc: 'Hans Nieser'; freebsd-questions at
>>Subject: Re: How to redirect mail sent to root to external mailbox?
>>Mark J. Sommer wrote:
>>>This is really a sendmail question I believe.  Your problem is 
>>>probably because root doesn't get masqueraded.  In your 
>>>is there a line like the following:
>>>If so, comment it out and restart sendmail.
>>That will work but the config will get overwritten on 
>>upgrades. It is best to override the defaults via the mc 
>>config generator, so that "CE root" doesn't appear in the first place.
> Yeah, I looked all over /usr/share/sendmail to find that config, but I
> couldn't.  When I resolved this, I think I modified the template that the
> macros start from to avoid having it re-written.  I'd appreciate it if
> anyone can pass on what macro it is that controls this.

A glance at the bat book tells me the exception (no masquerading) is 
  inserted by


Doh! I see it now. FreeBSD doesn't do it this way (so no "CE root").

For FreeBSD, non-masquerading for root is simply set by an entry in 
/etc/mail/exposed-user-names, which is brought in by the 
EXPOSED_USER_FILE directive in the default mc file. Edit 
exposed-user-names to your heart's content (and pay attention in 
case mergemaster throws it back at you during upgrades), and all 
should be well.

Greg Barniskis, Computer Systems Integrator
South Central Library System (SCLS)
Library Interchange Network (LINK)
<gregb at>, (608) 266-6348

More information about the freebsd-questions mailing list