git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-imap-send: Strip smtp From_ header from imap message.
@ 2006-10-12 22:19 Markus Amsler
  2006-10-18  6:04 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Amsler @ 2006-10-12 22:19 UTC (permalink / raw)
  To: git; +Cc: Mike McCormack

Cyrus imap refuses messages with a 'From ' Header.

Signed-off-by: Markus Amsler <markus.amsler@oribi.org>

---
   imap-send.c |    8 ++++++++
   1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/imap-send.c b/imap-send.c
index 362e474..16804ab 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1226,6 +1226,14 @@ split_msg( msg_data_t *all_msgs, msg_dat
  	if (msg->len < 5 || strncmp( data, "From ", 5 ))
  		return 0;

+	p = strchr( data, '\n' );
+	if (p) {
+		p = &p[1];
+		msg->len -= p-data;
+		*ofs += p-data;
+		data = p;
+	}
+
  	p = strstr( data, "\nFrom " );
  	if (p)
  		msg->len = &p[1] - data;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-10-18 12:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-12 22:19 [PATCH] git-imap-send: Strip smtp From_ header from imap message Markus Amsler
2006-10-18  6:04 ` Junio C Hamano
2006-10-18  8:53   ` Markus Amsler
2006-10-18 19:02   ` Mike McCormack
2006-10-18 10:28     ` Junio C Hamano
2006-10-18 11:54       ` Markus Amsler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).