Hello, i have following problems using dovecot-antispam plugin (Dovecot >1.1.3, FreeBSD 8.0-Current, dovecot-antispam 1.0/1.1) dovecot-antispam compiled using dspam-exec/mailtrain, with/wo debugging (i've tried all possibilities) When i try to move message to SPAM folder (using dspam-exec backend) i'm getting IMAP error: antispam signature not found and in dovecot logs: Nov 23 23:44:24 freebsd dovecot: IMAP(mr): Next message unexpectedly lost from 2708619 Using mail backend gives this error too(only IMAP error changes: failed to read mail beggining). Commenting out following code in mbox_read_from_line function (in src/lib-storage/index/mbox/istream-raw-mbox.c) helped and plugin was working correctly, but only with Dovecot <=1.1.3. if (stream->istream.v_offset - rstream->hdr_offset + new_pos > rstream->mail_size) { /* istream_raw_mbox_set_next_offset() used invalid cached next_offset? */ i_error("Next message unexpectedly lost from %"PRIuUOFF_T, rstream->hdr_offset + rstream->mail_size); rstream->eof = TRUE; rstream->corrupted = TRUE; rstream->istream.istream.stream_errno = EINVAL; stream->pos = 0; return -1; } Now, with versions >1.1.3 this won't helps and plugin fails. Anyone knows how to get it working? I would like to upgrade to newest dovecot release Best regards, mr
Marcin Rzepecki wrote:> When i try to move message to SPAM folder (using dspam-exec backend) i'm > getting IMAP error: antispam signature not found and in dovecot logs: > Nov 23 23:44:24 freebsd dovecot: IMAP(mr): Next message unexpectedly > lost from 2708619 > >HMMM. Same here. DC 1.1.5 with mbox.> Using mail backend gives this error too(only IMAP error changes: failed > to read mail beggining). >Oops, and I tried half of last night to get the mail backend working ...> Commenting out following code in mbox_read_from_line function (in > src/lib-storage/index/mbox/istream-raw-mbox.c) helped and plugin was > working correctly, but only with Dovecot <=1.1.3. > > if (stream->istream.v_offset - > rstream->hdr_offset + new_pos > rstream->mail_size) { > /* istream_raw_mbox_set_next_offset() used invalid > cached next_offset? */ > i_error("Next message unexpectedly lost from %"PRIuUOFF_T, > rstream->hdr_offset + rstream->mail_size); > rstream->eof = TRUE; > rstream->corrupted = TRUE; > rstream->istream.istream.stream_errno = EINVAL; > stream->pos = 0; > return -1; > } > >So that's code from dovecot itself. If that really helped (did you check that the messages really were trained by dspam?) there is some problem between the antispam plugin and the main code. But I think the part you commented out is only the end of the story. Can it be that there is some counting problem when the plugin looks for the inserted message? Timo?> Now, with versions >1.1.3 this won't helps and plugin fails.Duh, at leas I could downgrade to 1.1.3 and get it working - probably a bad idea though. Regards, Jakob
On Mon, 2008-11-24 at 00:10 +0100, Marcin Rzepecki wrote:> Hello, > i have following problems using dovecot-antispam plugin (Dovecot >1.1.3, > FreeBSD 8.0-Current, dovecot-antispam 1.0/1.1) > dovecot-antispam compiled using dspam-exec/mailtrain, with/wo debugging > (i've tried all possibilities) > > When i try to move message to SPAM folder (using dspam-exec backend) i'm > getting IMAP error: antispam signature not found and in dovecot logs: > Nov 23 23:44:24 freebsd dovecot: IMAP(mr): Next message unexpectedly > lost from 2708619See if it works with the changes I did yesterday to hg. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20081214/fc47bd90/attachment-0002.bin>
Timo Sirainen wrote:> > When i try to move message to SPAM folder (using dspam-exec backend) i'm > > getting IMAP error: antispam signature not found and in dovecot logs: > > Nov 23 23:44:24 freebsd dovecot: IMAP(mr): Next message unexpectedly > > lost from 2708619 > > See if it works with the changes I did yesterday to hg.Hi Timo, i've tested your patches with dovecot 1.1.7 (FreeBSD8 ports tree) After rebuilding dovecot & dovecot-antispam with your patches and moving message from INBOX to SPAM folder i've unfortunatelly get the same error: Dec 13 15:28:02 freebsd dovecot: IMAP(mr): Next message unexpectedly lost from 2518625 When I comment out following code with this patch (same way as with v.1.1.3), everything is working properly. --- src/lib-storage/index/mbox/istream-raw-mbox.c.dist 2008-12-14 14:12:53.000000000 +0100 +++ src/lib-storage/index/mbox/istream-raw-mbox.c 2008-12-14 14:13:18.000000000 +0100 @@ -312,18 +312,18 @@ new_pos--; } - if (stream->istream.v_offset - - rstream->hdr_offset + new_pos > rstream->mail_size) { +/* if (stream->istream.v_offset - + rstream->hdr_offset + new_pos > rstream->mail_size) { */ /* istream_raw_mbox_set_next_offset() used invalid cached next_offset? */ - i_error("Next message unexpectedly lost from %"PRIuUOFF_T, +/* i_error("Next message unexpectedly lost from %"PRIuUOFF_T, rstream->hdr_offset + rstream->mail_size); rstream->eof = TRUE; rstream->corrupted = TRUE; rstream->istream.istream.stream_errno = EINVAL; stream->pos = 0; return -1; - } + } */ stream->buffer = buf; if (new_pos == stream->pos) { So now it's a little bit better, altough still something goes wrong. But at least it is possible to switch to a newer release now :) Anyway, thank you very much for your work. Keep it up! Greets, -- Marcin Rzepecki m.rzepecki(at)iem.pw.edu.pl
Reasonably Related Threads
- dovecot-antispam: Failed to read mail beginning, Next message unexpectedly lost
- Next message unexpectedly lost
- file istream-raw-mbox.c: line 450 (istream_raw_mbox_get_body_size): assertion failed: (rstream->mail_size != (uoff_t)-1)
- two assertion failures
- unable to read mail - file istream-raw-mbox.c: line 499...