Bug 1751 - sslspamc -S reports error "failed sanity check" where sslspamc alone does not
Summary: sslspamc -S reports error "failed sanity check" where sslspamc alone does not
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamc/spamd (show other bugs)
Version: 2.53
Hardware: Other NetBSD
: P3 normal
Target Milestone: 2.60
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-06 07:51 UTC by Klaus Heinz
Modified: 2003-06-09 03:21 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
mbox file with 5 messages text/plain None Klaus Heinz [HasCLA]
patch for spamd/utils.c provided by Florian F. Sauerteig <ffs@ccn.net> to SA-devel at 2003-05-22 patch None Klaus Heinz [HasCLA]
patch for spamd/libspamc.c provided by Florian F. Sauerteig ffs@ccn.net to SA-devel 2003-05-22 patch None Klaus Heinz [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Heinz 2003-04-06 07:51:00 UTC
Hi,

I have attached some messages (mbox file with 1 spam, 4 ham) for which I see the following errors in
my log files (using SA 2.53) if I use 'sslspamc -S':

  Apr  6 16:22:38 silence spamd[1239]: identified spam (7.2/5.0) for kh:123 in 1.3 seconds, 47890 bytes.
  Apr  6 16:22:38 silence spamc[1238]: failed sanity check, 49783 bytes claimed, 32744 bytes seen

  Apr  6 16:22:31 silence spamc[1235]: failed sanity check, 23683 bytes claimed, 23680 bytes seen
  Apr  6 16:22:31 silence spamd[1236]: clean message (-7.7/5.0) for kh:123 in 4.9 seconds, 23372 bytes.

  Apr  6 16:22:15 silence spamc[1232]: failed sanity check, 16412 bytes claimed, 16408 bytes seen
  Apr  6 16:22:15 silence spamd[1233]: clean message (-2.9/5.0) for kh:123 in 1.4 seconds, 16219 bytes.

  Apr  6 16:21:39 silence spamc[1226]: failed sanity check, 18489 bytes claimed, 18488 bytes seen
  Apr  6 16:21:39 silence spamd[1227]: clean message (-5.3/5.0) for kh:123 in 2.1 seconds, 18302 bytes.

  Apr  6 16:21:29 silence spamd[1224]: clean message (-8.9/5.0) for kh:123 in 4.7 seconds, 41140 bytes.
  Apr  6 16:21:29 silence spamc[1223]: failed sanity check, 41367 bytes claimed, 32744 bytes seen 


If I use sslspamc without the -S switch the error messages do not appear:

  Apr  6 16:26:27 silence spamd[1278]: identified spam (7.2/5.0) for kh:123 in 1.3 seconds, 47890 bytes.
  Apr  6 16:26:40 silence spamd[1281]: clean message (-7.7/5.0) for kh:123 in 4.8 seconds, 23372 bytes.
  Apr  6 16:26:49 silence spamd[1284]: clean message (-3.0/5.0) for kh:123 in 4.4 seconds, 16219 bytes.
  Apr  6 16:26:57 silence spamd[1287]: clean message (-5.3/5.0) for kh:123 in 1.8 seconds, 18302 bytes.
  Apr  6 16:27:04 silence spamd[1290]: clean message (-8.9/5.0) for kh:123 in 2.5 seconds, 41140 bytes.

spamd is running with options '-H -a -c -m 2 -d -r /var/run/spamd.pid'. In the SSL case I use the 
necessary additional options --ssl, --server-key and --server-cert.

Can anyone confirm this?

ciao
     Klaus
Comment 1 Klaus Heinz 2003-04-06 07:53:46 UTC
Created attachment 866 [details]
mbox file with 5 messages
Comment 2 Klaus Heinz 2003-05-27 14:40:43 UTC
Created attachment 999 [details]
patch for spamd/utils.c provided by Florian F. Sauerteig <ffs@ccn.net> to SA-devel at 2003-05-22
Comment 3 Klaus Heinz 2003-05-27 14:43:58 UTC
Created attachment 1000 [details]
patch for spamd/libspamc.c provided by Florian F. Sauerteig ffs@ccn.net to SA-devel 2003-05-22
Comment 4 Klaus Heinz 2003-05-27 14:54:26 UTC
I have SA 2.55 running with the patches by Florian Sauerteig applied and the 5 messages in
http://bugzilla.spamassassin.org/showattachment.cgi?attach_id=866 are processed properly now.
Comment 5 Theo Van Dinter 2003-05-27 22:46:23 UTC
OKAY: I think these look ok.  I, however, don't use sslspamc, so I can't test 
to make sure this has fixed the problem.  I assume it does due to the 
report. :)

If another dev OKAYs this, I'll apply it to 2.60.
Comment 6 Justin Mason 2003-05-27 23:11:42 UTC
OKAY: they look good to me, and if they apparently fix it, that's the key.

they're basically porting the full_read() logic to SSL.
Comment 7 Theo Van Dinter 2003-05-27 23:19:11 UTC
committed to 2.60.
Comment 8 Al Smith 2003-06-09 02:17:27 UTC
utils.h should also be patched to reflect the new ssl_full_read() function in 
utils.c

diff -ur Mail-SpamAssassin-2.55_o/spamd/utils.h Mail-SpamAssassin-
2.55/spamd/utils.h
--- Mail-SpamAssassin-2.55_o/spamd/utils.h      2003-03-28 22:26:45.000000000 
+0100
+++ Mail-SpamAssassin-2.55/spamd/utils.h        2003-06-02 13:36:47.535646000 
+0200
@@ -17,8 +17,8 @@
 ssize_t fd_timeout_read (int fd, void *, size_t );
 int ssl_timeout_read (SSL *ssl, void *, int );

-/* these are fd-only, no SSL support */
 int full_read(int fd, unsigned char *buf, int min, int len);
+int ssl_full_read(SSL *ssl, unsigned char *buf, int min, int len);
 int full_write(int fd, const unsigned char *buf, int len);

 #endif
Comment 9 Klaus Heinz 2003-06-09 09:55:14 UTC
Subject: Re:  sslspamc -S reports error "failed sanity check" where sslspamc alone does not

You're right of course.

If you attach your patches in bugzilla with the 'create an attachment'
link, they are much more likely to be applied promptly, I think.
The SA developers are really busy and extracting inline patches from
emails or patches only adds to their workload.

ciao
     Klaus Heinz

Comment 10 Theo Van Dinter 2003-06-09 11:21:50 UTC
yeah, we usually ignore anything that's not a patch.  takes too long. ;)

anyway, I updated utils.h.