-.TH POST %manext8% "April 14, 2013" "%nmhversion%"
+.TH POST %manext8% "July 8, 2014" "%nmhversion%"
.\"
.\" %nmhwarning%
.\"
The
.B \-notls
switch will disable all attempts to negotiate TLS.
+.PP
+If port 465 is specified and none of the TLS switches were enabled,
+.B \-initialtls
+will be implied if TLS support was compiled in. Though port 465 for
+SMTPS (SMTP over SSL) was deregistered by IANA in 1998, it is still
+used for that service.
.SH FILES
.fc ^ ~
.nf
.\"
.\" %nmhwarning%
.\"
-.TH SEND %manext1% "January 23, 2014" "%nmhversion%"
+.TH SEND %manext1% "July 8, 2014" "%nmhversion%"
.SH NAME
send \- send a message
.SH SYNOPSIS
.B \-notls
switch will disable all attempts to negotiate TLS.
.PP
+If port 465 is specified and none of the TLS switches were enabled,
+.B \-initialtls
+will be implied if TLS support was compiled in. Though port 465 for
+SMTPS (SMTP over SSL) was deregistered by IANA in 1998, it is still
+used for that service.
+.PP
The files specified by the profile entry \*(lqAliasfile:\*(rq and any
additional alias files given by the
.B \-alias
static char *saslmech=NULL; /* Force use of particular SASL mech */
static char *user=NULL; /* Authenticate as this user */
static char *port="submission"; /* Name of server port for SMTP submission */
-static int tls=0; /* Use TLS for encryption */
+static int tls=-1; /* Use TLS for encryption */
static int fromcount=0; /* Count of addresses on From: header */
static int seensender=0; /* Have we seen a Sender: header? */
envelope = from;
}
+ 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 we are doing a "whom" check */
if (whomsw) {
/* This won't work with MTS_SENDMAIL_PIPE. */