View previous topic :: View next topic |
Author |
Message |
geekkoo n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Sep 2008 Posts: 3
|
Posted: Tue Sep 09, 2008 5:52 am Post subject: DSPAM development |
|
|
Hi, Gentoo users and developers!
I am interested in development of DSPAM spam-filter but its home page looks like dead. From CHANGELOG I have learned that Sensory Networks (which now owns DSPAM) accepted last patches from Gentoo-community (I am Slackophil myself). How can I reach developers? I found a bug introduced in 3.8.0 release (which under some conditions prevents retraining of the filter on errors) and want to discuss it with people with more deep knowledge of DSPAM internals.
Thank you! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
geekkoo n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Sep 2008 Posts: 3
|
Posted: Tue Sep 09, 2008 7:08 am Post subject: |
|
|
In particular this concerns src/dspam.c and process_message function. When it puts back signature to the mail it use '\r\n' terminator if smtp or lmtp transport is used for message delivery to mailbox.
Code: | copyback = _ds_assemble_message (CTX->message, (USE_LMTP || USE_SMTP) ? "\r\n" : "\n"); |
If user wants to retrain this message (one considers DSPAM result as error) the filter has to find the message data in database but in Unices it can not do it because of wrong line-terminator (\n instead of \r\n) so '\r' got collated to the signature so it can not be found in database. Hence infamous '-5 error. Signature not found'.
The solution is either to roll back to 3.6.8 release (there was always '\n' terminator, I do not understand why this complications with conditionals were made) or trimming of SQL-query in storage-dependent _ds_get_signature function. I can not succeed in trimming of signature in C code. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
geekkoo n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Sep 2008 Posts: 3
|
Posted: Tue Sep 09, 2008 10:57 am Post subject: |
|
|
I found right solution.
The problem arizes then Code: | Preference "signatureLocation=headers" | is selected. When the signature was embedded in the message body ( Code: | Preference "signatureLocation=message" | ) it is stripped of non-printable characters during message parsing so this error does not manifest itself.
"\r\n" are required by RFC 821 - line terminator in messages should always be <CRLF> so _ds_assemble_message behaves nice.
But then file src/decode.c and function _ds_actualize_message (primary parser) have to be patched. First we should try two-symbol line terminator <CRLF> and then <CR> . The patch is simple -
Code: |
96,97c96,97
<
< line = strsep (&in, "\n");
---
> line = strsep (&in, "\r\n");
> if (!line) line = strsep (&in, "\n");
260,261c260,261
<
< line = strsep (&in, "\n");
---
> line = strsep (&in, "\r\n");
> if (!line) line = strsep (&in, "\n");
|
If someone know how to reach DSPAM developers wouldn't you send them this patch? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|