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

Re: [PATCH] git-send-email.perl: Fold long header lines to 78 chars

From
Joe Perches <joe@perches.com>
Date
Oct 8, 2009, 05:28 UTC
Message-ID
<1254979690.2056.103.camel@Joe-Laptop.home>
In-Reply-To
<7vd44yo4uz.fsf@alter.siamese.dyndns.org>
On Wed, 2009-10-07 at 22:02 -0700, Junio C Hamano wrote:
Show 6 quoted lines
> Joe Perches <joe@perches.com> writes:
> > Some MTAs reject or filter long header lines which can
> > be generated if the cc list is only a few entries.
> > Fold long header lines to 78 chars to be more rfc compliant.
> >
> > -	my $cc = join(", ", unique_email_list(@cc));

It's probably better/simpler to not use fold_header and just do the same join as "my $to"

	my $cc = join(",\n\t", unique_email_list(@cc));
Show 8 quoted lines
> >  		if ($smtp_server !~ m#^/#) {
> >  			print "Server: $smtp_server\n";
> >  			print "MAIL FROM:<$raw_from>\n";
> > -			print "RCPT TO:".join(',',(map { "<$_>" } @recipients))."\n";
> > +			print fold_header("RCPT TO:", ",", map { "<$_>" } @recipients)."\n";
> I do not think this hunk is correct.
> Shouldn't we be rather repeating "RCPT TO: " for each recipient, as
> RFC2821 4.1.1.3 says (this is an issue with the original code)?
Looks like you're right.
Want a new patch or will you fix both issues?

I suggest using the same join as "To:" for "Cc:" and multiple single line "RCPT TO:"s.

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 7 in “git-send-email.perl: Fold long header lines to 78 chars”
  1. git-send-email.perl: Fold long header lines to 78 charsJoe Perches, Oct 5, 2009
  2. Junio C HamanoOct 8, 2009
  3. Joe PerchesOct 8, 2009
  4. Junio C HamanoOct 8, 2009
  5. git-send-email.perl: fold multiple entry "Cc:" and multiple single line "RCPT TO:"sJoe Perches, Oct 8, 2009
  6. Junio C HamanoOct 9, 2009
  7. Junio C HamanoOct 10, 2009

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.