{ "saslmech", SASLminc(-5) },
#define USERSW 39
{ "user", SASLminc(-4) },
+#define PORTSW 40
+ { "port server port name/number", 4 },
{ NULL, 0 }
};
static int sasl=0; /* Use SASL auth for SMTP */
static char *saslmech=NULL; /* Force use of particular SASL mech */
static char *user=NULL; /* Authenticate as this user */
+static char *port="smtp"; /* Name of server port for SMTP */
static unsigned msgflags = 0; /* what we've seen */
if (!(user = *argp++) || *user == '-')
adios (NULL, "missing argument to %s", argp[-2]);
continue;
+
+ case PORTSW:
+ if (!(port = *argp++) || *port == '-')
+ adios (NULL, "missing argument to %s", argp[-2]);
+ continue;
}
}
if (msg)
if (verbose)
printf (partno ? "Partial Message #%s Processed\n" : "Message Processed\n",
partno);
- return done (0);
+ done (0);
+ return 1;
}
sigon ();
- if (rp_isbad (retval = sm_init (clientsw, serversw, watch, verbose,
+ if (rp_isbad (retval = sm_init (clientsw, serversw, port, watch, verbose,
snoop, onex, queued, sasl, saslmech,
user))
|| rp_isbad (retval = sm_winit (smtpmode, from)))
sigon ();
if (!whomsw || checksw)
- if (rp_isbad (retval = sm_init (clientsw, serversw, watch, verbose, snoop, 0,
- queued, sasl, saslmech, user))
+ if (rp_isbad (retval = sm_init (clientsw, serversw, port, watch,
+ verbose, snoop, 0, queued, sasl,
+ saslmech, user))
|| rp_isbad (retval = sm_winit (smtpmode, from)))
die (NULL, "problem initializing server; %s", rp_string (retval));