Sendmail Masqurading and root mails

Jeffrey Goldberg jeffrey at goldmark.org
Mon Aug 3 04:29:24 UTC 2009


On Aug 2, 2009, at 8:22 PM, Danny Carroll wrote:

> MASQUERADE_AS(`mypublicdomain.com')dnl
> FEATURE(masquerade_envelope)dnl
> MASQUERADE_DOMAIN(beasie.lan)dnl
>
> Recompiled the cf files and restarted sendmail.
>
> Here is the kicker.  If I log in as a normal user it masquerades just
> fine.
>
> If I simply "su -"  to root, the masquerading works fine and the  
> mail is
> sent as the original logged in user.
>
> But if I log in as root via the console then it does not alter the  
> messages.

I found the answer to your problem here:

  http://www.grok.org.uk/docs/smroot.html


The file that is being included which has the

   EXPOSED_USER(`root')

line lives at

  /usr/share/sendmail/cf/domain/generic.m4

Just make a copy of that file, call it beasie.m4, remove the  
"EXPOSE_USER" directive from your copy and then change

  DOMAIN(generic)

to

  DOMAIN(beasie)

in your mail .mc file.

Cheers,

-j




-- 
Jeffrey Goldberg                        http://www.goldmark.org/jeff/



More information about the freebsd-questions mailing list