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...@issues.apache.org on 2010/06/22 16:10:58 UTC

[Bug 5894] spamd doesn't work anymore with "-c -v" options, i.e. doesn't use vpopmail virtual users' dirs

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5894

--- Comment #15 from grubs <sb...@litepc.com> 2010-06-22 10:10:51 EDT ---
Sorry - this is long winded.

The original logic of Alex Dupre's opening patch is not being met by the fixes
that have been implemented here so far when simscan is compiled for per-domain
use instead of per-user.

When simscan is compiled for per-domain checking simscan does NOT add the -u
<address of the recipient>.  Therefore spamd should be running as user vpopmail
as specified from the command line (-u vpopmail)

and the userdir should default to the recipient mailbox dir, or
/usr/local/vpopmail if the domain is forwarded to another server.

What is happening is when the code gets to..

 $userdir = handle_user_vpopmail($username_untainted,$vpopdir);

there is an assumption that $username_untainted is actually a mailbox user but
when per-domain checking is used the value of $username_untainted is the unix
user 'simscan' (who does NOT have a mailbox nor alias in vpopmail).

At this point in the code logic - we need

$userdir = handle_user_vpopmail($username_untainted,$vpopdir);

to just return the value of $vpopdir (= $suiddir).

(i.e. $userdir = $suiddir as per Alex Dupre's original patch).




----------------------
The behaviour that I see on my box is:

Using v 3.3.1 from the current FreeBSD ports collection, I am editing spamd.raw
to remove the extraneous space character (Marks last patch entry)

spamd is running as:

/usr/local/bin/spamd -c -v -u vpopmail

and is being called by by simscan (1.4)

In the spamassasin logs I see the message "info: handle_user unable to find
user: 'simscan'"

but spamd *is* continuing on to process the email with $userdir undefined.

my grotty hack fix 


 if ($? == 0) {
        chomp($userdir);
      } else {
        $userdir = handle_user_vpopmail($username_untainted,$vpopdir);
      }
+      if (!defined $userdir) { $userdir = $suiddir; }
    } else {
      $userdir = (getpwnam($prefsfrom))[7];
    }


which effectively simplifies the operation to the same as the original patch
offered here by Alex.... though we're now using 10x the amount of code to
achieve the same result....

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.