aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-06-15 21:18:45 +0200
committerJohannes Berg <johannes@sipsolutions.net>2009-06-15 21:18:45 +0200
commit34e93f021fae0708d57a0210fcdc4757ff910be5 (patch)
treed479467b091cba514f7f1e687d50a989de1ed172
parent60456a013e919913d72e1d63b1c8a59cbb233a6a (diff)
downloaddovecot-antispam-34e93f021fae0708d57a0210fcdc4757ff910be5.tar.gz
dovecot-antispam-34e93f021fae0708d57a0210fcdc4757ff910be5.tar.xz
dovecot-antispam-34e93f021fae0708d57a0210fcdc4757ff910be5.zip
fix mbox "From " removal code for not-present case
Timo explained it to me here: http://mid.gmane.org/1245092921.21624.739.camel@timo-desktop It's been broken forever.
-rw-r--r--mailtrain.c11
-rw-r--r--spool2dir.c11
2 files changed, 2 insertions, 20 deletions
diff --git a/mailtrain.c b/mailtrain.c
index fe2868d..41071bc 100644
--- a/mailtrain.c
+++ b/mailtrain.c
@@ -285,17 +285,8 @@ int backend_handle_mail(struct mailbox_transaction_context *t,
}
/* "From "? skip line */
- if (memcmp("From ", beginning, 5) == 0) {
+ if (memcmp("From ", beginning, 5) == 0)
i_stream_read_next_line(mailstream);
- } else {
- if (o_stream_send(outstream, beginning, 5) != 5) {
- ret = -1;
- mail_storage_set_error(t->box->storage,
- ME(NOTPOSSIBLE)
- "Failed to write line to temp");
- goto failed_to_copy;
- }
- }
if (o_stream_send_istream(outstream, mailstream) < 0) {
ret = -1;
diff --git a/spool2dir.c b/spool2dir.c
index 06bd307..aa53e71 100644
--- a/spool2dir.c
+++ b/spool2dir.c
@@ -206,17 +206,8 @@ int backend_handle_mail(struct mailbox_transaction_context *t,
}
/* "From "? skip line */
- if (memcmp("From ", beginning, 5) == 0) {
+ if (memcmp("From ", beginning, 5) == 0)
i_stream_read_next_line(mailstream);
- } else {
- if (o_stream_send(outstream, beginning, 5) != 5) {
- ret = -1;
- mail_storage_set_error(t->box->storage,
- ME(NOTPOSSIBLE)
- "Failed to write line to temp");
- goto failed_to_copy;
- }
- }
if (o_stream_send_istream(outstream, mailstream) < 0) {
ret = -1;