Bug 5734

Summary: spamd should not require a -u option when run as non-root
Product: Spamassassin Reporter: Duncan Findlay <duncf>
Component: spamc/spamdAssignee: SpamAssassin Developer Mailing List <dev>
Status: NEW ---    
Severity: enhancement    
Priority: P5    
Version: SVN Trunk (Latest Devel Version)   
Target Milestone: Undefined   
Hardware: Other   
OS: other   
Whiteboard:

Description Duncan Findlay 2007-11-28 16:03:45 UTC
The -u option is required by spamd when any --vpopmail, --virtual-config-dir,
--ldap-config or --sql-config is used.

This seems redundant when spamd is not being run as root. This was brought up in
discussion about bug 5728. To quote Justin:

> So the caller has to know what their current
> username is, and use that in the invocation, and spamd will then run ok as
> non-root with those options.
> 
> If you are suggesting that we should *automatically* deal with this case, by
> doing something like
> 
>   if ($> != 0 && !$opt{'username'}) {
>     # we are run as non-root; set username to whatever we're currently running as
>     $opt{'username'} = currently_running_username();
>   }
> 
> I would be in favour of this, as a new feature.  But it'd be a separate bug...