You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Toomas Aas <to...@raad.tartu.ee> on 2004/02/05 12:08:32 UTC

can't use subscript on split

Hello!

I'm using SpamAssassin through amavisd-new, installed from these FreeBSD 
ports:

amavisd-new-20030616.p7 
p5-Mail-SpamAssassin-2.62

Today, I made some changes to my local.cf and then ran 
/usr/local/etc/rc.d/amavisd.sh stop, followed by 
/usr/local/etc/rc.d/amavisd.sh start.

To my surprise, amavisd failed to start with the following error 
message:

Problem in the antispam code: Can't use subscript on split at
/usr/local/lib/perl5/site_perl/5.005/Mail/SpamAssassin.pm line 100, near "1]" 
BEGIN failed--compilation aborted at (eval 50) line 11.

I reversed my changes to local.cf and tried again, but got the same 
error message. I also tried removing local.cf entirely, but the error 
message still remained.

Relevant passage of SpamAssassin.pm is this:

-------------------------------< cut >-------------------------------
# If you hacked up your SA, add a token to identify it here. Eg.: I use
# "mss<number>", <number> increasing with every hack.
@EXTRA_VERSION = qw();
if (defined $IS_DEVEL_BUILD && $IS_DEVEL_BUILD) {
  push(@EXTRA_VERSION, ( 'r' . qw{$LastChangedRevision: 6141 $ updated by SVN}[1] ));
}
-------------------------------< cut >-------------------------------

Line 100 is the one starting with push. When I comment out this line, 
amavisd+SA load fine and seem to work OK, even after I put back my local.cf 
file including today's modifications.

However, I'd like to find out what caused the problem. I haven't upgraded
SA nor amavisd-new nor anything else I can think of on this server for a
month or so, and I haven't had this problem before. Come to think of it, the only
time I've run 'amavisd.sh start' with this version of amavisd+SA was immediately 
after the last upgrade of amavisd+SA, since then it has been running continuously. 
But it must have worked then.

Maybe there is something in the Perl code above that is immediately obvious to 
anyone knowing Perl, but IANAP.

Thanks in advance for any ideas,
--
Toomas Aas | toomas.aas@raad.tartu.ee | http://www.raad.tartu.ee/~toomas/
* Character density:  The number of very weird people in the office.


Re: can't use subscript on split

Posted by Dieter Franzke <li...@eyenovation.de>.
whoooops,


sorry, wrong thread in wrong ML.

copy & paste will not always work.....

sorry
dieter


Re: can't use subscript on split

Posted by Dieter Franzke <li...@eyenovation.de>.
Hi,

 Toomas Aas am Donnerstag, 5. Februar 2004 12:08:
> Hello!
>
> I'm using SpamAssassin through amavisd-new, installed from these
> FreeBSD ports:
>
> amavisd-new-20030616.p7
> p5-Mail-SpamAssassin-2.62
>
> Today, I made some changes to my local.cf and then ran
> /usr/local/etc/rc.d/amavisd.sh stop, followed by
> /usr/local/etc/rc.d/amavisd.sh start.
>
> To my surprise, amavisd failed to start with the following error
> message:
>
> Problem in the antispam code: Can't use subscript on split at
> /usr/local/lib/perl5/site_perl/5.005/Mail/SpamAssassin.pm line 100,
> near "1]" BEGIN failed--compilation aborted at (eval 50) line 11.
>
> I reversed my changes to local.cf and tried again, but got the same
> error message. I also tried removing local.cf entirely, but the
> error message still remained.


I've got the same problem.

take a look here:
http://www.ijs.si/software/amavisd/#faq-trouble

especially this chapter:

Tips and FAQ -- Net::Server

 
If during startup the Net::Server complains that it can not change UID 
to the required $daemon_user and $daemon_group: Net::Server: ... 
Couldn't become uid ..., it probably means that Perl can not change 
real uid of the process (variable $<) the way the author of 
Net::Server (in version 0.85) had in mind. This is commonly reported 
on FreeBSD platforms, but applies to other platforms as well, 
including Linux. It is advised to apply net-server.patch to 
Net::Server 0.85. 

The patch is already included in Net::Server version 0.86, thanks to 
Net::Server CPAN maintainer Rob Brown. 


There is another small security fix net-server.patch2, which applies 
to both 0.85 and 0.86, but is only needed on BSD platforms (at least 
on FreeBSD). It does not hurt to apply it for other platforms. It 
fixes the problem where real UID can not be changed if effective UID 
has already been changed, resulting in the warning: NOTICE: Effective 
UID changed, but Real UID is 0: ... 


Alternatively, one can start amavisd the traditional way (only 
applicable if not running chroot-ed): 

    # su - vscan -c /usr/local/sbin/amavisd

 or if some comand line options need to be specified, e.g.: 
    # su - vscan -c '/usr/local/sbin/amavisd -c /etc/amavisd-test.conf 
debug'

 
After changing $inet_socket_bind in amavisd.conf, the amavisd process 
must be stopped and restarted. The HUP method causes amavisd to 
stumble over its feet. 


ciao

dieter


Re: can't use subscript on split

Posted by Toomas Aas <to...@raad.tartu.ee>.
> From:          Theo Van Dinter <fe...@kluge.net>

> > Maybe there is something in the Perl code above that is immediately obvious to 
> > anyone knowing Perl, but IANAP.
> 
> Yeah, it's the issue that caused 2.63 to be released.  

Thanks for pointing it out. I upgraded to 2.63 and can now start and 
stop amavisd to my heart's content (not that I *want* to stop it <g>).
--
Toomas Aas | toomas.aas@raad.tartu.ee | http://www.raad.tartu.ee/~toomas/
* If you try to fail, and succeed, which have you done?


Re: can't use subscript on split

Posted by Theo Van Dinter <fe...@kluge.net>.
On Thu, Feb 05, 2004 at 01:08:32PM +0200, Toomas Aas wrote:
> Maybe there is something in the Perl code above that is immediately obvious to 
> anyone knowing Perl, but IANAP.

Yeah, it's the issue that caused 2.63 to be released.  perl 5.005 doesn't
like that subscript trick.  we fixed the issue and released 2.63 to
solve the problem for perl 5.005 people. :)

-- 
Randomly Generated Tagline:
Sigh.  I like to think it's just the Linux people who want to be on
 the "leading edge" so bad they walk right off the precipice.
 (Craig E. Groeschel)