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

Re: [PATCH] Don't force imap.host to be set when imap.tunnel is set

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 22, 2008, 06:47 UTC
Message-ID
<7vbq424c8f.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<200804211459.07527.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
Show 18 quoted lines
> The documentation for git-imap-send suggests a tunnel setting such as
>
>   Tunnel = "ssh -q user@server.com /usr/bin/imapd ./Maildir 2> /dev/null"
>
> which works wonderfully and doesn't require a username, password or port
> setting.
>
> However, git-imap-send currently requires that the imap.host variable be
> set in the config even when it was unused.  This led me to have to put
> the following in my .gitconfig.
>
>  [imap]
>    host = dummy
>
> This patch changes imap-send to only require that the imap.host setting
> is set if imap.tunnel is _not_ set.
>
> Signed-off-by: Andy Parkins <andyparkins@gmail.com>

I am not an imap-send user myself, but is it the case that the use of imap.tunnel always makes imap.host useless/unnecessary and safe to be left as NULL?

My quick scan of imap-send.c suggests that
 * imap_open_store() does not look at host/port when tunnel is defined
   while connecting at the socket level;
 * however, when not preauth, "host" is used to issue error message when
   user is not set, and in prompt when pass needs to be asked.  I suspect
   you do not want to leave "host" NULL in this case.

Driving imapd standalone like the "tunnel" example you quoted above would trigger preauth behaviour, so that should be safe, but I suspect there are other ways to use tunnel to just relay the connection over the firewall, while still requiring the client to authenticate the same way as usual.

Previous: Andy ParkinsNext: Andy Parkins
Message 2 of 5 in “Don't force imap.host to be set when imap.tunnel is set”
  1. Don't force imap.host to be set when imap.tunnel is setAndy Parkins, Apr 21, 2008
  2. Junio C HamanoApr 22, 2008
  3. Andy ParkinsApr 22, 2008
  4. Jeff KingApr 22, 2008
  5. Andy ParkinsApr 22, 2008

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.