Timo Sirainen wrote:
- Instead of requiring "\n[\r]From ", require "\n[\r]\n[\r]From "
- in mbox-save.c make sure that the extra empty line is always added (I'm not sure if this already is done, I think it isn't)
- preferrably also fix broken mboxes in mbox-sync.c and mbox-save.c: If you notice that it doesn't end with two linefeeds, add one or two so it does
At first, I have modified istream-raw-mbox.c and now my Dovecot stops mistaking the secound "From " line for a message separator.
But RETRed message contains unnecessary (may be harmful for some pop3 clients) "From " line.
+OK Dovecot ready.
user xxxxxxxx
+OK
pass xxxxxxxx
+OK Logged in.
top 1 0
+OK
X-UIDL: i[f"!$h*!!S67!!/RW!!
From xxx@xx.xxxxxxx.xx.xx Sat Feb 17 19:27:47 2007
Return-Path: <xxx@xx.xxxxxxx.xx.xx>
:
:
:
I have thought that save_header_callback() in mbox-save.c should drop the "From " line but it still left in the message.
Timo, please give me more advice. What should I do to workaround this?
-- // -------------------------------------------------------------- // MAEDA, Go <maeda-g@secom-sanin.co.jp>
*** dovecot-1.0.0/src/lib-storage/index/mbox/istream-raw-mbox.c 2007-03-14 00:32:37.000000000 +0900 --- dovecot-1.0.0-fix/src/lib-storage/index/mbox/istream-raw-mbox.c 2007-05-25 20:23:07.000000000 +0900
*** 243,255 **** i++; from_after_pos = i; from_start_pos = i - 6; ! if (from_start_pos > 0 && ! buf[from_start_pos-1] == '\r') { ! /* CR also belongs to it. */ ! crlf_ending = TRUE; from_start_pos--; ! } else { crlf_ending = FALSE; } } fromp = mbox_from; --- 243,260 ---- i++; from_after_pos = i; from_start_pos = i - 6; ! ! if (from_start_pos > 2 && ! memcmp(buf + from_start_pos - 3, ! "\r\n\r", 3) == 0) { from_start_pos--; ! crlf_ending = TRUE; ! } else if (from_start_pos > 0 && ! buf[from_start_pos - 1] == '\n') { crlf_ending = FALSE;
} } fromp = mbox_from;