You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by bubba <bu...@cwazy.co.uk> on 2005/01/07 11:27:38 UTC

SA 3 - I'm Totally Stuck!

Hi,
 
I'm trying to install Spamassassin 3 on a Linux box w/Ensim control panel
installed, but I'm experiencing a variety of errors. I've modified each
users' .procmailrc file, but the logs are showing that spamc cannot be found
(regardless of how I address it, and I know it's there - I can run it from
the command line). Copying spamc to each users' home directory allows it to
be run, but it then has difficulty chmodding to the correct user, and the
logs report that the user cannot be found. If I try copying the spamassassin
file to the users' directory, this also runs, but gives a perl error.
 
My procmail log file shows messages like the following:

//***************
>From emailSenderApp+2V55R9BRG-1D4Z3XJYDM-3B4@bounces.amazon.com  Thu Jan  6
13:28:05 2005
 Subject: New Year, New You--save up to 50% and discover great ways to
change y
  Folder: /var/spool/mail/mil
47993
/usr/bin/spamc: /usr/bin/spamc: cannot execute binary file
procmail: Error while writing to "/usr/bin/spamc"
procmail: Rescue of unfiltered data succeeded
//***************

My .procmailrc file is as follows:

//***************
DROPPRIVS=yes
LOGFILE=$HOME/procmail.log

:0fw: spamassassin.lock
| /usr/bin/spamc -u mil@mydomainname.com

#:0fw
#| $HOME/.spamassassin/spamc -u mil@mydomainname.com
#| spamd -u mil@mydomainname.com
:0:
* ^X-Spam-Status: Yes
/dev/null
# enf of file 
//***************
 

Just to confirm.... I can run Spamassassin from the command line passing it
a text file, and it works fine.
 
Previously, I had version 2.6 working quite happily, so this is confusing
the hell out of me! Any help most gratefully received!
 
Cheers,
 
mil.


RE: SA 3 - I'm Totally Stuck!

Posted by bubba <bu...@cwazy.co.uk>.
> Meaning you're trying to install it through the control panel rather than
using a real 
> login shell? Or only meaning that you're using Ensim to set up the
.procmailrc files?

I'm doing everything via the shell.

> And did you install 2.6x yourself?

Yep. The last email I sent has a bit more detail... I'm now running spamc
OK, but it's unable to run as the correct user....


Re: SA 3 - I'm Totally Stuck!

Posted by Bart Schaefer <ba...@gmail.com>.
On Fri, 7 Jan 2005 10:27:38 -0000, bubba <bu...@cwazy.co.uk> wrote:
> 
> I'm trying to install Spamassassin 3 on a Linux box w/Ensim control panel
> installed

Meaning you're trying to install it through the control panel rather
than using a real login shell?  Or only meaning that you're using
Ensim to set up the .procmailrc files?

> but I'm experiencing a variety of errors. I've modified each
> users' .procmailrc file, but the logs are showing that spamc cannot be found

No, they're showing that spamc cannot be *executed*, which is an
entirely different thing.

This implies to me that procmail is executing on a different machine,
with a different binary architecture, from that where spamc was
compiled.

> (regardless of how I address it, and I know it's there - I can run it from
> the command line).

And you're sure there's only one machine involved, and no NFS mounts
or the like?

> Copying spamc to each users' home directory allows it to be run

That pretty strongly implies that the mail delivery machine is not the
same one where the users have their home directories.

> Previously, I had version 2.6 working quite happily, so this is confusing
> the hell out of me! Any help most gratefully received!

And did you install 2.6x yourself?

Re: SA 3 - I'm Totally Stuck!

Posted by "Robin Lynn Frank (SA)" <rl...@paradigm-omega.com>.
jdow wrote:
> From: "Rainer Sokoll" <R....@intershop.de>
>
>>On Fri, Jan 07, 2005 at 11:59:50AM -0000, bubba wrote:
>>
>>>>Are you sure that the user calling procmail is the same user you are
>
> if
>
>>>you
>>>
>>>>run spamc from the command line?
>>>
>>>When I run spamc from the command line, I've done so as root. I take it
>
> I
>
>>>need to change the permission of spamc?
>>
>>If the user wants to run spamc, obviously spamc must be excecutable for
>>the user.
>>Here, spamc has 555 (-r-xr-xr-x), owned by root.
>>I am pretty sure that these are the default permissions set by "make
>>install".
>>So, if your permissions differ, there must be a reason why.
>>Anyway: to test whatever software, it is wise to switch to the user
>>who will run this software.
>
>
> I'm idly speculating here that he is running with something like postfix
> in its chroot jail. If so how would the /usr/bin/spamc be found?
> Wouldn't he have to put a copy in the chroot jail's directory?
>
> {^_^}
>
>
>
If postfix hands the mail to procmail but procmail can't hand to spamc,
it has nothing to do with postfix...chroot or not.

--
Robin Lynn Frank - Director of Operations - Paradigm-Omega, LLC
Website:   http://www.paradigm-omega.com/
RSS:       http://paradigm-omega.blogspot.com/atom.xml
Spamtraps: http://paradigm-omega.net/cgi-bin/custmail.cgi
=====================================================================
Signature terminated by sigfault.

Re: SA 3 - I'm Totally Stuck!

Posted by jdow <jd...@earthlink.net>.
From: "Rainer Sokoll" <R....@intershop.de>

> On Fri, Jan 07, 2005 at 11:59:50AM -0000, bubba wrote:
> > > Are you sure that the user calling procmail is the same user you are
if
> > you
> > > run spamc from the command line?
> >
> > When I run spamc from the command line, I've done so as root. I take it
I
> > need to change the permission of spamc?
>
> If the user wants to run spamc, obviously spamc must be excecutable for
> the user.
> Here, spamc has 555 (-r-xr-xr-x), owned by root.
> I am pretty sure that these are the default permissions set by "make
> install".
> So, if your permissions differ, there must be a reason why.
> Anyway: to test whatever software, it is wise to switch to the user
> who will run this software.

I'm idly speculating here that he is running with something like postfix
in its chroot jail. If so how would the /usr/bin/spamc be found?
Wouldn't he have to put a copy in the chroot jail's directory?

{^_^}



Re: SA 3 - I'm Totally Stuck!

Posted by Rainer Sokoll <R....@intershop.de>.
On Fri, Jan 07, 2005 at 04:15:41PM -0000, bubba wrote:

> Procmail is now running spamc,

What caused the problem?

> If I specify the user with the -u flag, I get the error:
> Jan  7 15:59:29 srv01 spamd[1313]: handle_user: unable to find user 'mil'!

Does "getent passwd" find the user mil? Is spamd running in a chroot
environment?

> Jan  7 15:59:29 srv01 spamd[1313]: Still running as root: user not specified
> with -u, not found, or set to root.  Fall back to nobody.
> Jan  7 15:59:29 srv01 spamd[1313]: fatal: setuid to nobody failed

Hum, did you modify /etc/pam.d/su?

Rainer

Re: SA 3 - I'm Totally Stuck!

Posted by Keith Whyte <ke...@media-solutions.ie>.
bubba wrote:

>Hi,
>
>I've made some progress, but it's still not working :(
>  
>
It would be more helpful in a case like this, if you were to post the 
details of what you discovered.
What did you change to make the progress?

what are the permissions on / ?
on /usr ?
on /usr/bin ?

>
>Any other suggestions? I'm at my wits end with this, and I'm suffering from
>a deluge of spam!
>
>  
>
if you're suffering a deluge of spam, are you sure you want to process 
it all via procmail.
if your system didn't sound so totally broken, I would suggest you give 
up this fight, forget about spamc/spamd and run spamassassin at the MTA 
to reject spam there.

>mil
>
>  
>


RE: SA 3 - I'm Totally Stuck!

Posted by bubba <bu...@cwazy.co.uk>.
Hi,

I've made some progress, but it's still not working :(

Procmail is now running spamc, but the maillog shows the error:

Jan  7 15:51:36 srv01 spamd[1314]: connection from localhost.localdomain
[127.0.0.1] at port 34674
Jan  7 15:51:36 srv01 spamd[1314]: info: setuid to root succeeded
Jan  7 15:51:36 srv01 spamd[1314]: Still running as root: user not specified
with -u, not found, or set to root.  Fall back to nobody.
Jan  7 15:51:36 srv01 spamd[1314]: fatal: setuid to nobody failed
Jan  7 15:51:36 srv01 spamd[1314]: error: Died at /etc/rc3.d/S79spamd line
1054, <GEN55> line 4._ , continuing

If I specify the user with the -u flag, I get the error:

Jan  7 15:59:29 srv01 spamd[1313]: connection from localhost.localdomain
[127.0.0.1] at port 34680
Jan  7 15:59:29 srv01 spamd[1313]: handle_user: unable to find user 'mil'!
Jan  7 15:59:29 srv01 spamd[1313]: Still running as root: user not specified
with -u, not found, or set to root.  Fall back to nobody.
Jan  7 15:59:29 srv01 spamd[1313]: fatal: setuid to nobody failed
Jan  7 15:59:29 srv01 spamd[1313]: error: Died at /etc/rc3.d/S79spamd line
1054, <GEN51> line 4._ , continuing

It's complaining that it can't find the user, but the username is definitely
correct.

Am I missing a parameter? Is there anything else I may have overlooked?

TIA,

mil
 

-----Original Message-----
From: bubba [mailto:bubba@cwazy.co.uk] 
Sent: 07 January 2005 13:45
To: users@spamassassin.apache.org
Subject: RE: SA 3 - I'm Totally Stuck!


> Here, spamc has 555 (-r-xr-xr-x), owned by root.
> I am pretty sure that these are the default permissions set by "make
install".

My permissions are exactly the same (with group "mail").

> Anyway: to test whatever software, it is wise to switch to the user 
> who
will 
> run this software.

I thought that was why the -u flag was used with spamassassin? But, having
seen your .procmailrc file, it appears that this is unneccessary.

Any other suggestions? I'm at my wits end with this, and I'm suffering from
a deluge of spam!

mil



RE: SA 3 - I'm Totally Stuck!

Posted by bubba <bu...@cwazy.co.uk>.
> Here, spamc has 555 (-r-xr-xr-x), owned by root.
> I am pretty sure that these are the default permissions set by "make
install".

My permissions are exactly the same (with group "mail").

> Anyway: to test whatever software, it is wise to switch to the user who
will 
> run this software.

I thought that was why the -u flag was used with spamassassin? But, having
seen your .procmailrc file, it appears that this is unneccessary.

Any other suggestions? I'm at my wits end with this, and I'm suffering from
a deluge of spam!

mil



Re: SA 3 - I'm Totally Stuck!

Posted by Rainer Sokoll <R....@intershop.de>.
On Fri, Jan 07, 2005 at 11:59:50AM -0000, bubba wrote:
> > Are you sure that the user calling procmail is the same user you are if
> you 
> > run spamc from the command line?
> 
> When I run spamc from the command line, I've done so as root. I take it I
> need to change the permission of spamc?

If the user wants to run spamc, obviously spamc must be excecutable for
the user.
Here, spamc has 555 (-r-xr-xr-x), owned by root.
I am pretty sure that these are the default permissions set by "make
install".
So, if your permissions differ, there must be a reason why.
Anyway: to test whatever software, it is wise to switch to the user
who will run this software.

Rainer

RE: SA 3 - I'm Totally Stuck!

Posted by bubba <bu...@cwazy.co.uk>.
> Are you sure that the user calling procmail is the same user you are if
you 
> run spamc from the command line?

When I run spamc from the command line, I've done so as root. I take it I
need to change the permission of spamc?

Oh, and happy birthday!

mil


Re: SA 3 - I'm Totally Stuck!

Posted by Rainer Sokoll <R....@intershop.de>.
On Fri, Jan 07, 2005 at 11:04:27AM -0000, bubba wrote:

> /usr/bin/spamc: /usr/bin/spamc: cannot execute binary file
[...]
> Is this a problem with permissions? If I SSH into the box I can run
> /usr/bin/spamc from the command line and it works just fine.

Are you sure that the user calling procmail is the same user you are if
you run spamc from the command line?
Also (assumed you are running linux), you my have a look at
file /usr/bin/spamc
ldd /usr/bin/spamc
and as a last resort:
strace /usr/bin/spamc

Rainer

RE: SA 3 - I'm Totally Stuck!

Posted by bubba <bu...@cwazy.co.uk>.
> notice my .procmailrc has a lot more enviroment settings, don't know 
> enough about procmail to know if they are all needed but here's my 
> .procmailrc as an expample that works fine for various users:-

[snip]

I tried that, but not luck unfortunately :(


RE: SA 3 - I'm Totally Stuck!

Posted by martin smith <ma...@ntlworld.com>.
|-----Original Message-----
|From: bubba [mailto:bubba@cwazy.co.uk] 
|Sent: 07 January 2005 11:04
|To: users@spamassassin.apache.org
|Subject: RE: SA 3 - I'm Totally Stuck!
|
|> Drop the -u mil@mydomainname.com, its not needed since its being run 
|> as the user and is semi-> obsolete anyway. Plus you don't 
|put @domain 
|> for a username.
|> 
|> Martin
|
|The "@" symbol does actually exist in the username - the "-u 
|user@user.com"
|parameter worked OK in SA 2.6.
|
|I've tried removing "-u mil@mydomainname.com" as suggested, 
|which has changed the error in my procmail log to:
|
|/usr/bin/spamc: /usr/bin/spamc: cannot execute binary file
|procmail: Program failure (126) of "/usr/bin/spamc"
|procmail: Rescue of unfiltered data succeeded
|>From random@random.com  Fri Jan  7 10:47:44 2005
| Subject: spam test
|  Folder: /var/spool/mail/mil   
|
|Is this a problem with permissions? If I SSH into the box I 
|can run /usr/bin/spamc from the command line and it works just fine.
|
|mil.
|
I notice my .procmailrc has a lot more enviroment settings, don't know
enough about procmail to know if they are all needed but here's my
.procmailrc as an expample that works fine for various users:-

SHELL=/bin/sh
PATH=/bin:/usr/bin
PMDIR=$HOME/.procmail
LOGABSTRACT=all
LOGFILE=$PMDIR/proclog   #recommended
VERBOSE=off


#Spamassassin start
:0fw: spamc.lock
* < 256000
| /usr/bin/spamc
#| spamassassin

:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
/dev/null

:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
/home/ntl/mail/spam10

:0:
* ^X-Spam-Status: Yes  
/home/ntl/mail/spam5

# Work around procmail bug: any output on stderr will cause the "F" in
"From"
# to be dropped.  This will re-add it.
:0 
* ^^rom[ ]
{
  LOG="*** Dropped F off From_ header! Fixing up. "
   
  :0 fhw
  | sed -e '1s/^/F/'   
}
#Spamassassin end

I can't see it being permisions since you say they work ok from a comand
line, so would think it's a procmail problem.

Martin


RE: SA 3 - I'm Totally Stuck!

Posted by bubba <bu...@cwazy.co.uk>.
> Drop the -u mil@mydomainname.com, its not needed since its 
> being run as the user and is semi-> obsolete anyway. Plus 
> you don't put @domain for a username.
> 
> Martin

The "@" symbol does actually exist in the username - the "-u user@user.com"
parameter worked OK in SA 2.6.

I've tried removing "-u mil@mydomainname.com" as suggested, which has
changed the error in my procmail log to:

/usr/bin/spamc: /usr/bin/spamc: cannot execute binary file
procmail: Program failure (126) of "/usr/bin/spamc"
procmail: Rescue of unfiltered data succeeded
>From random@random.com  Fri Jan  7 10:47:44 2005
 Subject: spam test
  Folder: /var/spool/mail/mil   

Is this a problem with permissions? If I SSH into the box I can run
/usr/bin/spamc from the command line and it works just fine.

mil.


RE: SA 3 - I'm Totally Stuck!

Posted by martin smith <ma...@ntlworld.com>.
|-----Original Message-----
|From: bubba [mailto:bubba@cwazy.co.uk] 
|Sent: 07 January 2005 10:28
|To: users@spamassassin.apache.org
|Subject: SA 3 - I'm Totally Stuck!
|
|Hi,
| 
|I'm trying to install Spamassassin 3 on a Linux box w/Ensim 
|control panel installed, but I'm experiencing a variety of 
|errors. I've modified each users' .procmailrc file, but the 
|logs are showing that spamc cannot be found (regardless of how 
|I address it, and I know it's there - I can run it from the 
|command line). Copying spamc to each users' home directory 
|allows it to be run, but it then has difficulty chmodding to 
|the correct user, and the logs report that the user cannot be 
|found. If I try copying the spamassassin file to the users' 
|directory, this also runs, but gives a perl error.
| 
|My procmail log file shows messages like the following:
|
|//***************
|>From emailSenderApp+2V55R9BRG-1D4Z3XJYDM-3B4@bounces.amazon.com  Thu 
|>Jan  6
|13:28:05 2005
| Subject: New Year, New You--save up to 50% and discover great 
|ways to change y
|  Folder: /var/spool/mail/mil
|47993
|/usr/bin/spamc: /usr/bin/spamc: cannot execute binary file
|procmail: Error while writing to "/usr/bin/spamc"
|procmail: Rescue of unfiltered data succeeded
|//***************
|
|My .procmailrc file is as follows:
|
|//***************
|DROPPRIVS=yes
|LOGFILE=$HOME/procmail.log
|
|:0fw: spamassassin.lock
|| /usr/bin/spamc -u mil@mydomainname.com

Drop the -u mil@mydomainname.com, its not needed since its being run as the
user and is semi-obsolete anyway. Plus you don't put @domain for a username.

Martin