You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Dan Mahoney, System Admin" <da...@prime.gushi.org> on 2006/12/14 18:26:54 UTC
Re: [sa-list] Re: [sa-list] Re: Way to skip scanning per-user?
On Thu, 14 Dec 2006, Theo Van Dinter wrote:
> On Thu, Dec 14, 2006 at 12:11:11PM -0500, Dan Mahoney, System Admin wrote:
>> At the moment, that's a hack in the system-wide procmailrc that I don't
>> know how to do, since the only thing procmail knows about userspace is
>> "dropprivs="yes"", and there's no translation for an easy way to equate
>> that to email address (i.e. it allows me to do it per *domain* not per
>> user, i.e. *@mydomain.com, but if a user has two domains, then I'd have to
>> do them each separately).
>
> If you're using procmail, you could look at the X-Original-To (or similar)
> header to figure out who the mail is going to. Otherwise, you could modify
> your setup to pass information in to procmail from the MTA.
>
>> Presuming we're looking for the value of the "user" based on the email
>> address, yes, I understand, but can't you check the value of -u before you
>> even do that? (i.e. at the earliest point)
>
> Ah, there you're talking about spamc/spamd which is a different beasty all
> together. If you want to skip checks based on how you're calling spamc, then
> check the value you're going to use for the username and don't call spamc if
> you don't want the mail scanned.
I'm running procmail with dropprivs=yes. There's no easy procmail thing
for (getpwnam($<)) and I do NOT feel like firing up perl on every message
to evaluate that just to figure out if I should fire up the C program that
I use so I don't have to fire up perl.
I see procmail macros for the email address, and for the _TO thing, but
NOTHING that just gives you the goddamned login.
I don't need -u on spamc, spamc just picks up that username and runs with
it. If I'm running spamc as danm, spamd grabs danm's prefs.
When I said -u, I was asking how spamd would recognize the implied value
of -u, not the actual command line flag.
If that makes sense?
-Dan
--
"It would be bad."
-Egon Spengler, "Ghostbusters"
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144 AIM: LarpGM
Site: http://www.gushi.org
---------------------------
Re: [sa-list] Re: [sa-list] Re: Way to skip scanning per-user?
Posted by Theo Van Dinter <fe...@apache.org>.
On Thu, Dec 14, 2006 at 12:26:54PM -0500, Dan Mahoney, System Admin wrote:
> I'm running procmail with dropprivs=yes. There's no easy procmail thing
> for (getpwnam($<)) and I do NOT feel like firing up perl on every message
> to evaluate that just to figure out if I should fire up the C program that
> I use so I don't have to fire up perl.
There are environment variables with this kind of info. Look at LOGNAME, for
instance. Worst case, you could run "id -un" and get the information that
way.
--
Randomly Selected Tagline:
"To the engineer, the world is a toy box full of sub-optimized and
feature-poor toys." - Scott Adams