From: Markus Amsler <markus.amsler@oribi.org>
To: git@vger.kernel.org
Cc: Mike McCormack <mike@codeweavers.com>
Subject: [PATCH] git-imap-send: Strip smtp From_ header from imap message.
Date: Fri, 13 Oct 2006 00:19:35 +0200 [thread overview]
Message-ID: <452EBF77.7040301@oribi.org> (raw)
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;
next reply other threads:[~2006-10-12 22:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 22:19 Markus Amsler [this message]
2006-10-18 6:04 ` [PATCH] git-imap-send: Strip smtp From_ header from imap message 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=452EBF77.7040301@oribi.org \
--to=markus.amsler@oribi.org \
--cc=git@vger.kernel.org \
--cc=mike@codeweavers.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).