You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2004/03/02 21:29:14 UTC

[Bug 3120] New: vpopmail user_prefs lookup bug for catch-all users

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: spamassassin-dev@incubator.apache.org
        ReportedBy: gary@daimonic.org


Say you have jim@bob.com as a vpopmail user for bob.com, and you are using "-v -u 
<vpopmailuser>" so that spamd can look up user_prefs in jim@bob.com's Maildir. This
works fine except when jim@bob.com is a catch-all account (all mail destined for
non-existant users @bob.com get delivered to jim@bob.com), because if a mail
arrives 
for blah@bob.com 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] =~ /\@$userdom[1]$/);
+       }
        $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.