Skip to content

Commit 9d1ccf5

Browse files
rshearmangitster
authored andcommitted
git-send-email: Fix authenticating on some servers when using TLS.
Send HELO again after a successful STARTTLS command to refresh the list of extensions. These may be different to what is returned over a clear connection (for example the AUTH command may be accepted over a secure connection, but not over a clear connection). Furthermore, this behaviour is recommended by RFC 2487 (http://www.ietf.org/rfc/rfc2487.txt). Signed-off-by: Robert Shearman <robertshearman@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 607bb3f commit 9d1ccf5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

git-send-email.perl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,9 @@ sub send_message
773773
$smtp = Net::SMTP::SSL->start_SSL($smtp)
774774
or die "STARTTLS failed! ".$smtp->message;
775775
$smtp_encryption = '';
776+
# Send EHLO again to receive fresh
777+
# supported commands
778+
$smtp->hello();
776779
} else {
777780
die "Server does not support STARTTLS! ".$smtp->message;
778781
}

0 commit comments

Comments
 (0)