On Tue, 4 Jun 2002, M. Brownsworth wrote:

> Ah, sorry.  My procmail is doing system-wide filtering and invokes 
> spamc.
> 
> $DEFAULT is the default used by the vanilla procmail from FreeBSD 
> 4.5's port.  The default mail spool directory is /var/mail.  The Perl 
> script to redeliver runs as root.

OK, then ... you need to prevent procmail from reading the system-wide
procmailrc, so you're going to need to specify a different recipe file
on the command line.  Also:

> Accordingly, I would need to supply the user, right?

Yes, but ...

> So:
> 
> formail -s procmail $username < /var/log/spam/$file

"procmail foo" means that "foo" is a file containing filter recipes, not 
that "foo" is a user.  (Read "man procmailrc"?)  "procmail -d $username"
means what you intend.

Unfortunately you can't both specify a recipient on the command line and
also specify a recipe file on the command line.  So your best bet is to
have the perl script change user ID to the intended recipient, e.g. like
this:

        $< = $> = $userid;

and then invoke

    formail -s procmail /dev/null < /var/log/spam/$file

where /dev/null is used as the recipe file and therefore no filtering is
done.  If you need to run the user's own procmail recipes, you need
something like

    formail -s procmail /home/$username/.procmailrc < /var/log/spam/$file

(replacing /home/$username with the appropriate path).


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to