[sudo-users] Has anyone successfully modified the default "mailto" string in sudoers file

Russell Van Tassell russell+sudo-users at loosenut.com
Wed Jan 18 20:20:51 EST 2006


On Wed, Jan 18, 2006 at 11:18:05AM -0700, Stoddard, Kevin M wrote:
> Quoting directly from the, Sudoers Manual, (Copyright 2004 GratiSoft, Inc.)...
>  
>     Page 11 - mailto
>                         Address to send warning and error mail to. [SIC]  The address should be enclosed in double quotes (") to protect against sudo interpreting the @ sign.  Defaults to root.
>  
> This implies the following form is correct:
>  
>     Defaults    mailto = "me at hostname"


At work (read: large network with many subnets) we use things such as
the following (names changed to protect the guilty, etc):

Defaults          mailto=sudoalerts\@mydomain.com
Defaults          mailsub="*** SECURITY information for CORP-%h ***"
Defaults at PROD     mailsub="*** SECURITY information for PROD-%h ***"
Defaults at SUBNET1  mailsub="*** SECURITY information for SUBNET1-%h ***"
Defaults at SUBNET2  mailsub="*** SECURITY information for SUBNET2-%h ***"
Defaults at SUBNET5  mailsub="*** SECURITY information for SUBNET5-%h ***"
[...]

...of course, coupled with an even more complicated stanza of HOST_ALIAS
lines.

(so, I think you just need to remove the quotes or something?)

Hope that helps...
Russell

-- 
Russell M. Van Tassell
russell at loosenut.com

"You're just jealous because the voices are talking to me!!"



More information about the sudo-users mailing list