projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change configure.in to emit a warning when an argument is given to
[mmh]
/
uip
/
post.c
diff --git
a/uip/post.c
b/uip/post.c
index
ba898a4
..
87e31e8
100644
(file)
--- a/
uip/post.c
+++ b/
uip/post.c
@@
-46,6
+46,12
@@
# define SASLminc(a) 0
#endif /* CYRUS_SASL */
# define SASLminc(a) 0
#endif /* CYRUS_SASL */
+#ifndef TLS_SUPPORT
+# define TLSminc(a) (a)
+#else /* TLS_SUPPORT */
+# define TLSminc(a) 0
+#endif /* TLS_SUPPORT */
+
#define FCCS 10 /* max number of fccs allowed */
#define uptolow(c) ((isalpha(c) && isupper (c)) ? tolower (c) : c)
#define FCCS 10 /* max number of fccs allowed */
#define uptolow(c) ((isalpha(c) && isupper (c)) ? tolower (c) : c)
@@
-140,6
+146,8
@@
static struct swit switches[] = {
{ "user", SASLminc(-4) },
#define PORTSW 40
{ "port server port name/number", 4 },
{ "user", SASLminc(-4) },
#define PORTSW 40
{ "port server port name/number", 4 },
+#define TLSSW 41
+ { "tls", TLSminc(-3) },
{ NULL, 0 }
};
{ NULL, 0 }
};
@@
-239,6
+247,7
@@
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 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 int tls=0; /* Use TLS for encryption */
static unsigned msgflags = 0; /* what we've seen */
static unsigned msgflags = 0; /* what we've seen */
@@
-526,6
+535,10
@@
main (int argc, char **argv)
if (!(port = *argp++) || *port == '-')
adios (NULL, "missing argument to %s", argp[-2]);
continue;
if (!(port = *argp++) || *port == '-')
adios (NULL, "missing argument to %s", argp[-2]);
continue;
+
+ case TLSSW:
+ tls++;
+ continue;
}
}
if (msg)
}
}
if (msg)
@@
-1415,7
+1428,7
@@
post (char *file, int bccque, int talk)
if (rp_isbad (retval = sm_init (clientsw, serversw, port, watch, verbose,
snoop, onex, queued, sasl, saslmech,
if (rp_isbad (retval = sm_init (clientsw, serversw, port, watch, verbose,
snoop, onex, queued, sasl, saslmech,
- user))
+ user, tls))
|| 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));
@@
-1454,7
+1467,7
@@
verify_all_addresses (int talk)
if (!whomsw || checksw)
if (rp_isbad (retval = sm_init (clientsw, serversw, port, watch,
verbose, snoop, 0, queued, sasl,
if (!whomsw || checksw)
if (rp_isbad (retval = sm_init (clientsw, serversw, port, watch,
verbose, snoop, 0, queued, sasl,
- saslmech, user))
+ saslmech, user, tls))
|| 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));