Re: [exim] Running exim as a user with no username

Top Page
Delete this message
Reply to this message
Author: Kjetil Torgrim Homme
Date:  
To: Mike Cardwell
CC: exim-users
Subject: Re: [exim] Running exim as a user with no username
On Thu, 2006-01-26 at 23:00 +0000, Mike Cardwell wrote:
> The cgi's continue to run under the correct UID, but Exim
> fails to do a getpwuid(uid) so panics and drops the mail. I hacked
> src/exim.c to set the uid to be that of the exim user if getpwuid()
> fails. That seems to work fine and it stops panicking, except... the
> "Return-path" and default "Sender" is always set to "exim@???".
>
> I would like the Return-path and default Sender to be set to
> "webmaster@$domain". I'm guessing $domain could be pulled out of the
> environment variable "VHOST" which is set in our Apache configuration.
> Any suggestions?


I suggest you replace /usr/sbin/sendmail with a wrapper which calls the
real /usr/sbin/sendmail -fwebmaster@$VHOST. make sure that the calling
user is in a "trusted group" so that the -f has effect.
--
Kjetil T.