projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* mts/smtp/smtp.c: added SASL support if mts configuration
[mmh]
/
uip
/
post.c
diff --git
a/uip/post.c
b/uip/post.c
index
d99da1f
..
7546818
100644
(file)
--- a/
uip/post.c
+++ b/
uip/post.c
@@
-138,6
+138,8
@@
static struct swit switches[] = {
{ "saslmech", SASLminc(-5) },
#define USERSW 39
{ "user", SASLminc(-4) },
{ "saslmech", SASLminc(-5) },
#define USERSW 39
{ "user", SASLminc(-4) },
+#define PORTSW 40
+ { "port server port name/number", 4 },
{ NULL, 0 }
};
{ NULL, 0 }
};
@@
-236,6
+238,7
@@
static int nameoutput=0; /* putadr() has output header name */
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 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 */
static unsigned msgflags = 0; /* what we've seen */
@@
-518,6
+521,11
@@
main (int argc, char **argv)
if (!(user = *argp++) || *user == '-')
adios (NULL, "missing argument to %s", argp[-2]);
continue;
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 (msg)
@@
-639,7
+647,8
@@
main (int argc, char **argv)
if (verbose)
printf (partno ? "Partial Message #%s Processed\n" : "Message Processed\n",
partno);
if (verbose)
printf (partno ? "Partial Message #%s Processed\n" : "Message Processed\n",
partno);
- return done (0);
+ done (0);
+ return 1;
}
}
@@
-1402,7
+1411,7
@@
post (char *file, int bccque, int talk)
sigon ();
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)))
snoop, onex, queued, sasl, saslmech,
user))
|| rp_isbad (retval = sm_winit (smtpmode, from)))
@@
-1441,8
+1450,9
@@
verify_all_addresses (int talk)
sigon ();
if (!whomsw || checksw)
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));
|| rp_isbad (retval = sm_winit (smtpmode, from)))
die (NULL, "problem initializing server; %s", rp_string (retval));