{"thread":{"id":"28686","subject":"[PATCH] send-email: Honour SMTP domain when using TLS","startedAt":"2011-10-15T08:44:52Z","lastAt":"2011-10-16T04:18:00Z","messageCount":3,"participants":["Matthew Daley","Junio C Hamano","Brian Gernhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"177718","messageId":"1318668292-13818-1-git-send-email-mattjd@gmail.com","threadId":"28686","inReplyTo":null,"subject":"[PATCH] send-email: Honour SMTP domain when using TLS","fromName":"Matthew Daley","fromEmail":"mattjd@gmail.com","sentAt":"2011-10-15T08:44:52Z","receivedAt":"2011-10-15T08:44:52Z","isPatch":true,"sender":{"key":"mattjd@gmail.com","avatar":null},"body":"git-send-email sends two SMTP EHLOs when using TLS encryption, however\nonly the first, unencrypted EHLO uses the SMTP domain that can be\noptionally specified by the user (--smtp-domain).  This is because the\ncall to hello() that produces the second, encrypted EHLO does not pass\nthe SMTP domain as an argument, and hence a default of\n'localhost.localdomain' is used instead.\n\nFix by passing in the SMTP domain in this call.\n\nSigned-off-by: Matthew Daley <mattjd@gmail.com>\n---\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 6885dfa..d491db9 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -1098,7 +1098,7 @@ X-Mailer: git-send-email $gitversion\n \t\t\t\t\t$smtp_encryption = '';\n \t\t\t\t\t# Send EHLO again to receive fresh\n \t\t\t\t\t# supported commands\n-\t\t\t\t\t$smtp->hello();\n+\t\t\t\t\t$smtp->hello($smtp_domain);\n \t\t\t\t} else {\n \t\t\t\t\tdie \"Server does not support STARTTLS! \".$smtp->message;\n \t\t\t\t}\n-- \n1.7.2.5\n"},{"id":"177755","messageId":"7v62jpvc8f.fsf@alter.siamese.dyndns.org","threadId":"28686","inReplyTo":"1318668292-13818-1-git-send-email-mattjd@gmail.com","subject":"Re: [PATCH] send-email: Honour SMTP domain when using TLS","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-16T03:36:48Z","receivedAt":"2011-10-16T03:36:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthew Daley <mattjd@gmail.com> writes:\n\n> git-send-email sends two SMTP EHLOs when using TLS encryption, however\n> only the first, unencrypted EHLO uses the SMTP domain that can be\n> optionally specified by the user (--smtp-domain).  This is because the\n> call to hello() that produces the second, encrypted EHLO does not pass\n> the SMTP domain as an argument, and hence a default of\n> 'localhost.localdomain' is used instead.\n>\n> Fix by passing in the SMTP domain in this call.\n>\n> Signed-off-by: Matthew Daley <mattjd@gmail.com>\n\nSounds sensible, thanks.\n\nBrian, who did 69cf7bf (send-email: Cleanup smtp-domain and add config,\n2010-04-10) to make the initial hello use $smtp_domain, could you take a\nquick look and an Ack?\n\n>  git-send-email.perl |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index 6885dfa..d491db9 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -1098,7 +1098,7 @@ X-Mailer: git-send-email $gitversion\n>  \t\t\t\t\t$smtp_encryption = '';\n>  \t\t\t\t\t# Send EHLO again to receive fresh\n>  \t\t\t\t\t# supported commands\n> -\t\t\t\t\t$smtp->hello();\n> +\t\t\t\t\t$smtp->hello($smtp_domain);\n>  \t\t\t\t} else {\n>  \t\t\t\t\tdie \"Server does not support STARTTLS! \".$smtp->message;\n>  \t\t\t\t}\n"},{"id":"177756","messageId":"B691D22B-2FB3-407B-A986-EECB97ED29B0@gernhardtsoftware.com","threadId":"28686","inReplyTo":"7v62jpvc8f.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] send-email: Honour SMTP domain when using TLS","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2011-10-16T04:18:00Z","receivedAt":"2011-10-16T04:18:00Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"\nOn Oct 15, 2011, at 11:36 PM, Junio C Hamano wrote:\n\n> Matthew Daley <mattjd@gmail.com> writes:\n> \n>> git-send-email sends two SMTP EHLOs when using TLS encryption, however\n>> only the first, unencrypted EHLO uses the SMTP domain that can be\n>> optionally specified by the user (--smtp-domain).  This is because the\n>> call to hello() that produces the second, encrypted EHLO does not pass\n>> the SMTP domain as an argument, and hence a default of\n>> 'localhost.localdomain' is used instead.\n>> \n>> Fix by passing in the SMTP domain in this call.\n>> \n>> Signed-off-by: Matthew Daley <mattjd@gmail.com>\n> \n> Sounds sensible, thanks.\n> \n> Brian, who did 69cf7bf (send-email: Cleanup smtp-domain and add config,\n> 2010-04-10) to make the initial hello use $smtp_domain, could you take a\n> quick look and an Ack?\n\nIt 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.\n\n~~ Brian"}]}