git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
MAMarkus Amsler <markus.amsler@oribi.org>
Date
Oct 12, 2006, 22:19 UTC
Message-ID
<452EBF77.7040301@oribi.org>
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: Junio C Hamano
Message 1 of 6 in “git-imap-send: Strip smtp From_ header from imap message.”
  1. git-imap-send: Strip smtp From_ header from imap message.Markus Amsler, Oct 12, 2006
  2. Junio C HamanoOct 18, 2006
  3. Markus AmslerOct 18, 2006
  4. Mike McCormackOct 18, 2006
  5. Junio C HamanoOct 18, 2006
  6. Markus AmslerOct 18, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.