[PATCH] git-imap-send: Strip smtp From_ header from imap message.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cyrus imap refuses messages with a 'From ' Header.

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

---
  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;

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]