git: 9front

Download patch

ref: 4df698e435aa17132900f5a3ead066023cdea55a
parent: 21295c475fde0ab9665f4c1827d09e24213aaf97
author: Alex Musolino <alex@musolino.id.au>
date: Sun Jul 8 08:05:42 EDT 2018

upas/smtp: allow remote port to be set to something other than smtp (e.g. ssmtp)

--- a/sys/src/cmd/upas/smtp/mxdial.c
+++ b/sys/src/cmd/upas/smtp/mxdial.c
@@ -48,6 +48,8 @@
 	ds->service = strchr(ds->host, '!');
 	if(ds->service)
 		*ds->service++ = 0;
+	else
+		ds->service = "smtp";
 	if(*ds->host == '$')
 		expand(ds);
 }
@@ -293,7 +295,6 @@
 
 	dprint("mxdial(%s, %s, %s, mx)\n", addr, ddomain, gdomain);
 	memset(mx, 0, sizeof *mx);
-	addr = netmkaddr(addr, 0, "smtp");
 	d = mx->ds;
 	dialstringparse(addr, d + 0);
 	nd = 1;
--