SA 32x build not finding openssl headers on FreeBSD?

2007-12-27 Thread snowcrash+sa
i'm migrating to SA 32x-branch/svn (r607171) on FreeBSD 62.

i've openssl installed from ports in prefix=/usr/local, i.e.,

  ssl libs in /usr/local/lib
  ssl incs in /usr/local/include/openssl

echoing my working procedure from osx, i

 cd spamassassin
 setenv LDFLAGS   "-L/usr/local/lib"
 setenv CPPFLAGS  "-I/usr/local/include"

 perl Makefile.PL PREFIX=/usr/local/spamassassin ENABLE_SSL="yes"

 cd spamc
 perl version.h.pl

 ./configure --enable-ssl CFLAGS="-DSPAMC_SSL"

 cd ../
 make

on freebsd only, this fails to find openssl headers,

 ...
 cp sa-compile blib/script/sa-compile
 /usr/local/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)"
blib/script/sa-compile
 make -f spamc/Makefile spamc/spamc
 gcc -DSPAMC_SSL -DSPAMC_SSL spamc/spamc.c spamc/getopt.c
spamc/libspamc.c spamc/utils.c  -o spamc/spamc -L/usr/local/lib -lssl
-lcrypto -lz
 In file included from spamc/spamc.c:22:
 spamc/utils.h:29:28: openssl/crypto.h: No such file or directory
 spamc/utils.h:30:25: openssl/pem.h: No such file or directory
 spamc/utils.h:31:25: openssl/ssl.h: No such file or directory
 spamc/utils.h:32:25: openssl/err.h: No such file or directory
 ...

what freebsd/spamassassin mysticism am i missing?  some other FLAG?

thanks.


Re: Issue with SpamAssassin (spamc only) over a FreeBSD Jail

2007-12-27 Thread Michael Scheidell
One of the issues might be FreeBsd jail.
(and as earlier poster stated, amavisd-new doesn't call spamd)
We are talking about amavisd-new, NOT amavisd, right?

I am the official ports maintainer of SpamAssassin, and would be interested
in making sure it and amaivsd-new worked in a freebsd jail.

Some of the 'jail' issues include NOT lo0 (localhost) ip address.
(yes, you can ping localhost / 127.0.0.1, BUT, I suspect the ACL's in the
amavisd.conf* files are looking for a Reverse ip == to 127.0.0.1

Things to try (assumes standard postfix/amavisd/spamassassin setup)

Set $log_level = 9; in amavisd.conf, restart amavisd (you do have
amavisd_enable = "yes" in rc.conf, right?

Telnet localhost 25
Telnet localhost 10024
Telnet localhost 100025

See what happens.  You SHOULD get banners.
(I just get:
 (!)DENIED ACCESS from IP 192.168.1.20, policy bank ''

Where 192.168.1.20 is the 'jail' ip address.

Ifconfig (note, NO ip address on lo0?)

bge0: flags=8843 mtu 1500
options=b
inet 192.168.1.200 netmask 0x broadcast 10.70.1.20
ether 00:0a:22:1f:18:64
media: Ethernet autoselect (100baseTX )
status: active
bge1: flags=8802 mtu 1500
options=b
ether 00:0a:22:1f:18:65
media: Ethernet autoselect (100baseTX )
status: active
lo0: flags=8049 mtu 16384

-- 
Michael Scheidell, CTO
>|SECNAP Network Security

_
This email has been scanned and certified safe by SpammerTrap(tm). 
For Information please see http://www.spammertrap.com
_


Re: Issue with SpamAssassin (spamc only) over a FreeBSD Jail

2007-12-27 Thread Jari Fredriksson
> Hi everyone,
> 
> I want to add Spam Assassin 3.23 to my SPAM counter
> measures 
> It is working into a FreeBSD jails, over Amavisd-new port.
> 
> When I test SpamAssassing via: spamassassin
>  it reacts correctly, raising the GTube signature:
> X-Spam-Flag: YES
> X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08)
> on ns.levier.org X-Spam-Level:
> **
> X-Spam-Status: Yes, score=1001.2 required=5.0
> tests=AWL,GTUBE,NO_RECEIVED,  
> 
> NO_RELAYS,RAZOR2_CF_RANGE_51_100,RAZOR2_CF_RANGE_E4_51_100,RAZOR2_CHECK
>autolearn=no version=3.2.3
> 
> spamd is launched normally as spamd user, and runs
> apparently fine. 
> Amavis does its job pushing email to spamd (filter is
> named spamassassin, different from 'spamd' name,
> confirming in logs the mail is "checked": 
> 
> Dec 26 13:16:39 ns spamd[14210]: spamd: connection from
> ns [IP_address] at port 60196
> Dec 26 13:16:39 ns spamd[14210]: spamd: processing message
> <[EMAIL PROTECTED]> for spamd:58
> Dec 26 13:16:39 ns spamd[14210]: spamd: clean message
> (0.0/5.0) for spamd:58 in 0.0 seconds, 551 bytes.
> Dec 26 13:16:39 ns spamd[14210]: spamd: result: . 0 -
> scantime=0.0,size=551,user=spamd,uid=58,required_score=5.0,rhost=ns,raddr=IP_address,rport=60196,mid=<[EMAIL
>  PROTECTED]>,autolearn=ham
> Dec 26 13:16:39 ns spamd[14209]: prefork: child states: II
> 
> However, all emails passing though amavis + Spamd (via
> port 783) generate a 
> 0.0 score, even the one with GTUBE signature.
> 
> I dont understand why Spam Assassin test works well and
> spamc method totally fails.
> 
> Can someone help?
> 

Not much help from this, but I wonder how this goes... Normally, standard 
Amavis does not call spamd at all, but loads it's own copy of spamassassin - as 
they both run under perl, and amavis is a resident process. No need for 
spamc/spamd for Amavis.

I do run spamd/spamc pair, and have disabled spamassassin in my amavisd-new 
configuration. I call spamc via maildrop script.




Issue with SpamAssassin (spamc only) over a FreeBSD Jail

2007-12-27 Thread B3r3n

Hi everyone,

I want to add Spam Assassin 3.23 to my SPAM counter measures
It is working into a FreeBSD jails, over Amavisd-new port.

When I test SpamAssassing via: spamassassin  for spamd:58 
Dec 26 13:16:39 ns spamd[14210]: spamd: clean message (0.0/5.0) for spamd:58
in 0.0 seconds, 551 bytes. 
Dec 26 13:16:39 ns spamd[14210]: spamd: result: . 0 -
scantime=0.0,size=551,user=spamd,uid=58,required_score=5.0,rhost=ns,raddr=IP_address,rport=60196,mid=<[EMAIL
 PROTECTED]>,autolearn=ham 
Dec 26 13:16:39 ns spamd[14209]: prefork: child states: II 

However, all emails passing though amavis + Spamd (via port 783) generate a
0.0 score, even the one with GTUBE signature.

I dont understand why Spam Assassin test works well and spamc method totally
fails.

Can someone help?

Thanks in advance

Brgrds
-- 
View this message in context: 
http://www.nabble.com/Issue-with-SpamAssassin-%28spamc-only%29-over-a-FreeBSD-Jail-tp14517297p14517297.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.



Re: Spamassassin Upgrade

2007-12-27 Thread Jari Fredriksson
> Dear Matt,
> 
> Thank you very much for your reply.
> Let me quote what is happening with Net::DNS.
> When I try to train bayes by entering for example:
> 
> sa-learn --no-sync --spam --mbox /home/support/mail/Trash
> 
> I get the following message:
> 
> dns: Net::DNS version is 0.31, but need 0.34 at
> /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin/Dns.pm
> line 588. Learned tokens from 12 message(s) (12
> message(s) examined) 
> 
> The weird thing is that when i am trying to update my
> Net::DNS by typing: 
> 
> #perl -MCPAN -e shell
> cpan[1]>install Net::DNS
> 
> I get the message:
> 
> CPAN: Storable loaded ok (v2.06)
> Going to read /root/.cpan/Metadata
> Database was generated on Thu, 27 Dec 2007 05:37:55 GMT
> Net::DNS is up to date (0.61).
> 
> which makes me believe that something is going wrong
> since the Net::DNS version according the cpan is 0.61 and
> according the sa-learn is 0.31. Am I wrong?
> 
> I will now check the X-Spam-Checker-Version header and
> try to go a bit deeper hoping that somewhere there the
> lightness lies. Thank you again for your help.
> 
> Best Regards,
> Nikos

How many perls do you have in this machine? /usr/local/bin/perl in addition to 
/usr/bin/perl maybe? If you have installed perl via cpan, you may have two of 
them...




Re: Spamassassin Upgrade

2007-12-27 Thread Nikos K.

Dear Matt,

Thank you very much for your reply. 
Let me quote what is happening with Net::DNS.
When I try to train bayes by entering for example: 

sa-learn --no-sync --spam --mbox /home/support/mail/Trash

I get the following message:

dns: Net::DNS version is 0.31, but need 0.34 at
/usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin/Dns.pm line 588.
Learned tokens from 12 message(s) (12 message(s) examined)

The weird thing is that when i am trying to update my Net::DNS by typing:

#perl -MCPAN -e shell
cpan[1]>install Net::DNS

I get the message: 

CPAN: Storable loaded ok (v2.06)
Going to read /root/.cpan/Metadata
Database was generated on Thu, 27 Dec 2007 05:37:55 GMT
Net::DNS is up to date (0.61).

which makes me believe that something is going wrong since the Net::DNS
version according the cpan is 0.61 and according the sa-learn is 0.31. Am I
wrong?

I will now check the X-Spam-Checker-Version header and try to go a bit
deeper hoping that somewhere there the lightness lies. Thank you again for
your help.

Best Regards,
Nikos

-- 
View this message in context: 
http://www.nabble.com/Spamassassin-Upgrade-tp14512526p14514774.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.



Re: Spamassassin Upgrade

2007-12-27 Thread Matt Kettler
Nikos K. wrote:
> Dear All,
>
> I had a mail server with the following characteristics:
> Redhat9 (Kernel 2.4.20-8)
> Squirrelmail-1.4.3a-1
> Spamassassin 3.0.1.
>
> The mail server was working fine but the spamassassing was missing a lot of
> spam messages. So, I tried to upgrade it to version  3.1.8. by installing
> the following packages:
> spamassassin-3.1.8-1.rh9.rf.i386.rpm
> spamassassin-tools-3.1.8-1.rh9.rf.i386.rpm
>
> After some more steps i ended up to: 
> 1) When I run "spamassassin -V" I get: SpamAssassin version 3.1.8 running on
> Perl version 5.8.0
> 2) When I run "sa-learn --dump magic" I get: 
> 0.000  0  3 0  non-token data: bayes db version
> 0.000  0   1717   0  non-token data: nspam
> 0.000  06740  non-token data: nham
>
>   

> 3)When I run "sa-update" I get no result, but the first time i did it, the
> following folder was created: /var/lib/spamassassin/3.001008/
>   
That's not surprising. You'd only get "results" if there was a ruleset
update. Those don't happen every day, and sometimes months go by before
there's a rule update. Rules are created by hand, tested automatically,
and then a human decides if the rule is performing well enough and
addresses enough of a problem area to warant being published to the
updates. As a result, that's a very sporadic process, and usually a
reaction to either a very impressive rule, or a substantial mutation in
spam behavior.

Also, SA 3.1.8 isn't a member of the current release family for SA. The
current release of SA is 3.2.3, There's a lot of development work on
getting 3.3.0 ready, and the 3.1.x branch is very minimally maintained.
The most recent updates for 3.1.x were on Sept 21, 2007 and Oct 18,
2007. The 3.2 branch got updates on Oct 17, 2007 and Oct 30 2007. So
don't expect updates every time you run sa-update. Even the current SA
doesn't get them very often.


> 4)When I run "spamassassin --lint" I get no error message.
>
> The PROBLEM is that spamassassin still misses a lot of spam messages and
> actually acts like before.
>   
Ok, care to post some X-Spam-Status headers?
> Even if it seems that the new version is running now, I think that the old
> spamassassin deals with the incoming emails. 
>   
Any reason to believe that? Have you restarted spamd since your upgrade?
> Please take a look in my configuration files below:
> 
> /etc/procmailrc:
>
> DROPPRIVS=yes
>
> :0fw:
> | /usr/bin/spamc
> 
> /etc/mail/spamassassin/local.cf
>
> required_hits 5
> rewrite_header  subject ***spam***
> report_safe   0
> use_bayes1
> bayes_auto_learn   1
> ok_localesall
> 
>
> I am pretty sure that i am missing something. Is there any way to check if
> the incoming emails are handled by the new spamassassin? 
Yes, look at your X-Spam-Checker-Version header.
> If indeed the new
> spamassassin handles all the incoming emails then why all this training by
> sa-update and sa-learn has given no evolution?
>   
Dono, I'd have to at least see what rules your messages are hitting by
looking at an X-Spam-Status header. It could be you have a broken trust
path and a lot of spam is hitting ALL_TRUSTED.

You're also running what still amounts to an "old" version of
spamassassin, although I still run 3.1.x in my production environment
with some added rulesets, and I get decent results.

Are network tests enabled in your SA (ie: do you have Net::DNS installed
so RCVD_FROM_* rules can be tested?)
>   



Spamassassin Upgrade

2007-12-27 Thread Nikos K.

Dear All,

I had a mail server with the following characteristics:
Redhat9 (Kernel 2.4.20-8)
Squirrelmail-1.4.3a-1
Spamassassin 3.0.1.

The mail server was working fine but the spamassassing was missing a lot of
spam messages. So, I tried to upgrade it to version  3.1.8. by installing
the following packages:
spamassassin-3.1.8-1.rh9.rf.i386.rpm
spamassassin-tools-3.1.8-1.rh9.rf.i386.rpm

After some more steps i ended up to: 
1) When I run "spamassassin -V" I get: SpamAssassin version 3.1.8 running on
Perl version 5.8.0
2) When I run "sa-learn --dump magic" I get: 
0.000  0  3 0  non-token data: bayes db version
0.000  0   1717   0  non-token data: nspam
0.000  06740  non-token data: nham
0.000  0  84131   0  non-token data: ntokens
0.000  0 11084878400  non-token data: oldest atime
0.000  0 11987484340  non-token data: newest atime
0.000  0 11987498460  non-token data: last journal sync
atime
0.000  0  0 0  non-token data: last expiry atime
0.000  0  0 0  non-token data: last expire atime
delta
0.000  0  0 0  non-token data: last expire
reduction co
3)When I run "sa-update" I get no result, but the first time i did it, the
following folder was created: /var/lib/spamassassin/3.001008/
4)When I run "spamassassin --lint" I get no error message.

The PROBLEM is that spamassassin still misses a lot of spam messages and
actually acts like before.
Even if it seems that the new version is running now, I think that the old
spamassassin deals with the incoming emails. 

Please take a look in my configuration files below:

/etc/procmailrc:

DROPPRIVS=yes

:0fw:
| /usr/bin/spamc

/etc/mail/spamassassin/local.cf

required_hits 5
rewrite_header  subject ***spam***
report_safe   0
use_bayes1
bayes_auto_learn   1
ok_localesall


I am pretty sure that i am missing something. Is there any way to check if
the incoming emails are handled by the new spamassassin? If indeed the new
spamassassin handles all the incoming emails then why all this training by
sa-update and sa-learn has given no evolution?

Thank you in advance!

Nikos

-- 
View this message in context: 
http://www.nabble.com/Spamassassin-Upgrade-tp14512526p14512526.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.