]> git.ipfire.org Git - thirdparty/git.git/commit - git-send-email.perl
git-send-email.perl - try to give real name of the calling host to HELO/EHLO
authorJari Aalto <jari.aalto@cante.net>
Sun, 14 Mar 2010 15:16:45 +0000 (17:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 14 Mar 2010 20:02:47 +0000 (13:02 -0700)
commit134550fe21f2c70519b32cada993bfd0c644925b
tree50889054daa003f2b0b81062cd4907862220ecac
parentf60812efa3a790b0a2be389b7531a090d8369892
git-send-email.perl - try to give real name of the calling host to HELO/EHLO

Add new functions maildomain_net(), maildomain_mta() and
maildomain(), which return FQDN where possible for use in
send_message(). The value is passed to Net::SMTP HELO/EHLO
handshake. The domain name can also be set via new --smtp-domain
option.

The default value in Net::SMTP may not get through:

  Net::SMTP=GLOB(0x267ec28)>>> EHLO localhost.localdomain
  Net::SMTP=GLOB(0x267ec28)<<< 550 EHLO argument does not match calling host

whereas using the FQDN that matches the IP, the result is:

  Net::SMTP=GLOB(0x15b8e80)>>> EHLO host.example.com
  Net::SMTP=GLOB(0x15b8e80)<<< 250-host.example.com Hello host.example.com [192.168.1.7]

The maildomain*() code is based on ideas in Perl library
Test::Reporter by Graham Barr <gbarr@pobox.com> and Mark Overmeer
<mailtools@overmeer.net> released under the same terms as Perl
itself.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl