spamass-milt-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: -u option on CVS


From: Daniel A. Deitch
Subject: RE: -u option on CVS
Date: Mon, 7 Feb 2005 19:08:20 -0500

Update -

I went ahead and updated to 0.3.0 CVS just to see what would happen ...
didn't fix the problem.

I was looking through the logs again and saw the following which tells
me that everything is working the way it's supposed to (I think). But I
guess what I want to happen isn't in that range.

So, with multiple recipients, it falls to sharedspam. Now the question
is, can I make it fall to sharedspam when there's only 1 recipient
that's all virtual?

spamass-milter[81598]: calling /usr/sbin/sendmail -bv
"<address@hidden>" 2>&1
spamass-milter[81598]: sendmail output: <address@hidden>...
deliverable: mailer esmtp, host charter.net., user address@hidden
spamass-milter[81598]: user: address@hidden
spamass-milter[81598]: Total of 1 actual recipients
spamass-milter[81598]: remembering address@hidden for spamc
spamass-milter[81598]: remembering recipient <address@hidden>
spamass-milter[81598]: calling /usr/sbin/sendmail -bv
"<address@hidden>" 2>&1
spamass-milter[81598]: sendmail output: <address@hidden>...
deliverable: mailer esmtp, host charter.net., user address@hidden
spamass-milter[81598]: user: address@hidden
spamass-milter[81598]: Total of 2 actual recipients
spamass-milter[81598]: remembering recipient <address@hidden>
sm-mta[2133]: j17NuC6m002133: from=<address@hidden>, size=2159,
class=0, nrcpts=2, msgid=<address@hidden>,
proto=SMTP, daemon=MTA-v4, relay=S01060050da8348dc.th.shawcable.net
[24.79.113.210]
spamass-milter[2387]: 2 recipients; spamc gets default username
sharedspam
spamd[81558]: connection from localhost [127.0.0.1] at port 3491 
spamd[81558]: info: setuid to sharedspam succeeded 
spamd[81558]: processing message <address@hidden>
for sharedspam:1000.

 

________________________________

Daniel A. Deitch, President * iTrain Technologies, Ltd.
po box 13833 * atlanta, ga   30324-0833 * 404-876-1929 (o)
404-935-5005 (f) * www.goitrain.com 
 

-----Original Message-----
From: Dan Nelson [mailto:address@hidden 
Sent: Sunday, February 06, 2005 3:42 PM
To: Daniel A. Deitch
Cc: address@hidden
Subject: Re: -u option on CVS

In the last episode (Feb 06), Daniel A. Deitch said:
> Correct ... the Info user doesn't exist, but then it doesn't revert
> to the SHAREDSPAM user, it reverts to root ... I'll add the flag and
> repost ...
[...]
> Feb  6 18:45:32 spamass-milter[63385]: calling /usr/sbin/sendmail -bv
"<address@hidden>" 2>&1
> Feb  6 18:45:32 spamass-milter[63385]: sendmail output:
<address@hidden>... deliverable: mailer esmtp, host
divots.dnsalias.org., user address@hidden
> Feb  6 18:45:32 spamass-milter[63385]: user:
address@hidden
> Feb  6 18:45:32 spamass-milter[63385]: Total of 1 actual recipients
> Feb  6 18:45:32 spamass-milter[63385]: remembering
address@hidden for spamc
> Feb  6 18:45:32 spamass-milter[63385]: remembering recipient
<address@hidden>
> Feb  6 18:45:33 spamass-milter[64083]: spamc gets jgarrison
> Feb  6 18:45:33 spamd[63373]: connection from localhost [127.0.0.1] at
port 1471 
> Feb  6 18:45:33 spamd[63373]: handle_user: unable to find user
'jgarrison'! 
> Feb  6 18:45:33 spamd[63373]: Still running as root: user not
specified with -u, not found, or set to root.  Fall back to nobody. 
> Feb  6 18:45:33 spamd[63373]: processing message
<address@hidden> for jgarrison:65534. 
> Feb  6 18:45:35 spamd[63373]: identified spam (20.6/5.0) for
jgarrison:65534 in 1.8 seconds, 21313 bytes. 
> Feb  6 18:45:35 spamd[63373]: result: Y 20 -
FORGED_RCVD_HELO,HTML_50_60,HTML_MESSAGE,HTML_NONELEMENT_30_40,MIME_HTML
_MOSTLY,NO_REAL_NAME,divots_woodenhangers
scantime=1.8,size=21313,mid=<address@hidden>,autolea
rn=failed 

Hre's what's happenning for this email:

Spamass-milter gets the recipient address as <address@hidden>. It
then asks sendmail to expand that, which produces
<address@hidden>.  Spamass-milter strips off the domain
part and passes the username "jgarrison" to SpamAssassin.  SpamAssassin
looks up the username and fails, reverting to the root user.

This is actually how it's supposed to work.  Spamass-milter doesn't
know what user database SpamAssassin is using; all it can do is try and
rewrite aliases/virtualhosts and hope the resulting address is one
SpamAssassin knows about.  If you were using SpamAssassin's SQL
backend, for example, the userlist doesn't have to correspond to local
userids at all.

What might work for you is editing SpamAssassin's spamd script to
setuid itself to "sharedspam" instead of "nobody" around line 1043:

  my ( $uid, $gid ) = ( getpwnam('nobody') )[ 2, 3 ];


-- 
        Dan Nelson
        address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]