Re: Curious output from spamassassin --local --debug

2005-01-12 Thread Cameron Bales
On Wed, 12 Jan 2005 10:23:50 -0500, Kevin Morwood <[EMAIL PROTECTED]> wrote:
> Cameron,
> 
> The spamassassin program is waiting for input.  If you are checking
> rules add '--lint' to your command line.  Alternately you might want to
> direct some input into it.
> 
> I found this out once when I missed typing '--lint' while I was testing
> my installation.
> 
> HTH,
> Kevin
> 

Ah, Thanks Kevin.  I guess I get to submit an errata report for the
O'Reilly SpamAssassin book now (page 13 14).  Once I added --lint to
that command it gave me what I expected and more.

Cameron .:.

-- 
Cameron Bales .:.
www.bales.ca  [EMAIL PROTECTED] [EMAIL PROTECTED]


Curious output from spamassassin --local --debug

2005-01-12 Thread Cameron Bales
Hi I'm curious about what the output from spamassassin --local --debug
looks like on somebody else's system.  I'm getting what seems to me
odd behaviour. The command is hanging on my machine (althouth
SpamAssassin is working fine)

example:

[Machine:~] user% spamassassin --local --debug
debug: SpamAssassin version 3.0.1
debug: Score set 0 chosen.
debug: running in taint mode? yes
debug: Running in taint mode, removing unsafe env vars, and resetting PATH
debug: PATH included '/bin', keeping.
debug: PATH included '/sbin', keeping.
debug: PATH included '/usr/bin', keeping.
debug: PATH included '/usr/sbin', keeping.
debug: Final PATH set to: /bin:/sbin:/usr/bin:/usr/sbin
^C
[Machine:~] user% 

As you can see I don't get a prompt back unless I abort the command. 
An example of more normal output and a hit about what might be wrong
would be great.

Cameron .:.

-- 
Cameron Bales .:.
www.bales.ca  [EMAIL PROTECTED] [EMAIL PROTECTED]


Re: Clam AntiVirus plugin for SpamAssassin 3.x

2005-01-12 Thread Cameron Bales
> > --030204020505030202030005
> > Content-Type: text/plain;
> >  name="clamav.pm"
> > Content-Transfer-Encoding: 7bit
> > Content-Disposition: inline;
> >  filename="clamav.pm"
> >
> > package ClamAV;
> > use strict;
> > use Mail::SpamAssassin;
> > use Mail::SpamAssassin::Plugin;
> > use File::Scan::ClamAV;
> > our @ISA = qw(Mail::SpamAssassin::Plugin);
> >
> > sub new {
> >   my ($class, $mailsa) = @_;
> >   $class = ref($class) || $class;
> >   my $self = $class->SUPER::new($mailsa);
> >   bless ($self, $class);
> >   $self->register_eval_rule ("check_clamav");
> >   return $self;
> > }
> >
> > sub check_clamav {
> >   my ($self, $permsgstatus, $fulltext) = @_;
> >   my $av = new File::Scan::ClamAV(port => 3310);
> >   my ($code, $virus) = $av->streamscan(${$fulltext});
> >   if(!$code) {
> > my $errstr = $av->errstr();
> > Mail::SpamAssassin::Plugin::dbg("ClamAV: Error scanning: $errstr");
> > $permsgstatus->{main}->{conf}->{headers_spam}->{"Virus"} = "Error 
> > ($errstr)";
> > $permsgstatus->{main}->{conf}->{headers_ham}->{"Virus"} = "Error 
> > ($errstr)";
> >   } elsif($code eq 'OK') {
> > Mail::SpamAssassin::Plugin::dbg("ClamAV: No virus detected");
> > $permsgstatus->{main}->{conf}->{headers_spam}->{"Virus"} = "No";
> > $permsgstatus->{main}->{conf}->{headers_ham}->{"Virus"} = "No";
> >   } elsif($code eq 'FOUND') {
> > Mail::SpamAssassin::Plugin::dbg("ClamAV: Detected virus: $virus");
> > $permsgstatus->{main}->{conf}->{headers_spam}->{"Virus"} = "Yes 
> > ($virus)";
> > $permsgstatus->{main}->{conf}->{headers_ham}->{"Virus"} = "Yes 
> > ($virus)";
> > return 1;
> >   }
> >   return 0;
> > }
> >
> > 1;
> >
> > --030204020505030202030005--

Could the plugin on the page:
http://wiki.apache.org/spamassassin/ClamAVPlugin
have some sort of version number/date attached so we could easily know
what version we are talking about on the list, and if additions
mentioned on the list have been incorporated?

Is the plugin mentioned above a direct replacement for clamav.pm from
the wiki?  Daryl - I think this version of the code is yours if it is
a direct replacemtn for the version on the wiki would you like to
replace it there?  Shall I?  I know hardly anything about perl so I
don't know the common ways to notate versions or author history in
files like this.

Cameron .:.

-- 
Cameron Bales .:.
www.bales.ca  [EMAIL PROTECTED] [EMAIL PROTECTED]


Problem with ClamAV plugin.

2004-12-21 Thread Cameron Bales
Hi.

I'm running CGPSA 1.4f4 under Communigate 4.2.7 and SpamAssassin 3.0.1.

I've installed ClamAV 0.8 and the SpamAssassin ClamAV plugin as described here:
http://wiki.apache.org/spamassassin/ClamAVPlugin

I get the following error in my mail headers:
X-Spam-Virus: Error (Cannot connect to 'localhost:3310':
IO::Socket::INET:  connect: Invalid argument)

I know SpamAssassin is working fine, Clamscan works for files.  My
testing server is behind a firewall and has no firewall of its own so
port 3310 is open.

Any suggestions would be appreciated!

Cameron .:.
-- 
Cameron Bales .:.
www.bales.ca  [EMAIL PROTECTED] [EMAIL PROTECTED]