shithub: riscv

Download patch

ref: 259a31e59baf7a3e29b7d62d59822b9114b3f805
parent: e181b7e40532f8cfc4d0d92d1d7ef437227bf281
author: Alex Musolino <[email protected]>
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;