spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Freegard <st...@stevefreegard.com>
Subject Re: New plugin: DecodeShortURLs
Date Wed, 22 Sep 2010 13:16:06 GMT
On 22/09/10 13:44, Michael Scheidell wrote:
> one more: if # url_shortener_cache /tmp/DecodeShortURLs.sq3
> you should not try to load SQLLite.pm.
>
> ent host [79.98.90.156] blocked using zen.spamhaus.org;
> http://www.spamhaus.org/query/bl?ip=79.98.90.156;
> from=<madeirauhf2@rossatogroup.com> to=<herrera@mcclancy.com>
> proto=ESMTP helo=<MEDMAVVR>
> Sep 22 08:38:40 sns amavis[77402]: (!)_DIE: Can't locate DBD/SQLite.pm
> in @INC (@INC contains: lib /usr/local/lib/perl5/5.8.9/BSDPAN
> /usr/local/lib/perl5/site_perl/5.8.9/mach
> /usr/local/lib/perl5/site_perl/5.8.9 /usr/local/lib/perl5/5.8.9/mach
> /usr/local/lib/perl5/5.8.9) at
> /usr/local/etc/mail/spamassassin/DecodeShortURLs.pm line 84.

There are lots of plug-ins that use exactly the same code to test if 
modules are installed or not as that's why I did it that way.


> diff -bBru DecodeShortURLs.pm /tmp
> --- DecodeShortURLs.pm 2010-09-22 08:41:55.000000000 -0400
> +++ /tmp/DecodeShortURLs.pm 2010-09-20 11:13:21.000000000 -0400
> @@ -81,7 +81,7 @@
>
> use constant HAS_LWP_USERAGENT => eval { require LWP::UserAgent; };
> use constant HAS_FCNTL => eval { require Fcntl; };
> -use constant HAS_SQLITE => eval { require DBD::SQLite; } if
> url_shortener_cache;
> +use constant HAS_SQLITE => eval { require DBD::SQLite; };

That's of no use at all (you got the diff arguments backwards BTW) as 
you can't know if the option is enabled in the .cf file yet as it hasn't 
been read yet...

That's why it's testing the return of the require in the eval{} block to 
set the constant for later testing.

I suggest you check your amavis debug/log settings as it looks like 
amavis is setting something like $SIG{__DIE__} and reporting it to your 
logs in the signal handler.  That's fine for debugging - but you're 
going to get other noise from things like eval{} blocks such as this and 
is not a bug.

Regards,
Steve.


Mime
View raw message