http://bugzilla.spamassassin.org/show_bug.cgi?id=3120

           Summary: vpopmail user_prefs lookup bug for catch-all users
           Product: Spamassassin
           Version: 2.63
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: spamc/spamd
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Say you have [EMAIL PROTECTED] as a vpopmail user for bob.com, and you are 
using "-v -u 
<vpopmailuser>" so that spamd can look up user_prefs in [EMAIL PROTECTED]'s 
Maildir. This
works fine except when [EMAIL PROTECTED] is a catch-all account (all mail 
destined for
non-existant users @bob.com get delivered to [EMAIL PROTECTED]), because if a 
mail
arrives 
for [EMAIL PROTECTED] spamd will try to find
$vpopmaildomaindir/blah/.spamassassin/user_prefs when it should be looking at 
$vpopmaildomaindir/jim/.spamassassin/user_prefs instead.

Here is a patch for spamd to fix this issue:

--- Mail-SpamAssassin-2.63/spamd/spamd.raw      Sat Jan 17 23:56:18 2004
+++ Mail-SpamAssassin-2.63-patched/spamd/spamd.raw      Tue Mar  2 20:10:33 2004
@@ -948,6 +948,17 @@
     # If vpopmail config enabled then set $dir to virtual homedir
     #
     if ($opt{'vpopmail'}) {
+       my @userdom = split('@', $username);
+       my $domdir = `$dir/bin/vdominfo -d $userdom[1]`;
+       chomp($domdir);
+       if (-f "$domdir/.qmail-default" && -r "$domdir/.qmail-default") {
+               open FH, "$domdir/.qmail-default";
+               my $line = <FH>;
+               close FH;
+               chomp($line);
+               my @l = split(' ', $line);
+               $username = pop(@l) if ($l[$#l] =~ /[EMAIL PROTECTED]/);
+       }
        $dir = `$dir/bin/vuserinfo -d $username`;
        chomp ($dir);
     }



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to