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 2005/04/22 16:31:45 UTC

[Bug 4276] New: VPopmail: spamd/vuserinfo fails on detecting alias-users' maildirs

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: dev@spamassassin.apache.org
        ReportedBy: daniel@lbers.com


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.

[Bug 4276] VPopmail: spamd/vuserinfo fails on detecting alias-users' maildirs

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4276


quinlan@pathname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.1.0                       |3.1.1




------- Additional Comments From quinlan@pathname.com  2005-04-30 20:25 -------
looks good, but you need to check the exit status from the second command
as well, there's not enough error checking in general, here

Can you submit a new patch?

Also, can you submit a CLA to the ASF?

http://www.apache.org/licenses/#clas

Thanks!

(moving to 3.1.1)




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

[Bug 4276] VPopmail: spamd/vuserinfo fails on detecting alias-users' maildirs

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4276


daniel@lbers.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #2821 is|0                           |1
           obsolete|                            |




------- Additional Comments From daniel@lbers.com  2005-05-01 09:32 -------
Created an attachment (id=2823)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2823&action=view)
Style change

Style change agreed.



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

[Bug 4276] VPopmail: spamd/vuserinfo fails on detecting alias-users' maildirs

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4276


quinlan@pathname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |cla
   Target Milestone|3.1.1                       |3.1.0




------- Additional Comments From quinlan@pathname.com  2005-04-30 21:54 -------
Looks good.  Style comment: I'd change:

      if ( $? == 0 and not $dir =~ /.+ -> &/) {

to

      if ($? == 0 && $dir !~ /.+ -> &/) {

moving back to 3.1.0 with "cla" pending flag added, we'll see if it can make it...




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

[Bug 4276] VPopmail: spamd/vuserinfo fails on detecting alias-users' maildirs

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4276


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
           Keywords|cla                         |
         Resolution|                            |FIXED
  Status Whiteboard|awaiting CLA                |CLA received




------- Additional Comments From jm@jmason.org  2005-06-01 18:46 -------
CLA noted as received; patch applied.  r179483.



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

[Bug 4276] VPopmail: spamd/vuserinfo fails on detecting alias-users' maildirs

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4276


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|                            |awaiting CLA






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

[Bug 4276] VPopmail: spamd/vuserinfo fails on detecting alias-users' maildirs

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4276


daniel@lbers.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #2798 is|0                           |1
           obsolete|                            |




------- Additional Comments From daniel@lbers.com  2005-04-23 03:25 -------
Created an attachment (id=2804)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2804&action=view)
minimal change from \1 to $1 in substitution




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

[Bug 4276] VPopmail: spamd/vuserinfo fails on detecting alias-users' maildirs

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4276


Bob@Menschel.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |3.1.0




------- Additional Comments From Bob@Menschel.net  2005-04-28 21:00 -------
Given supplied patch, I would hope this should be easy to test/validate into 3.1.0.



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

[Bug 4276] VPopmail: spamd/vuserinfo fails on detecting alias-users' maildirs

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4276


daniel@lbers.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #2804 is|0                           |1
           obsolete|                            |




------- Additional Comments From daniel@lbers.com  2005-04-30 21:45 -------
Created an attachment (id=2821)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2821&action=view)
Checks if valias exits non-zero and if result is a forward-address. Undefs $dir
in either cases. (appropriate?)

CLA on its way.



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

[Bug 4276] VPopmail: spamd/vuserinfo fails on detecting alias-users' maildirs

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4276





------- Additional Comments From daniel@lbers.com  2005-04-22 07:35 -------
Created an attachment (id=2798)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2798&action=view)
make spamd/spamd.raw use valias to check for VPopmail-aliases




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