[wplug] spamc through exim vs. manually

Eric Cooper ecc at cmu.edu
Mon Apr 28 17:57:20 EDT 2008


On Mon, Apr 28, 2008 at 02:02:21AM -0400, Eric wrote:

> When spamc invoked from within exim, some messages are marked as not
> spam, but when I run the command manually on the message, it is
> marked as spam.
[...]
> the lines in exim that invoke spamc is:
> 
> driver = pipe
> transport_filter = /usr/bin/spamc
> 
> And I run it manually like:   cat ./emailmessage | /usr/bin/spamc
> 
> Anyone have any ideas on what the problem could be?

When spamc is run from exim, it sends exim's userid to spamd (on my
Debian system, that's "Debian-exim"; I don't know about Gentoo). So it
uses that user's spamassassin configuration.  When you run it
manually, it's using yours, which almost certainly has a different
whitelist (hence the difference in the AWL test).

You can use "spamc -u userid" to have it use a different user id --
either hardwire yours, or figure out if exim can look up the user to
whom the mail is being delivered and pass it dynamically.

-- 
Eric Cooper             e c c @ c m u . e d u


More information about the wplug mailing list