[Dovecot] Dovecot headers at start of text returned to KMail
The attachment show Kmail (kdepim-4.4.2-1.fc12.x86_64) accessing an email from dovecot over imap.
From the wireshark-imap-trace.txt you can see at line 77 that the headers do not end cleanly "X-)". And at line 84 there is text from the headers that is not part of the body "-Spambayes-Trained: ham".
The email being access by dovecot is in: 1272011889.M384349P30156.f12barry.office.onelan.co.uk,S=6494,W=6606:2,S
Because of this bug kmail fails to show the message cleanly on screen.
# 1.2.11: /etc/dovecot.conf # OS: Linux 2.6.32.11-99.fc12.x86_64 x86_64 Fedora release 12 (Constantine) login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/lib64/dovecot/imap mail_plugin_dir(imap): /usr/lib64/dovecot/imap mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3 auth default: passdb: driver: pam userdb: driver: passwd
Barry
1272011889.M384349P30156.f12barry.office.onelan.co.uk,S=6494,W=6606:2,S
The size of this file should be 6494 bytes (S=6494) but in your attachment it is 6519 bytes. Did something insert a header into the file after dovecot received it? Perhaps this one, which (with a CR added) is 25 bytes, the same as the difference between 6519 and 6494: X-Spambayes-Trained: ham
As I understand it, once messages are under dovecot's control they must not ever change at all. Adding headers after delivery is forbidden.
On Thursday 29 April 2010 13:26:25 Mike Abbott wrote:
1272011889.M384349P30156.f12barry.office.onelan.co.uk,S=6494,W=6606:2,S
The size of this file should be 6494 bytes (S=6494) but in your attachment it is 6519 bytes. Did something insert a header into the file after dovecot received it? Perhaps this one, which (with a CR added) is 25 bytes, the same as the difference between 6519 and 6494: X-Spambayes-Trained: ham
As I understand it, once messages are under dovecot's control they must not ever change at all. Adding headers after delivery is forbidden.
Thanks, I missed that. I'm running Spambayes's sb_mboxtrain.py tool and it is updating the files because I did not know to add this option to the .spambayesrc file:
[Headers]
include_trained = False
To recover from this error I think I need to:
- service dovecot stop
- rename all the mail files to have the S=nnnn match the size of the file on disk
- remove all the dovecot.* files
- service dovecot start
Is this correct?
Barry
To recover from this error I think I need to:
- service dovecot stop
- rename all the mail files to have the S=nnnn match the size of the file on disk
- remove all the dovecot.* files
- service dovecot start
Is this correct?
I believe so but I'm not an authority on this part. Note that removing the dovecot.* files has other side effects, like making your clients re-download all the messages again, and losing any keywords.
If you instead just remove the X-Spambayes-Trained header (and any other headers that might have been added after delivery) from the affected messages (using, e.g., sed), you might be able to skip step 3.
On Thursday 29 April 2010 15:33:02 Mike Abbott wrote:
To recover from this error I think I need to:
- service dovecot stop
- rename all the mail files to have the S=nnnn match the size of the file on disk
- remove all the dovecot.* files
- service dovecot start
Is this correct?
I believe so but I'm not an authority on this part. Note that removing the dovecot.* files has other side effects, like making your clients re-download all the messages again, and losing any keywords.
If you instead just remove the X-Spambayes-Trained header (and any other headers that might have been added after delivery) from the affected messages (using, e.g., sed), you might be able to skip step 3.
Thanks for the confirmation. I follow steps 1 to 4 and I'm back working.
I though about rewriting every file but considered removing the dovecot files the lesser of two evils.
Barry
participants (2)
-
Barry Scott
-
Mike Abbott