projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Filter out all Nmh-* headers in post(1). Do that silently for empty
[mmh]
/
uip
/
whatnowsbr.c
diff --git
a/uip/whatnowsbr.c
b/uip/whatnowsbr.c
index
316c2c9
..
121a79b
100644
(file)
--- a/
uip/whatnowsbr.c
+++ b/
uip/whatnowsbr.c
@@
-141,9
+141,9
@@
WhatNow (int argc, char **argv)
char **argp, **arguments;
struct stat st;
char *attach = NMH_ATTACH_HEADER;/* attachment header field name */
char **argp, **arguments;
struct stat st;
char *attach = NMH_ATTACH_HEADER;/* attachment header field name */
- char cwd[MAXPATHLEN + 1]; /* current working directory */
- char file[MAXPATHLEN + 1]; /* file name buffer */
- char shell[MAXPATHLEN + 1]; /* shell response buffer */
+ char cwd[PATH_MAX + 1]; /* current working directory */
+ char file[PATH_MAX + 1]; /* file name buffer */
+ char shell[PATH_MAX + 1]; /* shell response buffer */
FILE *f; /* read pointer for bgnd proc */
char *l; /* set on -l to alist command */
int n; /* set on -n to alist command */
FILE *f; /* read pointer for bgnd proc */
char *l; /* set on -l to alist command */
int n; /* set on -n to alist command */
@@
-605,6
+605,11
@@
system_in_dir(const char *dir, const char *cmd)
{
char olddir[BUFSIZ];
int r;
{
char olddir[BUFSIZ];
int r;
+
+ /* ensure that $SHELL exists, as the cmd was written relying on
+ a non-blank $SHELL... */
+ setenv("SHELL","/bin/sh",0); /* don't overwrite */
+
if (getcwd(olddir, sizeof(olddir)) == 0)
adios("getcwd", "could not get working directory");
if (chdir(dir) != 0)
if (getcwd(olddir, sizeof(olddir)) == 0)
adios("getcwd", "could not get working directory");
if (chdir(dir) != 0)
@@
-621,6
+626,11
@@
popen_in_dir(const char *dir, const char *cmd, const char *type)
{
char olddir[BUFSIZ];
FILE *f;
{
char olddir[BUFSIZ];
FILE *f;
+
+ /* ensure that $SHELL exists, as the cmd was written relying on
+ a non-blank $SHELL... */
+ setenv("SHELL","/bin/sh",0); /* don't overwrite */
+
if (getcwd(olddir, sizeof(olddir)) == 0)
adios("getcwd", "could not get working directory");
if (chdir(dir) != 0)
if (getcwd(olddir, sizeof(olddir)) == 0)
adios("getcwd", "could not get working directory");
if (chdir(dir) != 0)
@@
-1073,6
+1083,10
@@
static struct swit sendswitches[] = {
{ "tls", TLSminc(-3) },
#define NTLSSW 46
{ "notls", TLSminc(-5) },
{ "tls", TLSminc(-3) },
#define NTLSSW 46
{ "notls", TLSminc(-5) },
+#define MTSSW 47
+ { "mts smtp|sendmail/smtp|sendmail/pipe", 2 },
+#define MESSAGEIDSW 48
+ { "messageid localname|random", 2 },
{ NULL, 0 }
};
{ NULL, 0 }
};
@@
-1249,6
+1263,8
@@
sendit (char *sp, char **arg, char *file, int pushed)
case SASLMECHSW:
case USERSW:
case PORTSW:
case SASLMECHSW:
case USERSW:
case PORTSW:
+ case MTSSW:
+ case MESSAGEIDSW:
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]);