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

           Summary: VPopmail: spamd/vuserinfo fails on detecting alias-
                    users' maildirs
           Product: Spamassassin
           Version: 3.0.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: spamc/spamd
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


When processing mail for a vpopmail-alias-user, vuserinfo fails on retrieving
the user's maildir. This patch checks vuserinfo's return value and in case of an
error gives valias a try.

$ LANG=POSIX svn diff
Index: spamd/spamd.raw
===================================================================
--- spamd/spamd.raw     (revision 164238)
+++ spamd/spamd.raw     (working copy)
@@ -1404,7 +1404,15 @@
   # If vpopmail config enabled then set $dir to virtual homedir
   #
   if ( $opt{'vpopmail'} ) {
-    $dir = `$dir/bin/vuserinfo -d $username`;
+    my $vpopdir = $dir;
+    $dir = `$vpopdir/bin/vuserinfo -d $username`;
+    if ($? != 0) {
+      #
+      # If vuserinfo failed $username could be an alias
+      #
+      $dir = `$vpopdir/bin/valias $username`;
+      $dir =~ s,.+ -> (/.+)/Maildir/,\1,;
+    }
     chomp($dir);
   }
   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.

Reply via email to