[Dovecot] dovecot-antispam: Failed to read mail beginning, Next message unexpectedly lost

Jiri Novosad novosad at fi.muni.cz
Thu Aug 7 12:26:00 EEST 2008


Hello,

I'm trying to configure the dovecot-antispam plugin.
Now I've run into a problem: whenever I try to move/copy a message
in/from the spam mailbox, Thunderbird (and also Sylpheed, haven't tried
anything else) says:

The current command did not succeed. The mail server responded: Failed
to read mail beginning.

and in the logs I get:

dovecot: Aug 07 10:41:23 Error: IMAP(username): Next message
unexpectedly lost from 337928
dovecot: Aug 07 10:41:23 Error: IMAP(username): Next message
unexpectedly lost from 337928

The message is not moved/copied.

My config (dovecot -n):

base_dir: /var/run/dovecot_test/
log_path: /var/log/dovecot/test_log
info_log_path: /var/log/dovecot/test_info_log
protocols: pop3s imaps pop3 imap
listen(default): *:10143
listen(imap): *:10143
listen(pop3): *:10110
ssl_listen(default): *:10993
ssl_listen(imap): *:10993
ssl_listen(pop3): *:10995
ssl_cert_file: /etc/ssl/anxur.pem
ssl_key_file: /etc/ssl/anxur.pem
ssl_parameters_regenerate: 24
login_dir: /var/run/dovecot_test/login
login_executable(default):
/packages/run.64/dovecot-1.1.2/libexec/dovecot/imap-login
login_executable(imap):
/packages/run.64/dovecot-1.1.2/libexec/dovecot/imap-login
login_executable(pop3):
/packages/run.64/dovecot-1.1.2/libexec/dovecot/pop3-login
login_greeting: HI!
login_greeting_capability(default): yes
login_greeting_capability(imap): yes
login_greeting_capability(pop3): no
verbose_proctitle: yes
first_valid_uid: 200
mail_location:
mbox:/home/%u/mail/:INBOX=/var/mail/%u:INDEX=/home/%u/mail/.imap
mail_debug: yes
mail_full_filesystem_access: yes
maildir_copy_with_hardlinks: no
mbox_write_locks: fcntl
mbox_dirty_syncs: no
mbox_lazy_writes: no
dbox_rotate_days: 0
mail_executable(default):
/packages/run.64/dovecot-1.1.2/libexec/dovecot/imap
mail_executable(imap): /packages/run.64/dovecot-1.1.2/libexec/dovecot/imap
mail_executable(pop3): /packages/run.64/dovecot-1.1.2/libexec/dovecot/pop3
mail_plugins(default): antispam
mail_plugins(imap): antispam
mail_plugins(pop3):
mail_plugin_dir(default): /packages/run.64/dovecot-1.1.2/lib/dovecot/imap
mail_plugin_dir(imap): /packages/run.64/dovecot-1.1.2/lib/dovecot/imap
mail_plugin_dir(pop3): /packages/run.64/dovecot-1.1.2//lib/dovecot/pop3
mail_log_max_lines_per_sec: 20
imap_max_line_length(default): 131072
imap_max_line_length(imap): 131072
imap_max_line_length(pop3): 65536
imap_client_workarounds(default): delay-newmail outlook-idle
tb-extra-mailbox-sep
imap_client_workarounds(imap): delay-newmail outlook-idle
tb-extra-mailbox-sep
imap_client_workarounds(pop3):
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %08Xv%08Xu
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
      mechanisms: gssapi plain
      executable: 
/packages/run.64/dovecot-1.1.2/libexec/dovecot/dovecot-auth
      krb5_keytab: /etc/krb5.imap
      verbose: yes
      debug: yes
      passdb:
        driver: pam
        args: dovecot
      userdb:
        driver: passwd
plugin:
      antispam_spam: mailbox.spam
      antispam_trash: trash;Trash;Deleted Items
      antispam_mail_spam: spam at mysite.org
      antispam_mail_notspam: notspam at mysite.org
      antispam_mail_sendmail: /home/username/fake_sendmail

Dovecot is version 1.1.2, dovecot-antispam is the latest snapshot.
Running on Red Hat Enterprise Linux Server release 5.2, x86_64,
filesystem is ext3 (on lvm).

Attached is the strace -p of the session.

The code seems to be this in i_stream_raw_mbox_read:

           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;
                   return -1;
           }

If I comment it out (after I backup my mail), everything seems to work
as expected.


Jiri Novosad

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: strace
Url: http://dovecot.org/pipermail/dovecot/attachments/20080807/9b6fe738/attachment.pl 


More information about the dovecot mailing list