Sendmail Masqurading and root mails
Giorgos Keramidas
keramida at ceid.upatras.gr
Mon Aug 3 12:58:05 UTC 2009
On Mon, 03 Aug 2009 11:22:37 +1000, Danny Carroll <fbsd at dannysplace.net> wrote:
> I've added the following to the default sendmail mc file:
>
> 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.
The `root' user is excluded from masquerading since 8.10. The
`generic.m4' domain configuration file includes:
keramida at kobe:/usr/share/sendmail/cf/domain$ fgrep EXPOSE generic.m4
EXPOSED_USER(`root')
keramida at kobe:/usr/share/sendmail/cf/domain$
You can copy this file and remove the EXPOSED_USER line. Or you can
edit `generic.m4' directly.
If you go the copy route, make sure to check for updates in `generic.m4'
whenever you installworld, and merge the changes to your domain specific
configuration file.
More information about the freebsd-questions
mailing list