SA Bugzilla – Bug 1751
sslspamc -S reports error "failed sanity check" where sslspamc alone does not
Last modified: 2003-06-09 03:21:50 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
Created attachment 866 [details] mbox file with 5 messages
Created attachment 999 [details] patch for spamd/utils.c provided by Florian F. Sauerteig <ffs@ccn.net> to SA-devel at 2003-05-22
Created attachment 1000 [details] patch for spamd/libspamc.c provided by Florian F. Sauerteig ffs@ccn.net to SA-devel 2003-05-22
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.
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.
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.
committed to 2.60.
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
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
yeah, we usually ignore anything that's not a patch. takes too long. ;) anyway, I updated utils.h.