DAve wrote:
Henry F. Camacho Jr wrote:

Ok,

Just do what Matt said and pass the username to spamc with the -u option. It'll do exactly what you want.


I don't understand what Daryl and Matt are saying by the above?


Yes, I believe I have the same basic setup as you. I run spamd on a central server and I call spamc from maildrop. I am using vpopmail, maildrop, and MySQL. My run file for spamd looks like so,

#!/bin/sh
# Run SPAMD
#
PATH=/usr/bin:/usr/local/bin
exec /usr/local/bin/softlimit -a 128000000 \
        /usr/local/bin/spamd -i 10.0.240.253 -p 1783 -A 10.0.240.0/24 \
        -m 25 --max-conn-per-child=500 -u vpopmail -x -q -s stderr 2>&1


I call spamc from maildrop like this,

/usr/local/bin/spamc -x -t 30 -d 10.0.240.253 -p 1783 -u [EMAIL PROTECTED]

So I am running spamd as the vpopmail user, which is the MySQL user that is allowed to login to the Spamassassin DB on localhost. spamc is fed the full email address of the message recipient, which is passed to spamd. spamd uses the passed email address to look up the users prefs.

It's late and I'm tired ;^) spamd is running the -u switch to run as the vpopmail user because I don't want spamd to try and setuid to the spamc user. The -q switch tells spamd to use the SQL config in local.cf. The -x switch keeps spamd from trying to read the users home dir (which doesn't exist in a vpopmail install).

DAve



Works quite well.

Remember this is a system wide installation and not just running for my account. I don't know where I would set spamc -u, because procmail isn't being called. This is a sendmail installation running in a scalix environment, and there for no unix accounts, etc.

What I have found however, is I can have spamass-milter set with -u -e which tells spamass-milter to pass the full to:email address to spamd for each email to process which is exactly what I wanted it to do. For each email that hits sendmail, it is miltered to SA with a [EMAIL PROTECTED]


If you can call spamc and pass it an email address, which according to the docs for spamass-milter, "-e option to pass full recipient email address to spamc" you can do exactly that, it should work just fine.

DAve



Now I have a problem wtih the SQL.pm object in SA performing the correct query, but that is another answer.

Hope this helps someone someday..

HFC


Daryl C. W. O'Shea wrote:

Henry F. Camacho Jr wrote:

Matt:

True.. And that username CAN be specified by spamc -u. Spamc passes it to spamd,
spamd uses it when calling SQL.
Quoting from the SPAMc man page:

       -u username
This argument has been semi-obsoleted. To have spamd use per-user-config files, run spamc as the user whose config files spamd should load. If youâre running spamc as some other user, though, (eg. root, mail, nobody, cyrus, etc.) then you can still use this flag.




In this situation this would work assuming that local delivery is happening through procmail or some other method whereby spamc is called with the username. The -u option for spamd does something very interesting. It takes the user portion of the address and stripes off the domain, so you get something like this:

"[EMAIL PROTECTED]" is passed to spamd as "hfc"



It will find just hfc, but I really need it to find the whole to: address so that I can use this site wide.

Thanks for your help with

HFC




Just do what Matt said and pass the username to spamc with the -u option. It'll do exactly what you want.

You do NOT want to be calling spamd for every message. Start it once, it's the daemon. Pass messages to spamc (using the -u option), it's the client.


Daryl







Reply via email to