git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-imap-send and "From "
@ 2006-10-21 16:51 Andy Parkins
  2006-10-21 17:55 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Parkins @ 2006-10-21 16:51 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1804 bytes --]

Hello,

I've been playing around with git; made some simple patches for git and 
thought I would forward them to the mailing list.  I did this using

git-format-patch --stdout --signoff -M -B | git-imap-send

With the following in .gitconfig and courier-imap as the IMAP server.

[imap]
  Folder = "INBOX.Drafts"
  Tunnel = "ssh -q mailhost /usr/bin/imapd ./Maildir 2> /dev/null"

This appeared to work as expected.  A nicely formatted patch appeared in my 
drafts mailbox for checking and sending; which I did.  However, those emails 
caused a few problems; like:

"Can you please not send your emails to "unlisted recipients?"  It
breaks my mail filtering and your mails don't end up going to my "git"
folder."

As far as I knew, I hadn't done this.  The email looked fine when I checked it 
in KMail.  So, I went back and had a look at the raw source of the patch 
email that I'd sent and found this:

From 0e3c0aefc3276bd271553d171ed9bcc52d85230e Mon Sep 17 00:00:00 2001
From: Andy Parkins <andyparkins@gmail.com>
Date: Fri, 20 Oct 2006 15:24:40 +0100
Subject: [PATCH] Use email address only for looking up signing key in git-tag

It's that first line that's the problem.  It was generated by git-format-patch 
of course, however, I assume that it was intended to be stripped on the way 
to the IMAP server.  So,

 * Courier's /usr/bin/imapd should have stripped it and didn't
 * git-imap-send shouldn't have sent it

Can anyone help me out with which it should be?  Or point me at the relevant 
RFC?

While I was poking around I found that git is hard coded with

printf("From %s Mon Sep 17 00:00:00 2001\n", sha1);

Was it intentional that the date be hard coded like that?


Andy
-- 
Dr Andrew Parkins, M Eng (Hons), AMIEE
andyparkins@gmail.com

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git-imap-send and "From "
  2006-10-21 16:51 git-imap-send and "From " Andy Parkins
@ 2006-10-21 17:55 ` Jeff King
  2006-10-21 18:01   ` Jeff King
  2006-10-21 18:11   ` Andy Parkins
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff King @ 2006-10-21 17:55 UTC (permalink / raw)
  To: Andy Parkins; +Cc: git

On Sat, Oct 21, 2006 at 05:51:17PM +0100, Andy Parkins wrote:

> From 0e3c0aefc3276bd271553d171ed9bcc52d85230e Mon Sep 17 00:00:00 2001
> From: Andy Parkins <andyparkins@gmail.com>
> Date: Fri, 20 Oct 2006 15:24:40 +0100
> Subject: [PATCH] Use email address only for looking up signing key in git-tag
> 
> It's that first line that's the problem.  It was generated by
> git-format-patch of course, however, I assume that it was intended to
> be stripped on the way to the IMAP server.  So,

That makes sense; git-format-patch generates an mbox, not a raw message.

>  * Courier's /usr/bin/imapd should have stripped it and didn't
>  * git-imap-send shouldn't have sent it

git-imap-send shouldn't be sending it. The IMAP protocol works with
RFC822 messages, not mboxes.

> Can anyone help me out with which it should be?  Or point me at the relevant 
> RFC?

RFC2060, section 6.3.11 (APPEND).

-Peff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git-imap-send and "From "
  2006-10-21 17:55 ` Jeff King
@ 2006-10-21 18:01   ` Jeff King
  2006-10-21 18:11   ` Andy Parkins
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff King @ 2006-10-21 18:01 UTC (permalink / raw)
  To: Andy Parkins; +Cc: git

On Sat, Oct 21, 2006 at 01:55:19PM -0400, Jeff King wrote:

> git-imap-send shouldn't be sending it. The IMAP protocol works with
> RFC822 messages, not mboxes.

FWIW, I just checked and git-imap-send does the right thing; it strips
the 'From ' line before sending to the imap server.

-Peff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git-imap-send and "From "
  2006-10-21 17:55 ` Jeff King
  2006-10-21 18:01   ` Jeff King
@ 2006-10-21 18:11   ` Andy Parkins
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Parkins @ 2006-10-21 18:11 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

On Saturday 2006, October 21 18:55, Jeff King wrote:

> git-imap-send shouldn't be sending it. The IMAP protocol works with
> RFC822 messages, not mboxes.

I grabbed the latest git; and started looking at fixing it.  It looks fixed to 
me; a quick "git log imap-send.c" found me commit 
e0b0830726286287744cc9e1a629a534bbe75452; which already fixes this problem.

Goodness I love git :-)


Andy

-- 
Dr Andrew Parkins, M Eng (Hons), AMIEE
andyparkins@gmail.com

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-21 18:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-21 16:51 git-imap-send and "From " Andy Parkins
2006-10-21 17:55 ` Jeff King
2006-10-21 18:01   ` Jeff King
2006-10-21 18:11   ` Andy Parkins

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).