git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] send-email: provide port separately from hostname

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jul 4, 2013, 22:42 UTC
Message-ID
<CALkWK0mJAx+-iZ0e+jRQE14Vve=ea=fbzgmNEjUh5ANpDCriCA@mail.gmail.com>
In-Reply-To
<1372975492-981035-1-git-send-email-sandals@crustytoothpaste.net>
brian m. carlson wrote:
Show 9 quoted lines
> diff --git a/git-send-email.perl b/git-send-email.perl
> index bd13cc8..ca86a13 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1199,9 +1199,11 @@ X-Mailer: git-send-email $gitversion
>                 else {
>                         require Net::SMTP;
>                         $smtp_domain ||= maildomain();
> -                       $smtp ||= Net::SMTP->new(smtp_host_string(),

Hm, so the problem occurs when you give smtp_host_string() to Net::SMTP->new() as the first argument.

> +                       $smtp_server_port ||= 25;

So if smtp_host_string() returns a hostname without a port, then Net::SMTP->new() will connect to port 25 by default?

> If the SMTP port is provided as part of the hostname to Net::SMTP, it passes
> the combined string to the SASL provider; this causes GSSAPI authentication to
> fail since Kerberos does not want the port information.  Instead, pass the port
> as a separate argument as is done for SSL connections.

I need to be in a (firewalled?) network that uses Kerberos to reproduce this, right? Even if I can't reproduce it, the change seems to be fine.

While we're on the subject, do you know how to get rid of this huge ugly warning I get everytime I send emails?

*******************************************************************
 Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
 is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
 together with SSL_ca_file|SSL_ca_path for verification.
 If you really don't want to verify the certificate and keep the
 connection open to Man-In-The-Middle attacks please set
 SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.
*******************************************************************
  at /home/artagnon/src/git/git-send-email line 1200.
Thanks.
Previous: brian m. carlsonNext: brian m. carlson
Message 2 of 3 in “send-email: provide port separately from hostname”
  1. send-email: provide port separately from hostnamebrian m. carlson, Jul 4, 2013
  2. Ramkumar RamachandraJul 4, 2013
  3. brian m. carlsonJul 4, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.