git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Amsler <markus.amsler@oribi.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Mike McCormack <mike@codeweavers.com>
Subject: Re: [PATCH] git-imap-send: Strip smtp From_ header from imap message.
Date: Wed, 18 Oct 2006 10:53:45 +0200	[thread overview]
Message-ID: <4535EB99.3090006@oribi.org> (raw)
In-Reply-To: <7vlknegnwk.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> Markus Amsler <markus.amsler@oribi.org> writes:
> 
>> Cyrus imap refuses messages with a 'From ' Header.
>>
>> Signed-off-by: Markus Amsler <markus.amsler@oribi.org>
> 
> Do you know if this change does not upset other implementations
> of imap servers?
I only tested it with cyrus 2.1.18 on debian. I did some research: The 
From_ header field was introduced in rfc976 which only affects UUCP(Unix 
to Unix CoPy). I assume it's an invalid header field in SMTP/IMAP, and 
most implementation ignores it.
I'm no mail header guru, so I could be wrong

Markus
> 
> Mike, are you Ok with this change?
> 
> ---
>   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;
> 
> 

  reply	other threads:[~2006-10-18  8:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=4535EB99.3090006@oribi.org \
    --to=markus.amsler@oribi.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --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).