On 7/8/06, Geoff Soper <[EMAIL PROTECTED]> wrote:
Bart Schaefer wrote:
I think I need to specify the .procmailrc as the .procmailrc file is per
e-mail address, not per user or even system-wide

I think we've just uncovered a crucial bit of missing information.

You're apparently running procmail in some kind of virtual-user
environment, where there is no user login name corresponding to the
email address being processed.  You need to explain these sorts of
things up front.  All the answers so far have assumed you have a
traditional unix/linux type environment where mail is delivered to
individual user accounts that have /etc/passwd file entries, separate
home directories, etc.

So, forget everything that's been said, and let's start over.

> Where is this "./.procmailrc" file that you are trying to read with
> the -m option?  That is, what do you expect the current directory
> (./) to be at the time procmail runs?

the .procmailrc file is in /var/qmail/mailnames/domain.tld/test
alongside the .qmail file and the Maildir directory

In that case you need to tell spamassassin to look for its
configuration files in that location.

There may be a way to finagle the options to "spamassassin" itself to
make this work, but the easiest approach is to run spamd:

 spamd --create-prefs --virtual-config-dir=/var/qmail/mailnames/%d/%u

(see "man spamd" for other options you might want to pass, such as
"-m" to limit the number
of simultaneous processes, etc.).  This is a daemon that needs to run
as a system service; you may already have an
/etc/rc.d/init.d/spamassassin or similar script for managing this
service.  It depends on your OS and whether you built SA yourself or
installed it with some kind of package management tool (other than
CPAN).

Then in each appropriate .procmailrc file,

:0fw
* < 256000
| /usr/bin/spamc -u [EMAIL PROTECTED]

where you'll need to get the equivalent of "[EMAIL PROTECTED]" for each
virtual address from somewhere; I don't know enough about qmail to
tell you how, but if it's not in an environment variable, perhaps you
can add it to the procmail command line after the ./.procmailrc and
then refer to it here as $1.

Just to confirm, the .procmailrc file isn't common to all users but the
SA setup is.

I'm no longer sure I understand what you consider to be "the SA setup."

Reply via email to