Bug 4051 - Troubles with vpopmail alias implementation.
Summary: Troubles with vpopmail alias implementation.
Status: RESOLVED DUPLICATE of bug 4714
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamc/spamd (show other bugs)
Version: 3.0.2
Hardware: All All
: P2 trivial
Target Milestone: 3.2.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-24 04:01 UTC by Aleksey Ovcharenko
Modified: 2006-10-19 06:29 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
Posting a patch here, just in case. patch None Aleksey Ovcharenko [NoCLA]
make the search for vpopmail user home itterative application/octet-stream None Anton Lundin [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksey Ovcharenko 2004-12-24 04:01:23 UTC
I noticed, that spamassasin-3.0.2 doesn't make proper check for existing
directory, returned by vuserinfo command.

Attached patch, could fix that.

--- spamd       Thu Dec 23 17:28:32 2004
+++ spamd       Fri Dec 24 13:43:10 2004
@@ -1407,11 +1407,16 @@
     $dir = `$dir/bin/vuserinfo -d $username`;
     chomp($dir);
   }
-  my $cf_file = $dir . "/.spamassassin/user_prefs";
+  #
+  # If there is no such user, read default prefs
+  #
+  my $cf_file = undef;
+  $cf_file = $dir . "/.spamassassin/user_prefs" if -d $dir;

   #
   # If vpopmail config enabled then pass virtual homedir onto
create_default_cf_needed
   #
+  if ( defined $cf_file ) {
   if ( $opt{'vpopmail'} ) {
     if ( !$opt{'username'} ) {
       warn "cannot use vpopmail without -u\n";
@@ -1435,6 +1440,7 @@
         user_dir => $dir
       }
     );
+    }
   }

   return 1;
Comment 1 Aleksey Ovcharenko 2004-12-24 04:02:46 UTC
Created attachment 2583 [details]
Posting a patch here, just in case.
Comment 2 Ortwin Glueck 2005-01-18 08:18:56 UTC
While this is annoying, spamd behaves according to its man page. See parameter
--virtual-config-dir. I use

spamd -x --virtual-config-dir=/home/vpopmail/domains/%d/%l/.spamassassin -v -u
vpopmail

and without this patch spamd creates lots of unwanted directories.
Comment 3 Anton Lundin 2006-01-13 02:27:47 UTC
Created attachment 3331 [details]
make the search for vpopmail user home itterative
Comment 4 Justin Mason 2006-10-19 06:29:42 UTC
combining with bug 4714, which is more up to date

*** This bug has been marked as a duplicate of 4714 ***