http://bugzilla.spamassassin.org/show_bug.cgi?id=3120
------- Additional Comments From [EMAIL PROTECTED] 2004-03-02 13:38 -------
Here is a new, more tested patch.
--- 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 21:37:14 2004
@@ -948,8 +948,27 @@
# If vpopmail config enabled then set $dir to virtual homedir
#
if ($opt{'vpopmail'}) {
- $dir = `$dir/bin/vuserinfo -d $username`;
- chomp ($dir);
+ # Preserve $dir for now in case the user does'nt exist.
+ my $udir = `$dir/bin/vuserinfo -d $username`;
+ $udir =~ s/\n//g;
+
+ if ($udir eq "no such user $username") {
+ 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]/);
+ $udir = `$dir/bin/vuserinfo -d $username`;
+ chomp($udir);
+ }
+ }
+ # Now reassign $dir.
+ $dir = $udir;
}
my $cf_file = $dir."/.spamassassin/user_prefs";
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.