On Thu, Oct 31, 2002 at 03:06:27PM -0600, Josh Trutwin wrote:
> 
> > On Thu, Oct 31, 2002 at 01:01:25PM -0600, Josh Trutwin wrote:
> >> Also, where does spamd check for DCC?  /usr/local/bin/dccproc exists
> >> and I made a link in /usr/bin but spamd still says it cannot find
> >> dccproc.
> >
> > It should look at your PATH and find it.  However, if you're running
> > Razor 2.20 as well, PATH gets destroyed (it's fixed for 2.44/2.50). So
> > you need to set dcc_path in the config file.
> 
> Thanks Theo, that fixed it.  man Mail::SpamAssassin::Conf would have told
> me this.  oops.
> 
> Do you know if "spamd -Q" is 2.44/2.50?

It doesn't look like my patches have made it into a release yet -- I just
patched 2.43 this morning and attached the diffs. (Of course, I didn't
patch spamd.raw let me fix that.)

> I run spamd with -d -q -x, but would like to add -a -H -u spamd.  This
> doesn't seem to work though in tandem with SQL pref lookup and razor.

(or the AWL)

-- 
Kelsey Cummings - [EMAIL PROTECTED]         sonic.net
System Administrator                    2260 Apollo Way
707.522.1000 (Voice)                    Santa Rosa, CA 95407
707.547.2199 (Fax)                      http://www.sonic.net/
Fingerprint = 7F 59 43 1B 44 8A 0D 57  91 08 73 73 7A 48 90 C5
--- spamd.raw   Thu Oct 31 13:54:46 2002
+++ spamd.raw-dist      Thu Oct 31 13:48:43 2002
@@ -63,7 +63,6 @@
        'max-children|m=i' => \$opt{'max-children'},
        'port|p=i' => \$opt{'port'},
        'sql-config!' => \$opt{'sql-config'}, 'q' => \$opt{'sql-config'},
-       'setuid-with-sql' => \$opt{'setuid-with-sql'}, 'Q' => \$opt{'setuid-with-sql'},
        'virtual-config|V=s' => \$opt{'virtual-config'},
        'pidfile|r=s' => \$opt{'pidfile'},
        'syslog|s=s' => \$opt{'syslog'},
@@ -79,7 +78,6 @@
        'stop-at-threshold!' => \$opt{'stop-at-threshold'}, 'S' => 
\$opt{'stop-at-threshold'},
        'helper-home-dir|H:s' => \$opt{'home_dir_for_helpers'},
 
-
         # will be stripped in future release
        'add-from!' => sub { warn "The --add-from option has been removed\n" },
         'F=i' => sub { warn "The -F option has been removed\n" }
@@ -354,8 +352,6 @@
                                              handle_user_sql($current_user);
                                       } elsif ($opt{'virtual-config'}) {
                                              handle_virtual_user($current_user);
-                                      } elsif ($opt{'setuid-with-sql'}) {
-                                             
handle_user_setuid_with_sql($current_user);
                                       }
                         }
                                        else
@@ -500,8 +496,6 @@
                                handle_user_sql($current_user);
                            } elsif ($opt{'virtual-config'}) {
                                handle_virtual_user($current_user);
-                           } elsif ($opt{'setuid-with-sql'}) {
-                               handle_user_setuid_with_sql($current_user);
                            }
                         }
                        else
@@ -748,34 +742,6 @@
     return 1;
 }
 
-sub handle_user_setuid_with_sql
-{
-    my $username = shift;
-    my ($name,$pwd,$uid,$gid,$quota,$comment,$gcos,$dir,$etc) = getpwnam($username);
-
-    if ( !$spamtest->{'paranoid'} && !defined($uid) ) {
-       #if we are given a username, but can't look it up,
-       #Maybe NIS is down? lets break out here to allow
-       #them to get 'defaults' when we are not running paranoid.
-       logmsg "handle_user() -> unable to find user [$username]!\n";
-       return 0;
-    }
-
-    if ($setuid_to_user) {
-       $> = $uid;
-       if ( !defined($uid) || ($> != $uid and $> != ($uid-2**32))) {
-           logmsg "fatal: setuid to $username failed";
-          die;         # make it fatal to avoid security breaches
-        }
-       else
-       {
-          logmsg "info: setuid to $username succeeded, reading scores from SQL.";
-        }
-    }
-    $spamtest->load_scoreonly_sql ($username);
-    return 1;
-}
-
 sub create_default_cf_if_needed {
     my ($cf_file, $username, $userdir) = @_;
 
@@ -930,8 +896,6 @@
  -m num, --max-children num         Allow maximum num children
  -p port, --port                    Listen on specified port (default: 783)
  -q, --sql-config                   Enable SQL config (only useful with -x)
- -Q, --setuid-with-sql              Enable SQL config (only useful with -x,
-                                   enables use of -a and -H)
  -V, --virtual-config=dir           Enable Virtual configs (needs -x)
  -r pidfile, --pidfile              Write the process id to pidfile
  -s facility, --syslog=facility     Specify the syslog facility (default: mail)
@@ -1011,13 +975,6 @@
 with B<-x>. this is useful for spamd hosts which don't have user's
 home directories but do want to load user preferences from an SQL
 database.
-
-=item B<-Q>, B<--setuid-with-sql>
-
-Turn on SQL lookups even when per-user config files have been disabled
-with B<-x> and also setuid to the user.  This is useful for spamd hosts
-which want to load user preferences from an SQL database but also wish to
-support the use of B<-a> (AWL) and B<-H> (Helper home directories.)
 
 =item B<-V>, B<--virtual-config>=I<directory>
 

Reply via email to