rewrite "from" for sudo mails
Todd C. Miller
Todd.Miller at courtesan.com
Tue Mar 18 11:46:31 EST 2003
In message <OFA9C87BE1.45E258A5-ONC1256CEC.004AF0D1 at muc.allianz>
so spake (barbara.ruess):
> Sudo is sending mails with from="user who tried do anything".
> The new mailing concept that is to be intoduced in my company requires me
> to use a certain "from" address (the same one for every user), let's say
> "sudouser at mydomain. Is there a possibility (inside sudo) to rewrite the
> sender address?
There's no config knob to turn to do thing. However, it is simple
to hack the code a bit. In logging.c, you will see the following:
/* Pipes are all setup, send message via sendmail. */
(void) fprintf(mail, "To: %s\nFrom: %s\nSubject: ",
def_str(I_MAILTO), user_name);
You could just replace user_name with "sudouser at mydomain" (including
the double quotes).
- todd
More information about the sudo-users
mailing list