* [PATCH] send-email: Honour SMTP domain when using TLS
@ 2011-10-15 8:44 Matthew Daley
2011-10-16 3:36 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Daley @ 2011-10-15 8:44 UTC (permalink / raw)
To: git; +Cc: Matthew Daley
git-send-email sends two SMTP EHLOs when using TLS encryption, however
only the first, unencrypted EHLO uses the SMTP domain that can be
optionally specified by the user (--smtp-domain). This is because the
call to hello() that produces the second, encrypted EHLO does not pass
the SMTP domain as an argument, and hence a default of
'localhost.localdomain' is used instead.
Fix by passing in the SMTP domain in this call.
Signed-off-by: Matthew Daley <mattjd@gmail.com>
---
git-send-email.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 6885dfa..d491db9 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1098,7 +1098,7 @@ X-Mailer: git-send-email $gitversion
$smtp_encryption = '';
# Send EHLO again to receive fresh
# supported commands
- $smtp->hello();
+ $smtp->hello($smtp_domain);
} else {
die "Server does not support STARTTLS! ".$smtp->message;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] send-email: Honour SMTP domain when using TLS
2011-10-15 8:44 [PATCH] send-email: Honour SMTP domain when using TLS Matthew Daley
@ 2011-10-16 3:36 ` Junio C Hamano
2011-10-16 4:18 ` Brian Gernhardt
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2011-10-16 3:36 UTC (permalink / raw)
To: Matthew Daley; +Cc: git, Brian Gernhardt
Matthew Daley <mattjd@gmail.com> writes:
> git-send-email sends two SMTP EHLOs when using TLS encryption, however
> only the first, unencrypted EHLO uses the SMTP domain that can be
> optionally specified by the user (--smtp-domain). This is because the
> call to hello() that produces the second, encrypted EHLO does not pass
> the SMTP domain as an argument, and hence a default of
> 'localhost.localdomain' is used instead.
>
> Fix by passing in the SMTP domain in this call.
>
> Signed-off-by: Matthew Daley <mattjd@gmail.com>
Sounds sensible, thanks.
Brian, who did 69cf7bf (send-email: Cleanup smtp-domain and add config,
2010-04-10) to make the initial hello use $smtp_domain, could you take a
quick look and an Ack?
> git-send-email.perl | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 6885dfa..d491db9 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1098,7 +1098,7 @@ X-Mailer: git-send-email $gitversion
> $smtp_encryption = '';
> # Send EHLO again to receive fresh
> # supported commands
> - $smtp->hello();
> + $smtp->hello($smtp_domain);
> } else {
> die "Server does not support STARTTLS! ".$smtp->message;
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] send-email: Honour SMTP domain when using TLS
2011-10-16 3:36 ` Junio C Hamano
@ 2011-10-16 4:18 ` Brian Gernhardt
0 siblings, 0 replies; 3+ messages in thread
From: Brian Gernhardt @ 2011-10-16 4:18 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Matthew Daley, git
On Oct 15, 2011, at 11:36 PM, Junio C Hamano wrote:
> Matthew Daley <mattjd@gmail.com> writes:
>
>> git-send-email sends two SMTP EHLOs when using TLS encryption, however
>> only the first, unencrypted EHLO uses the SMTP domain that can be
>> optionally specified by the user (--smtp-domain). This is because the
>> call to hello() that produces the second, encrypted EHLO does not pass
>> the SMTP domain as an argument, and hence a default of
>> 'localhost.localdomain' is used instead.
>>
>> Fix by passing in the SMTP domain in this call.
>>
>> Signed-off-by: Matthew Daley <mattjd@gmail.com>
>
> Sounds sensible, thanks.
>
> Brian, who did 69cf7bf (send-email: Cleanup smtp-domain and add config,
> 2010-04-10) to make the initial hello use $smtp_domain, could you take a
> quick look and an Ack?
It does look sensible to me, but I wasn't the one who added all the HELO work. I mostly was mucking about with variable names and how they got set. Jari Aalto added them originally in 134550f.
~~ Brian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-16 4:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-15 8:44 [PATCH] send-email: Honour SMTP domain when using TLS Matthew Daley
2011-10-16 3:36 ` Junio C Hamano
2011-10-16 4:18 ` Brian Gernhardt
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).