+ if (tls == -1) {
+#ifdef TLS_SUPPORT
+ /*
+ * The user didn't specify any of the tls switches. Try to
+ * help them by implying -initialtls if they're using port 465
+ * (smtps, until IANA revoked that registration in 1998).
+ */
+ tls = ! strcmp (port, "465") || ! strcasecmp (port, "smtps")
+ ? 2
+ : 0;
+#else /* ! TLS_SUPPORT */
+ tls = 0;
+#endif /* ! TLS_SUPPORT */
+ }
+
+ if (tls == 1)
+ tlsflag = S_STARTTLS;
+ else if (tls == 2)
+ tlsflag = S_INITTLS;
+ else
+ tlsflag = 0;
+
+ if (noverify)
+ tlsflag |= S_NOVERIFY;
+
+ /*
+ * If we were given any oauth flags, store the appropriate profile
+ * entries and make sure an authservice was given (we have to do this
+ * here because we aren't guaranteed the authservice will be given on
+ * the command line before the other OAuth flags are given).
+ */
+
+ if (oauth_flag) {
+ int i;
+ char sbuf[128];
+
+ if (auth_svc == NULL) {
+ adios(NULL, "No authentication service given with -authservice");
+ }
+
+ for (i = 0; oauthswitches[i].profname != NULL; i++) {
+ if (oauthswitches[i].value != NULL) {
+ snprintf(sbuf, sizeof(sbuf),
+ oauthswitches[i].profname, auth_svc);
+ sbuf[sizeof(sbuf) - 1] = '\0';
+ add_profile_entry(sbuf, oauthswitches[i].value);
+ }
+ }
+ }
+