projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Feed fileproc and mhlproc from rcvdist, send, whatnow, and whom to post.
[mmh]
/
uip
/
whatnowsbr.c
diff --git
a/uip/whatnowsbr.c
b/uip/whatnowsbr.c
index
42e0d61
..
ad7570a
100644
(file)
--- a/
uip/whatnowsbr.c
+++ b/
uip/whatnowsbr.c
@@
-2,8
+2,6
@@
/*
* whatnowsbr.c -- the WhatNow shell
*
/*
* whatnowsbr.c -- the WhatNow shell
*
- * $Id$
- *
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
@@
-411,6
+409,11
@@
WhatNow (int argc, char **argv)
break;
}
break;
}
+ if (*(argp+1) == (char *)0) {
+ advise((char *)0, "attach command requires file argument(s).");
+ break;
+ }
+
/*
* Build a command line that causes the user's shell to list the file name
* arguments. This handles and wildcard expansion, tilde expansion, etc.
/*
* Build a command line that causes the user's shell to list the file name
* arguments. This handles and wildcard expansion, tilde expansion, etc.
@@
-634,7
+637,7
@@
editfile (char **ed, char **arg, char *file, int use, struct msgs *mp,
struct stat st;
#ifdef HAVE_LSTAT
struct stat st;
#ifdef HAVE_LSTAT
- int slinked;
+ int slinked = 0;
#if 0
int oumask; /* PJS: for setting permissions on symlinks. */
#endif
#if 0
int oumask; /* PJS: for setting permissions on symlinks. */
#endif
@@
-980,6
+983,12
@@
check_draft (char *msgnam)
# 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 */
+
static struct swit sendswitches[] = {
#define ALIASW 0
{ "alias aliasfile", 0 },
static struct swit sendswitches[] = {
#define ALIASW 0
{ "alias aliasfile", 0 },
@@
-1058,13
+1067,15
@@
static struct swit sendswitches[] = {
#define SASLMECHSW 37
{ "saslmech", SASLminc(-5) },
#define USERSW 38
#define SASLMECHSW 37
{ "saslmech", SASLminc(-5) },
#define USERSW 38
- { "user", SASLminc(4) },
+ { "user", SASLminc(-4) },
#define SNDATTACHSW 39
{ "attach file", 6 },
#define SNDATTACHFORMAT 40
{ "attachformat", 7 },
#define PORTSW 41
{ "port server-port-name/number", 4 },
#define SNDATTACHSW 39
{ "attach file", 6 },
#define SNDATTACHFORMAT 40
{ "attachformat", 7 },
#define PORTSW 41
{ "port server-port-name/number", 4 },
+#define TLSSW 42
+ { "tls", TLSminc(-3) },
{ NULL, 0 }
};
{ NULL, 0 }
};
@@
-1146,6
+1157,16
@@
sendit (char *sp, char **arg, char *file, int pushed)
vec[vecp++] = "-library";
vec[vecp++] = getcpy (m_maildir (""));
vec[vecp++] = "-library";
vec[vecp++] = getcpy (m_maildir (""));
+ if ((cp = context_find ("fileproc"))) {
+ vec[vecp++] = "-fileproc";
+ vec[vecp++] = cp;
+ }
+
+ if ((cp = context_find ("mhlproc"))) {
+ vec[vecp++] = "-mhlproc";
+ vec[vecp++] = cp;
+ }
+
while ((cp = *argp++)) {
if (*cp == '-') {
switch (smatch (++cp, sendswitches)) {
while ((cp = *argp++)) {
if (*cp == '-') {
switch (smatch (++cp, sendswitches)) {
@@
-1219,6
+1240,7
@@
sendit (char *sp, char **arg, char *file, int pushed)
case SOMLSW:
case SNOOPSW:
case SASLSW:
case SOMLSW:
case SNOOPSW:
case SASLSW:
+ case TLSSW:
vec[vecp++] = --cp;
continue;
vec[vecp++] = --cp;
continue;
@@
-1229,6
+1251,7
@@
sendit (char *sp, char **arg, char *file, int pushed)
case SERVSW:
case SASLMECHSW:
case USERSW:
case SERVSW:
case SASLMECHSW:
case USERSW:
+ case PORTSW:
vec[vecp++] = --cp;
if (!(cp = *argp++) || *cp == '-') {
advise (NULL, "missing argument to %s", argp[-2]);
vec[vecp++] = --cp;
if (!(cp = *argp++) || *cp == '-') {
advise (NULL, "missing argument to %s", argp[-2]);
@@
-1314,7
+1337,7
@@
sendit (char *sp, char **arg, char *file, int pushed)
#endif /* not lint */
&& altmsg) {
vec[vecp++] = "-dist";
#endif /* not lint */
&& altmsg) {
vec[vecp++] = "-dist";
- distfile = getcpy (m_scratch (altmsg, invo_name));
+ distfile = getcpy (m_mktemp2(altmsg, invo_name, NULL, NULL));
if (link (altmsg, distfile) == NOTOK)
adios (distfile, "unable to link %s to", altmsg);
} else {
if (link (altmsg, distfile) == NOTOK)
adios (distfile, "unable to link %s to", altmsg);
} else {