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

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

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jul 4, 2013, 22:04 UTC
Message-ID
<1372975492-981035-1-git-send-email-sandals@crustytoothpaste.net>
From: "brian m. carlson" <sandals@crustytoothpaste.net>

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.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 git-send-email.perl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
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(),
+			$smtp_server_port ||= 25;
+			$smtp ||= Net::SMTP->new($smtp_server,
 						 Hello => $smtp_domain,
-						 Debug => $debug_net_smtp);
+						 Debug => $debug_net_smtp,
+						 Port => $smtp_server_port);
 			if ($smtp_encryption eq 'tls' && $smtp) {
 				require Net::SMTP::SSL;
 				$smtp->command('STARTTLS');
-- 
1.8.3.2.923.g2a18ff8.dirty
Next: Ramkumar Ramachandra
Message 1 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.