ref: ca946d7fb05d5fd954cd3b73d38090e378c294a8
parent: d88d59c3f43c4f53502796e25a2128090e52bb75
parent: 3a7aed5d6d3236a5b7a5d74a955dc34b82dc6ba1
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Thu Aug 1 23:24:49 EDT 2013
merge
--- a/sys/src/cmd/upas/smtp/smtp.c
+++ b/sys/src/cmd/upas/smtp/smtp.c
@@ -120,7 +120,8 @@
ARGBEGIN{case 'a':
tryauth = 1;
- trysecure = 1;
+ if(trysecure == 0)
+ trysecure = 1;
break;
case 'A': /* autistic: won't talk to us until we talk (Verizon) */
autistic = 1;
@@ -150,7 +151,8 @@
ping = 1;
break;
case 's':
- trysecure = 1;
+ if(trysecure == 0)
+ trysecure = 1;
break;
case 't':
trysecure = 2;
@@ -221,10 +223,8 @@
/* 10 minutes to get through the initial handshake */
atnotify(timeout, 1);
alarm(10*alarmscale);
- if(trysecure > 1 && (rv = wraptls()) != nil)
+ if((rv = hello(hellodomain, 0)) != 0)
goto error;
- if((rv = hello(hellodomain, trysecure > 1)) != 0)
- goto error;
alarm(10*alarmscale);
if((rv = mailfrom(s_to_c(from))) != 0)
goto error;
@@ -474,6 +474,12 @@
char *ret, *s, *t;
if (!encrypted) {+ if(trysecure > 1){+ if((ret = wraptls()) != nil)
+ return ret;
+ encrypted = 1;
+ }
+
/*
* Verizon fails to print the smtp greeting banner when it
* answers a call. Send a no-op in the hope of making it
--
⑨