Code

send-email: Honour SMTP domain when using TLS
authorMatthew Daley <mattjd@gmail.com>
Sat, 15 Oct 2011 08:44:52 +0000 (04:44 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 16 Oct 2011 03:33:04 +0000 (20:33 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl

index 0f23ed380f93383fd3e085149e482be54964f789..6a17ed6d6149675444a9cc28a7e7300b644974d3 100755 (executable)
@@ -1015,7 +1015,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;
                                }