OBS User unknown 2006-12-18 23:17:04 +00:00 committed by Git OBS Bridge
commit f31125a2f6
12 changed files with 1536 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

67
mailx-12.1-mime.dif Normal file
View File

@ -0,0 +1,67 @@
--- mime.c
+++ mime.c 2006-07-20 13:42:19.000000000 +0200
@@ -758,7 +758,7 @@ mime_isclean(FILE *f)
} else if (c == '\0') {
isclean |= MIME_HASNUL;
break;
- } else if ((c < 040 && (c != '\t' && c != '\f')) || c == 0177) {
+ } else if ((c < 040 && (c != '\t' && c != '\f' && c != '\b')) || c == 0177) {
isclean |= MIME_CTRLCHAR;
}
} while (c != EOF);
@@ -825,6 +825,8 @@ get_mime_convert(FILE *fp, char **conten
* ^I or ^L in text/plain bodies. However, some
* obscure character sets actually contain these
* characters, so the content type can be set.
+ * Beside ^I or ^L from RFC 2046 we accept also
+ * backspace ^H often used in enhanced text.
*/
if ((*contenttype = value("contenttype-cntrl")) == NULL)
*contenttype = "application/octet-stream";
--- sendout.c
+++ sendout.c 2006-09-27 12:22:06.000000000 +0200
@@ -433,7 +433,7 @@ infix(struct header *hp, FILE *fi, int d
iconvd = (iconv_t)-1;
}
if ((isclean & (MIME_HASNUL|MIME_CTRLCHAR)) == 0 &&
- isclean & MIME_HIGHBIT &&
+ isclean & MIME_HIGHBIT && ascncasecmp(tcs, "ANSI_X3.4", 9) &&
charset != NULL && asccasecmp(charset, tcs)) {
if (iconvd != (iconv_t)-1)
iconv_close(iconvd);
@@ -1128,8 +1128,9 @@ puthead(struct header *hp, FILE *fo, enu
return 1;
if ((addr = hp->h_organization) != NULL ||
(addr = value("ORGANIZATION")) != NULL) {
+ size_t len = strlen(addr);
fwrite("Organization: ", sizeof (char), 14, fo);
- if (mime_write(addr, sizeof *addr, strlen(addr), fo,
+ if (len && mime_write(addr, sizeof *addr, len, fo,
action == SEND_TODISP ?
CONV_NONE:CONV_TOHDR,
action == SEND_TODISP ?
@@ -1174,9 +1175,10 @@ puthead(struct header *hp, FILE *fo, enu
if (hp->h_subject != NULL && w & GSUBJECT) {
fwrite("Subject: ", sizeof (char), 9, fo);
if (ascncasecmp(hp->h_subject, "re: ", 4) == 0) {
+ size_t len = strlen(hp->h_subject + 4);
fwrite("Re: ", sizeof (char), 4, fo);
- if (mime_write(hp->h_subject + 4, sizeof *hp->h_subject,
- strlen(hp->h_subject + 4),
+ if (len && mime_write(hp->h_subject + 4,
+ sizeof *hp->h_subject, len,
fo, action == SEND_TODISP ?
CONV_NONE:CONV_TOHDR,
action == SEND_TODISP ?
@@ -1184,8 +1186,9 @@ puthead(struct header *hp, FILE *fo, enu
NULL, (size_t)0) == 0)
return 1;
} else if (*hp->h_subject) {
- if (mime_write(hp->h_subject, sizeof *hp->h_subject,
- strlen(hp->h_subject),
+ size_t len = strlen(hp->h_subject);
+ if (len && mime_write(hp->h_subject,
+ sizeof *hp->h_subject, len,
fo, action == SEND_TODISP ?
CONV_NONE:CONV_TOHDR,
action == SEND_TODISP ?

231
mailx-12.1-replyto.patch Normal file
View File

@ -0,0 +1,231 @@
--- collect.c
+++ collect.c 2006-07-20 13:21:32.000000000 +0200
@@ -718,7 +718,7 @@ cont:
* Grab a bunch of headers.
*/
do
- grabh(hp, GTO|GSUBJECT|GCC|GBCC,
+ grabh(hp, GTO|GSUBJECT|GCC|GBCC|GREPLYTO,
value("bsdcompat") != NULL &&
value("bsdorder") != NULL);
while (hp->h_to == NULL);
@@ -741,13 +741,21 @@ cont:
break;
case 's':
/*
- * Set the Subject list.
+ * Set the Subject line.
*/
cp = &linebuf[2];
while (whitechar(*cp & 0377))
cp++;
hp->h_subject = savestr(cp);
break;
+ case 'R':
+ /*
+ * Add to the Reply-To list.
+ */
+ cp = &linebuf[2];
+ while ((hp->h_replyto = checkaddrs(cat(hp->h_replyto,
+ sextract(&linebuf[2], GREPLYTO|GFULL))))
+ == NULL);
case '@':
/*
* Edit the attachment list.
--- def.h
+++ def.h 2006-07-20 13:21:32.000000000 +0200
@@ -393,7 +393,7 @@ enum gfield {
GUA = 128, /* User-Agent field */
GMIME = 256, /* MIME 1.0 fields */
GMSGID = 512, /* a Message-ID */
- /* 1024 */ /* unused */
+ GREPLYTO= 1024, /* a Reply-To field */
GIDENT = 2048, /* From:, Reply-To: and Organization: field */
GREF = 4096, /* References: field */
GDATE = 8192, /* Date: field */
@@ -403,7 +403,7 @@ enum gfield {
GFILES = 131072 /* include filename addresses */
};
-#define GMASK (GTO|GSUBJECT|GCC|GBCC) /* Mask of places from whence */
+#define GMASK (GTO|GSUBJECT|GCC|GBCC|GREPLYTO) /* Mask of places from whence */
#define visible(mp) (((mp)->m_flag&(MDELETED|MHIDDEN|MKILL))==0|| \
dot==(mp) && (mp)->m_flag&MKILL)
--- extern.h
+++ extern.h 2006-07-20 13:21:32.000000000 +0200
@@ -456,7 +456,8 @@ int send(struct message *mp, FILE *obuf,
char *makeboundary(void);
int mail(struct name *to, struct name *cc, struct name *bcc,
struct name *smopts, char *subject, struct attachment *attach,
- char *quotefile, int recipient_record, int tflag);
+ char *quotefile, int recipient_record, int tflag,
+ struct name * replyto);
int sendmail(void *v);
int Sendmail(void *v);
enum okay mail1(struct header *hp, int printheaders, struct message *quote,
--- mailx.1
+++ mailx.1 2006-07-20 13:23:09.000000000 +0200
@@ -43,7 +43,7 @@ mailx \- send and receive Internet mail
.PD 0
.HP
.ad l
-\fBmailx\fR [\fB\-BDdFintv~\fR]
+\fBmailx\fR [\fB\-BDdFintv~\fR] [\fB\-R\fI\ address\fR ]
[\fB\-s\fI\ subject\fR] [\fB\-a\fI\ attachment\fR ]
[\fB\-c\fI\ cc-addr\fR] [\fB\-b\fI\ bcc-addr\fR] [\fB\-r\fI\ from-addr\fR]
[\fB\-h\fI\ hops\fR]
@@ -192,8 +192,12 @@ it is recommended to set the
.I from
variable directly instead.
.TP
+.BI \-R\ \fR|\fB\ \-R \ address
+Without any argument any folders will be opened read-only.
+With argument an reply-to adress is specifed on command line.
+Only the first argument after the
.B \-R
-Opens any folders read-only.
+flag is used as the address.
.TP
.BI \-s \ subject
Specify subject on command line (only the first argument after the
@@ -2104,6 +2108,9 @@ copying the message to
`dead.letter' in the user's home directory
if save is set.
.TP
+.BI ~R string
+Use string as the Reply-To field.
+.TP
.BI ~r filename
Read the named file into the message.
.TP
--- main.c
+++ main.c 2006-07-20 13:37:02.000000000 +0200
@@ -52,6 +52,11 @@ static char sccsid[] = "@(#)main.c 2.48
* Note: We set egid to realgid ... and only if we need the egid we will
* switch back temporary. Nevertheless, I do not like seg faults.
* Werner Fink, <werner@suse.de>
+ * ---
+ * We want to set reply-to on the command line to deal with antispam rules
+ * and adresses behind firewalls.
+ * 2000-07-19, poc@pocnet.net
+ * Changes by werner@suse.de (move Option r to R, make ~R work)
*/
@@ -86,9 +91,9 @@ static void setscreensize(int dummy);
int
main(int argc, char *argv[])
{
- const char optstr[] = "A:BHFINVT:RS:a:b:c:dDefh:inqr:s:tu:v~";
+ const char optstr[] = "A:BHFINVT:R\rS:a:b:c:dDefh:inqr:s:tu:v~";
int i, existonly = 0, headersonly = 0, sendflag = 0;
- struct name *to, *cc, *bcc, *smopts;
+ struct name *to, *cc, *bcc, *smopts, *replyto;
struct attachment *attach;
char *subject, *cp, *ef, *qf = NULL, *fromaddr = NULL, *Aflag = NULL;
char nosrc = 0;
@@ -175,6 +180,26 @@ main(int argc, char *argv[])
attach = NULL;
smopts = NULL;
subject = NULL;
+ replyto = NULL;
+
+ if (*argv) {
+ /*
+ * Use -R option for send and folder mode. In folder mode -R is used
+ * for read only and in send mode for providing a reply-to address.
+ */
+ char **opt = argv;
+ while (*(++opt) && (**opt)) {
+ char *cp = *opt;
+ if (*cp == '-' && *(cp+1) == 'R') {
+ if (*(cp+2) == 0) {
+ if (*(++opt) && (**opt) && (**opt != '-'))
+ *(cp+1) = '\r';
+ }
+ break;
+ }
+ }
+ }
+
while ((i = getopt(argc, argv, optstr)) != EOF) {
switch (i) {
case 'V':
@@ -339,13 +364,20 @@ main(int argc, char *argv[])
case 'A':
Aflag = optarg;
break;
+ case '\r':
+ /*
+ * Set the Reply-to Address (as who we send mail)
+ */
+ if (optarg && *optarg)
+ replyto = checkaddrs(cat(replyto, extract(optarg, GREPLYTO|GFULL)));
+ break;
case 'R':
Rflag = 1;
break;
case '?':
usage:
fprintf(stderr, catgets(catd, CATSET, 135,
-"Usage: %s -eiIUdFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname);
+"Usage: %s -eiIUdFntBDNHV~ [ -R | -R reply-address ] -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname);
exit(2);
}
}
@@ -379,6 +411,10 @@ usage:
fprintf(stderr, "The -R option is meaningless in send mode.\n");
goto usage;
}
+ if (replyto && to == NULL) {
+ fprintf(stderr, "The reply-to is meaningless not in send mode.\n");
+ goto usage;
+ }
if (Iflag && ef == NULL) {
fprintf(stderr, catgets(catd, CATSET, 204,
"Need -f with -I.\n"));
@@ -427,7 +463,7 @@ usage:
if (fromaddr)
assign("from", fromaddr);
if (!rcvmode) {
- mail(to, cc, bcc, smopts, subject, attach, qf, Fflag, tflag);
+ mail(to, cc, bcc, smopts, subject, attach, qf, Fflag, tflag, replyto);
/*
* why wait?
*/
--- sendout.c
+++ sendout.c 2006-07-20 13:21:39.000000000 +0200
@@ -638,7 +638,8 @@ savemail(char *name, FILE *fi)
int
mail(struct name *to, struct name *cc, struct name *bcc,
struct name *smopts, char *subject, struct attachment *attach,
- char *quotefile, int recipient_record, int tflag)
+ char *quotefile, int recipient_record, int tflag,
+ struct name *replyto)
{
struct header head;
struct str in, out;
@@ -655,6 +656,7 @@ mail(struct name *to, struct name *cc, s
head.h_to = to;
head.h_cc = cc;
head.h_bcc = bcc;
+ head.h_replyto = replyto;
}
head.h_attach = attach;
head.h_smopts = smopts;
--- tty.c
+++ tty.c 2006-07-20 13:21:39.000000000 +0200
@@ -338,6 +338,12 @@ grabh(struct header *hp, enum gfield gfl
hp->h_organization = rtty_internal("Organization: ",
hp->h_organization);
}
+ if (gflags & GREPLYTO) {
+ TTYSET_CHECK(hp->h_replyto)
+ hp->h_replyto = checkaddrs(sextract(rtty_internal("Reply-To: ",
+ detract(hp->h_replyto, comma)),
+ GREPLYTO|GFULL));
+ }
if (!subjfirst)
GRAB_SUBJECT
out:

492
mailx-12.1.dif Normal file
View File

@ -0,0 +1,492 @@
--- .pkgextract
+++ .pkgextract 2006-07-20 13:42:19.000000000 +0200
@@ -0,0 +1,5 @@
+patch -p 0 -s --suffix=".path" < ../nail-11.25-path.dif
+patch -p 0 -s --suffix=".rplyto" < ../mailx-12.1-replyto.patch
+patch -p 0 -s --suffix=".ttychr" < ../nail-11.25-ttychar.dif
+patch -p 0 -s --suffix=".toaddr" < ../nail-11.25-toaddr.dif
+patch -p 0 -s --suffix=".mime" < ../mailx-12.1-mime.dif
--- Makefile
+++ Makefile 2006-07-20 14:18:51.000000000 +0200
@@ -10,6 +10,7 @@ PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man
SYSCONFDIR = /etc
+MAILRC = /etc/mail.rc
DESTDIR =
@@ -91,7 +92,7 @@ config.h LIBS:
install: all
test -d $(DESTDIR)$(BINDIR) || mkdir -p $(DESTDIR)$(BINDIR)
- $(UCBINSTALL) -c -s mailx $(DESTDIR)$(BINDIR)/mailx
+ $(UCBINSTALL) -c mailx $(DESTDIR)$(BINDIR)/mailx
test -d $(DESTDIR)$(MANDIR)/man1 || mkdir -p $(DESTDIR)$(MANDIR)/man1
$(UCBINSTALL) -c -m 644 mailx.1 $(DESTDIR)$(MANDIR)/man1/mailx.1
test -d $(DESTDIR)$(SYSCONFDIR) || mkdir -p $(DESTDIR)$(SYSCONFDIR)
--- aux.c
+++ aux.c 2006-07-20 13:42:19.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)aux.c 2.83 (
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <sys/stat.h>
--- base64.c
+++ base64.c 2006-07-20 13:42:19.000000000 +0200
@@ -33,6 +33,7 @@ static char sccsid[] = "@(#)base64.c 2.1
* base64 functions
*/
+#include "config.h"
#include "rcv.h"
#include "extern.h"
--- cmd1.c
+++ cmd1.c 2006-07-20 13:42:19.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmd1.c 2.96
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#ifdef HAVE_WCWIDTH
--- cmd2.c
+++ cmd2.c 2006-07-20 13:42:19.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmd2.c 2.46
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <sys/wait.h>
--- cmd3.c
+++ cmd3.c 2006-07-20 13:42:19.000000000 +0200
@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)cmd3.c 2.83
#include <math.h>
#include <float.h>
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <unistd.h>
--- cmdtab.c
+++ cmdtab.c 2006-07-20 13:42:19.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmdtab.c 2.5
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
--- collect.c
+++ collect.c 2006-07-20 13:42:19.000000000 +0200
@@ -49,6 +49,7 @@ static char sccsid[] = "@(#)collect.c 2.
* ~ escapes.
*/
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <unistd.h>
--- dotlock.c
+++ dotlock.c 2006-07-20 13:42:19.000000000 +0200
@@ -38,6 +38,7 @@ static char sccsid[] = "@(#)dotlock.c 2.
#endif
#endif
+#include "config.h"
#include "rcv.h"
#include <sys/stat.h>
#include <unistd.h>
--- edit.c
+++ edit.c 2006-07-20 13:42:19.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)edit.c 2.24
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <sys/stat.h>
--- fio.c
+++ fio.c 2006-07-20 13:42:19.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)fio.c 2.70 (
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include <sys/stat.h>
#include <sys/file.h>
--- getname.c
+++ getname.c 2006-07-20 13:42:19.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)getname.c 2.
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include <pwd.h>
#include "extern.h"
--- head.c
+++ head.c 2006-07-20 13:42:19.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)head.c 2.17
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <time.h>
--- hmac.c
+++ hmac.c 2006-07-20 13:42:19.000000000 +0200
@@ -32,6 +32,7 @@ Appendix -- Sample Code
/* Sccsid @(#)hmac.c 1.8 (gritter) 3/4/06 */
+#include "config.h"
#include "rcv.h"
#include "md5.h"
--- imap_gssapi.c
+++ imap_gssapi.c 2006-07-20 13:42:19.000000000 +0200
@@ -73,6 +73,8 @@ static char sccsid[] = "@(#)imap_gssapi.
#endif
#endif /* not lint */
+#include "config.h"
+
/*
* Implementation of IMAP GSSAPI authentication according to RFC 1731.
*/
--- lex.c
+++ lex.c 2006-07-20 13:42:19.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)lex.c 2.85 (
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <errno.h>
--- list.c
+++ list.c 2006-07-20 13:42:19.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)list.c 2.60
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include <ctype.h>
#include "extern.h"
--- mail.rc
+++ mail.rc 2006-07-20 13:42:19.000000000 +0200
@@ -0,0 +1,2 @@
+set asksub append dot save crt=20
+ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via
--- mailx.1
+++ mailx.1 2006-07-20 13:42:22.000000000 +0200
@@ -164,7 +164,7 @@ Only applicable in combination with
.IR \-f .
.TP
.B \-n
-Inhibits reading /etc/nail.rc upon startup.
+Inhibits reading /etc/mail.rc upon startup.
This option should be activated for
.I mailx
scripts that are invoked on more than one machine,
@@ -3062,7 +3062,7 @@ in the user's home directory.
The name of an optional startup file
to be read after ~/.mailrc.
This variable is ignored if it is imported from the environment;
-it has an effect only if it is set in /etc/nail.rc or ~/.mailrc
+it has an effect only if it is set in /etc/mail.rc or ~/.mailrc
to allow bypassing the configuration with e. g. `MAILRC=/dev/null'.
Use this file for commands
that are not understood by other mailx implementations.
@@ -3637,7 +3637,7 @@ Used as directory for temporary files in
~/.mailrc
File giving initial commands.
.TP
-/etc/nail.rc
+/etc/mail.rc
System wide initialization file.
.TP
~/.mime.types
--- main.c
+++ main.c 2006-07-20 14:13:32.000000000 +0200
@@ -92,7 +92,7 @@ int
main(int argc, char *argv[])
{
const char optstr[] = "A:BHFINVT:R\rS:a:b:c:dDefh:inqr:s:tu:v~";
- int i, existonly = 0, headersonly = 0, sendflag = 0;
+ int i, existonly = 0, headersonly = 0, sendflag = 0, err = 1;
struct name *to, *cc, *bcc, *smopts, *replyto;
struct attachment *attach;
char *subject, *cp, *ef, *qf = NULL, *fromaddr = NULL, *Aflag = NULL;
@@ -394,8 +394,11 @@ main(int argc, char *argv[])
case '?':
usage:
fprintf(stderr, catgets(catd, CATSET, 135,
-"Usage: %s -eiIUdFntBDNHV~ [ -R | -R reply-address ] -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname);
- exit(2);
+"Usage: %s [-BDFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr]\n\
+ [-r from-addr] [-h hops] [-A account] [-R reply-addr] [-S option] to-addr ...\n\
+ %s [-BDeHiInNRv~] [-T name] [-A account] -f [name] [-S option]\n\
+ %s [-BDeinNRv~] [-A account] [-u user] [-S option]\n"), progname, progname, progname);
+ exit(err);
}
}
if (ef != NULL) {
@@ -436,11 +439,13 @@ usage:
goto usage;
}
if (Rflag && to != NULL) {
- fprintf(stderr, "The -R option is meaningless in send mode.\n");
+ fprintf(stderr, catgets(catd, CATSET, 269,
+ "The -R option is meaningless in send mode.\n"));
goto usage;
}
if (replyto && to == NULL) {
- fprintf(stderr, "The reply-to is meaningless not in send mode.\n");
+ fprintf(stderr, catgets(catd, CATSET, 270,
+ "The reply-to is meaningless not in send mode.\n"));
goto usage;
}
if (Iflag && ef == NULL) {
--- makeconfig
+++ makeconfig 2006-07-20 13:42:19.000000000 +0200
@@ -298,23 +298,49 @@ int main(void)
'for socket functionality in libsocket and libnsl' \
'#define HAVE_SOCKETS' '-lsocket -lnsl'
-#link_check 'for IPv6 functionality' '#define HAVE_IPv6_FUNCS' <<\!
-##include "config.h"
-##include <sys/types.h>
-##include <sys/socket.h>
-##include <netdb.h>
-##include <netinet/in.h>
-##ifdef HAVE_ARPA_INET_H
-##include <arpa/inet.h>
-##endif /* HAVE_ARPA_INET_H */
-#
-#int main(void)
-#{
-# struct addrinfo a, *ap;
-# getaddrinfo("foo", "0", &a, &ap);
-# return 0;
-#}
-#!
+
+cat >$tmp1.c <<\!
+#include "config.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif /* HAVE_ARPA_INET_H */
+
+int main()
+{
+ struct addrinfo a, *ap;
+ getaddrinfo("foo", "0", &a, &ap);
+ return 0;
+}
+!
+
+cat >$tmp2.c <<\!
+#include "config.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif /* HAVE_ARPA_INET_H */
+
+int main()
+{
+ struct sockaddr a;
+ getnameinfo(&a, 0, "foo", 3, "bar", 3, NI_NUMERICHOST);
+ return 0;
+}
+!
+
+<$tmp1.c link_check 'for IPv6 functionality getaddrinfo' '#define HAVE_GETADDRINFO' &&
+ <$tmp2.c link_check 'for IPv6 functionality getnameinfo' '#define HAVE_GETNAMEINFO'
+echo \
+'#if defined(HAVE_GETADDRINFO) && defined(HAVE_GETNAMEINFO)
+# define HAVE_IPv6_FUNCS
+#endif' >>$out
link_check 'for Network Security Services (NSS)' '#define USE_SSL
#define USE_NSS' '-lsmime3 -lnss3 -lssl3 -lnspr4 -lplc4' <<\! || \
--- md5.c
+++ md5.c 2006-07-20 13:42:19.000000000 +0200
@@ -33,6 +33,7 @@ documentation and/or software.
/* Sccsid @(#)md5.c 1.8 (gritter) 3/4/06 */
+#include "config.h"
#include "rcv.h"
#include "md5.h"
--- mime.c
+++ mime.c 2006-07-20 13:42:19.000000000 +0200
@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)mime.c 2.66
#endif /* DOSCCS */
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <ctype.h>
--- names.c
+++ names.c 2006-07-20 13:42:22.000000000 +0200
@@ -48,6 +48,7 @@ static char sccsid[] = "@(#)names.c 2.22
* Handle name lists.
*/
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <sys/stat.h>
--- nsserr.c
+++ nsserr.c 2006-07-20 13:42:22.000000000 +0200
@@ -29,6 +29,7 @@
/* "@(#)nsserr.c 1.3 (gritter) 3/4/06" */
+#include "config.h"
#include <sslerr.h>
#include <secerr.h>
--- popen.c
+++ popen.c 2006-07-20 13:42:22.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)popen.c 2.20
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <sys/stat.h>
--- quit.c
+++ quit.c 2006-07-20 13:42:22.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)quit.c 2.28
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <stdio.h>
--- send.c
+++ send.c 2006-07-20 13:42:22.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)send.c 2.83
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <time.h>
--- sendout.c
+++ sendout.c 2006-07-20 13:42:22.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)sendout.c 2.
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <errno.h>
--- smtp.c
+++ smtp.c 2006-07-20 13:42:22.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)smtp.c 2.38
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include <sys/utsname.h>
--- strings.c
+++ strings.c 2006-07-20 13:42:22.000000000 +0200
@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)strings.c 2.
* loop each time, so they need not be freed.
*/
+#include "config.h"
#include "rcv.h"
#include "extern.h"
--- temp.c
+++ temp.c 2006-07-20 13:42:22.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)temp.c 2.8 (
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <errno.h>
--- tty.c
+++ tty.c 2006-07-20 13:42:22.000000000 +0200
@@ -48,6 +48,7 @@ static char sccsid[] = "@(#)tty.c 2.28 (
* Generally useful tty stuff.
*/
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <errno.h>
--- v7.local.c
+++ v7.local.c 2006-07-20 13:42:22.000000000 +0200
@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)v7.local.c 2
* Local routines that are installation dependent.
*/
+#include "config.h"
#include "rcv.h"
#include "extern.h"
#include <sys/stat.h>
--- vars.c
+++ vars.c 2006-07-20 13:42:22.000000000 +0200
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)vars.c 2.11
#endif
#endif /* not lint */
+#include "config.h"
#include "rcv.h"
#include "extern.h"
--- catd/en_US
+++ catd/en_US 2006-07-20 14:48:28.000000000 +0200
@@ -180,7 +180,10 @@ The following ~ escapes are defined:\n\
132 No applicable messages\n
133 %d: Inappropriate message\n
134 Unknown metachar (%c)\n
-135 Usage: %s -eiIUdFntBNHV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -b USERS -c USERS users\n
+135 $Usage: %s [-BDFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr]\n\
+ [-r from-addr] [-h hops] [-A account] [-R reply-addr] [-S option] to-addr ...\n\
+ %s [-BDeHiInNRv~] [-T name] [-A account] -f [name] [-S option]\n\
+ %s [-BDeinNRv~] [-A account] [-u user] [-S option]\n
136 --- DELETED ---
137 Cannot give -f and people to send to.\n
138 Send options without primary recipient specified.\n
@@ -314,3 +317,5 @@ The following ~ escapes are defined:\n\
266 Ignoring header field "%s"\n
267 Restoring deleted header lines\n
268 Pipe to: "%s"\n
+269 The -R option is meaningless in send mode.\n
+270 The reply-to is meaningless not in send mode.\n

3
mailx-12.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8f14933d3bca269b142ffac7b628d5a153e29d771d5430433edb444bfb3fdb9b
size 268853

191
mailx.changes Normal file
View File

@ -0,0 +1,191 @@
-------------------------------------------------------------------
Wed Nov 15 13:32:38 CET 2006 - werner@suse.de
- Do not send the mail to a reply-to address (bug #218447)
-------------------------------------------------------------------
Wed Sep 27 12:26:39 CEST 2006 - werner@suse.de
- Avoid to feed empty strings into mime if empty results leads
to an error like it does for an empty ORGANIZATION variable
-------------------------------------------------------------------
Thu Jul 20 17:59:06 CEST 2006 - werner@suse.de
- Update to mailx version 12.1 the successor of nail
* Better handling of base64 encoding
* Support for SendmailX
- Add a workaround for Ctrl-H used in kernel messages (#189974)
- Do not convert 8bit encodings to ASCII but use quoted printable
-------------------------------------------------------------------
Wed Jan 25 21:30:30 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Fri Jan 20 15:07:31 CET 2006 - schwab@suse.de
- Don't strip binaries.
-------------------------------------------------------------------
Mon Oct 17 14:46:35 CEST 2005 - werner@suse.de
- Update to nail 11.25
* Port all out patches to this version
* Use dummy option for the reply-to patch because the double
colon feature of the glibc's getopt does not work
* New: ssl and krb5 support
-------------------------------------------------------------------
Mon Aug 30 16:18:54 CEST 2004 - werner@suse.de
- Update to bugfix release 11.4
-------------------------------------------------------------------
Thu Aug 19 12:27:56 CEST 2004 - werner@suse.de
- Make it option compatible with old mail program
- Update to 11.3
-------------------------------------------------------------------
Tue Aug 17 15:53:10 CEST 2004 - werner@suse.de
- Update to 11.2
-------------------------------------------------------------------
Fri Mar 26 11:41:03 CET 2004 - mmj@suse.de
- Add postfix to # neededforbuild
-------------------------------------------------------------------
Sat Jan 10 21:14:48 CET 2004 - adrian@suse.de
- add %defattr
-------------------------------------------------------------------
Mon Dec 8 17:14:56 CET 2003 - werner@suse.de
- Update to version 10.6
-------------------------------------------------------------------
Tue Nov 11 17:25:33 CET 2003 - werner@suse.de
- Fix handling of multiword e-mail addresses (bug #32115)
-------------------------------------------------------------------
Wed Jul 30 12:27:08 CEST 2003 - werner@suse.de
- Use charset of locale as default encoding if not set
-------------------------------------------------------------------
Wed Jul 2 18:20:18 CEST 2003 - ro@suse.de
- added symlink /usr/bin/mail (again)
-------------------------------------------------------------------
Wed Jul 2 17:26:42 CEST 2003 - werner@suse.de
- Update to nail 10.5
-------------------------------------------------------------------
Thu Feb 27 17:34:59 CET 2003 - werner@suse.de
- Fix replyto patch for Replay and replay case
-------------------------------------------------------------------
Mon Feb 3 12:19:22 CET 2003 - werner@suse.de
- Don't eat option id `+' isn't used anymore
- Accept comma seperated `to' list on command line
-------------------------------------------------------------------
Mon Jan 27 18:29:28 CET 2003 - sf@suse.de
- removed '+' from optarg string to be able to mix
argument order
-------------------------------------------------------------------
Thu Dec 19 16:18:23 CET 2002 - werner@suse.de
- Move from mail-8.1.1 to nail-10.3 due of getting RFC 2046
- Port the reply-to patch to nail-10.3 in extension to replyto
variable of nail configuration
-------------------------------------------------------------------
Thu Mar 7 13:21:53 CET 2002 - werner@suse.de
- Include, enhance and test the reply-to patch from poc@pocnet.net.
Useful for system notify mails behind firewalls or from header
rewrite because those mails arn't uniq without reply address.
-------------------------------------------------------------------
Sat May 12 17:39:06 CEST 2001 - schwab@suse.de
- Fix missing declarations.
-------------------------------------------------------------------
Wed Nov 22 12:53:09 CET 2000 - werner@suse.de
- Allow `/' within valid mail addresses
- Strip leading + of file name on command line
-------------------------------------------------------------------
Fri Oct 6 18:12:25 CEST 2000 - kukuk@suse.de
- change group tag
-------------------------------------------------------------------
Wed May 24 19:06:57 MEST 2000 - uli@suse.de
- moved docs to /usr/share
-------------------------------------------------------------------
Sat Feb 26 23:30:02 CET 2000 - kukuk@suse.de
- Move /usr/man -> /usr/share/man
-------------------------------------------------------------------
Mon Sep 20 18:15:01 CEST 1999 - ro@suse.de
- added requires smtp_daemon
-------------------------------------------------------------------
Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
----------------------------------------------------------------------------
Mon Mar 22 22:05:33 MET 1999 - werner@suse.de
- Add pine format for date
----------------------------------------------------------------------------
Mon Mar 22 12:47:29 MET 1999 - werner@suse.de
- Add a security fix
- Correct a old security fix to make it work
----------------------------------------------------------------------------
Thu Jun 25 16:23:11 MEST 1998 - werner@suse.de
- No gid mail and not sgid mail: we do not use them
----------------------------------------------------------------------------
Thu Jun 25 15:34:17 MET DST 1998 - werner@suse.de
- Even if we are safe by dropping edid we want no buffer overflow
- Use IOSAFE implementation for glibc instead of fpurge
----------------------------------------------------------------------------
Wed Jun 24 22:23:26 MEST 1998 - werner@suse.de
- Move from old debian version 8.5.5 (5.5-kw) to OpenBSD 8.1 release
plus some changes from debian, redhat, and some own.
----------------------------------------------------------------------------
Wed Feb 5 19:19:30 MET 1997 - werner@suse.de
- Using mailx-5.5-kw/8.5.5-debian for mail
- Some changes to get emacs date mark on work in mail folders
- Some clean up in code

177
mailx.spec Normal file
View File

@ -0,0 +1,177 @@
#
# spec file for package mailx (Version 12.1)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: mailx
BuildRequires: krb5-devel openssl-devel pcre postfix
URL: http://heirloom.sourceforge.net/mailx.html
License: Other License(s), see package
Group: Productivity/Networking/Email/Utilities
Provides: mail
Requires: smtp_daemon
Autoreqprov: on
Version: 12.1
Release: 21
Summary: A MIME-Capable Implementation of the mailx Command
Source: mailx-%{version}.tar.bz2
Patch: mailx-%{version}.dif
Patch1: nail-11.25-path.dif
Patch2: mailx-%{version}-replyto.patch
Patch3: nail-11.25-ttychar.dif
Patch4: nail-11.25-toaddr.dif
Patch5: mailx-%{version}-mime.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Nail is a mail user agent derived from Berkeley Mail 8.1. It is
intended to provide the functionality of the POSIX.2 mailx command with
additional support for MIME messages, POP3, and SMTP. In recent system
environments, nail is Unicode/UTF-8 capable. Further, it contains some
minor enhancements like the ability to set a "From:" address.
Authors:
--------
Gunnar Ritter <Gunnar.Ritter@pluto.uni-freiburg.de>
%prep
%setup -n mailx-%{version}
%patch1 -p0 -b .path
%patch2 -p0 -b .rplyto
%patch3 -p0 -b .ttychr
%patch4 -p0 -b .toaddr
%patch5 -p0 -b .mime
%patch -p0
%build
CC=gcc
CFLAGS="${RPM_OPT_FLAGS} -pipe -D_GNU_SOURCE"
export CC CFLAGS
make PREFIX=/usr CC="$CC" CFLAGS="$CFLAGS"
tbl < mailx.1 | groff -mandocdb -Tps > manual.ps
gzip -9f manual.ps
%install
make install PREFIX=/usr DESTDIR=${RPM_BUILD_ROOT}
rm -rf ${RPM_BUILD_ROOT}/bin
mkdir ${RPM_BUILD_ROOT}/bin
ln -sf ../usr/bin/mailx ${RPM_BUILD_ROOT}/bin/mail
ln -sf mailx ${RPM_BUILD_ROOT}/usr/bin/Mail
ln -sf mailx ${RPM_BUILD_ROOT}/usr/bin/mail
ln -sf mailx.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1/Mail.1.gz
ln -sf mailx.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1/mail.1.gz
install -m 0644 mail.rc ${RPM_BUILD_ROOT}/etc
mkdir -p ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}
%files
%defattr(-,root,root)
%doc COPYING README manual.ps.gz nail.rc
/bin/mail
%config /etc/mail.rc
/usr/bin/Mail
/usr/bin/mail
/usr/bin/mailx
%doc %{_mandir}/man1/Mail.1.gz
%doc %{_mandir}/man1/mail.1.gz
%doc %{_mandir}/man1/mailx.1.gz
%changelog -n mailx
* Wed Nov 15 2006 - werner@suse.de
- Do not send the mail to a reply-to address (bug #218447)
* Wed Sep 27 2006 - werner@suse.de
- Avoid to feed empty strings into mime if empty results leads
to an error like it does for an empty ORGANIZATION variable
* Thu Jul 20 2006 - werner@suse.de
- Update to mailx version 12.1 the successor of nail
* Better handling of base64 encoding
* Support for SendmailX
- Add a workaround for Ctrl-H used in kernel messages (#189974)
- Do not convert 8bit encodings to ASCII but use quoted printable
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jan 20 2006 - schwab@suse.de
- Don't strip binaries.
* Mon Oct 17 2005 - werner@suse.de
- Update to nail 11.25
* Port all out patches to this version
* Use dummy option for the reply-to patch because the double
colon feature of the glibc's getopt does not work
* New: ssl and krb5 support
* Mon Aug 30 2004 - werner@suse.de
- Update to bugfix release 11.4
* Thu Aug 19 2004 - werner@suse.de
- Make it option compatible with old mail program
- Update to 11.3
* Tue Aug 17 2004 - werner@suse.de
- Update to 11.2
* Fri Mar 26 2004 - mmj@suse.de
- Add postfix to # neededforbuild
* Sat Jan 10 2004 - adrian@suse.de
- add %%defattr
* Mon Dec 08 2003 - werner@suse.de
- Update to version 10.6
* Tue Nov 11 2003 - werner@suse.de
- Fix handling of multiword e-mail addresses (bug #32115)
* Wed Jul 30 2003 - werner@suse.de
- Use charset of locale as default encoding if not set
* Wed Jul 02 2003 - ro@suse.de
- added symlink /usr/bin/mail (again)
* Wed Jul 02 2003 - werner@suse.de
- Update to nail 10.5
* Thu Feb 27 2003 - werner@suse.de
- Fix replyto patch for Replay and replay case
* Mon Feb 03 2003 - werner@suse.de
- Don't eat option id `+' isn't used anymore
- Accept comma seperated `to' list on command line
* Mon Jan 27 2003 - sf@suse.de
- removed '+' from optarg string to be able to mix
argument order
* Thu Dec 19 2002 - werner@suse.de
- Move from mail-8.1.1 to nail-10.3 due of getting RFC 2046
- Port the reply-to patch to nail-10.3 in extension to replyto
variable of nail configuration
* Thu Mar 07 2002 - werner@suse.de
- Include, enhance and test the reply-to patch from poc@pocnet.net.
Useful for system notify mails behind firewalls or from header
rewrite because those mails arn't uniq without reply address.
* Sat May 12 2001 - schwab@suse.de
- Fix missing declarations.
* Wed Nov 22 2000 - werner@suse.de
- Allow `/' within valid mail addresses
- Strip leading + of file name on command line
* Fri Oct 06 2000 - kukuk@suse.de
- change group tag
* Wed May 24 2000 - uli@suse.de
- moved docs to /usr/share
* Sat Feb 26 2000 - kukuk@suse.de
- Move /usr/man -> /usr/share/man
* Mon Sep 20 1999 - ro@suse.de
- added requires smtp_daemon
* Mon Sep 13 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Mon Mar 22 1999 - werner@suse.de
- Add pine format for date
* Mon Mar 22 1999 - werner@suse.de
- Add a security fix
- Correct a old security fix to make it work
* Thu Jun 25 1998 - werner@suse.de
- No gid mail and not sgid mail: we do not use them
* Thu Jun 25 1998 - werner@suse.de
- Even if we are safe by dropping edid we want no buffer overflow
- Use IOSAFE implementation for glibc instead of fpurge
* Wed Jun 24 1998 - werner@suse.de
- Move from old debian version 8.5.5 (5.5-kw) to OpenBSD 8.1 release
plus some changes from debian, redhat, and some own.
* Wed Feb 05 1997 - werner@suse.de
- Using mailx-5.5-kw/8.5.5-debian for mail
- Some changes to get emacs date mark on work in mail folders
- Some clean up in code

275
nail-11.25-path.dif Normal file
View File

@ -0,0 +1,275 @@
--- Makefile
+++ Makefile 2005-10-14 15:44:09.000000000 +0200
@@ -11,13 +11,9 @@
MANDIR = $(PREFIX)/share/man
SYSCONFDIR = /etc
-MAILRC = $(SYSCONFDIR)/nail.rc
-MAILSPOOL = /var/mail
-SENDMAIL = /usr/lib/sendmail
-
DESTDIR =
-UCBINSTALL = /usr/ucb/install
+UCBINSTALL = install
# Define compiler, preprocessor, and linker flags here.
# Note that some Linux/glibc versions need -D_GNU_SOURCE in CPPFLAGS, or
@@ -50,7 +46,7 @@
# If you know that the IPv6 functions work on your machine, you can enable
# them here.
-#IPv6 = -DHAVE_IPv6_FUNCS
+##IPv6 = -DHAVE_IPv6_FUNCS
###########################################################################
###########################################################################
@@ -58,8 +54,7 @@
###########################################################################
###########################################################################
-FEATURES = -DMAILRC='"$(MAILRC)"' -DMAILSPOOL='"$(MAILSPOOL)"' \
- -DSENDMAIL='"$(SENDMAIL)"' $(IPv6)
+FEATURES = $(IPv6)
OBJ = aux.o base64.o cache.o cmd1.o cmd2.o cmd3.o cmdtab.o collect.o \
dotlock.o edit.o fio.o getname.o getopt.o head.o hmac.o \
--- cmd1.c
+++ cmd1.c 2005-10-14 15:44:09.000000000 +0200
@@ -78,7 +78,7 @@
cp = value("PAGER");
if (cp == NULL || *cp == '\0')
- cp = value("bsdcompat") ? "more" : "pg";
+ cp = value("bsdcompat") ? PATH_MORE : PATH_PG;
return cp;
}
@@ -757,7 +757,7 @@
if (pipe) {
cp = value("SHELL");
if (cp == NULL)
- cp = SHELL;
+ cp = PATH_CSHELL;
obuf = Popen(cmd, "w", cp, 1);
if (obuf == NULL) {
perror(cmd);
--- cmd3.c
+++ cmd3.c 2005-10-14 15:44:09.000000000 +0200
@@ -90,7 +90,7 @@
if (bangexp(&cmd, &cmdsize) < 0)
return 1;
if ((shell = value("SHELL")) == NULL)
- shell = SHELL;
+ shell = PATH_CSHELL;
run_command(shell, 0, -1, -1, "-c", cmd, NULL);
safe_signal(SIGINT, sigint);
printf("!\n");
@@ -109,7 +109,7 @@
char *shell;
if ((shell = value("SHELL")) == NULL)
- shell = SHELL;
+ shell = PATH_CSHELL;
run_command(shell, 0, -1, -1, NULL, NULL, NULL);
safe_signal(SIGINT, sigint);
putchar('\n');
--- collect.c
+++ collect.c 2005-10-14 15:44:09.000000000 +0200
@@ -121,7 +121,7 @@
if (sigsetjmp(pipejmp, 1))
goto endpipe;
if (cp == NULL)
- cp = SHELL;
+ cp = PATH_CSHELL;
if ((obuf = Popen(cmd, "r", cp, 0)) == NULL) {
perror(cmd);
return;
@@ -1049,7 +1049,7 @@
* stdout = new message.
*/
if ((shell = value("SHELL")) == NULL)
- shell = SHELL;
+ shell = PATH_CSHELL;
if (run_command(shell,
0, fileno(collf), fileno(nf), "-c", cmd, NULL) < 0) {
Fclose(nf);
--- def.h
+++ def.h 2005-10-14 15:45:56.000000000 +0200
@@ -642,3 +642,68 @@
VRFY_STRICT
};
#endif /* USE_SSL */
+
+#include <paths.h>
+#ifndef PATH_MORE
+# ifdef _PATH_MORE
+# define PATH_MORE _PATH_MORE
+# else
+# define PATH_MORE "/usr/bin/more"
+# endif
+#endif
+#ifndef PATH_PG
+# ifdef _PATH_PG
+# define PATH_PG _PATH_PG
+# else
+# define PATH_PG "/usr/bin/less"
+# endif
+#endif
+#ifndef PATH_CSHELL
+# ifdef _PATH_CSHELL
+# define PATH_CSHELL _PATH_CSHELL
+# else
+# define PATH_CSHELL "/usr/bin/tcsh"
+# endif
+#endif
+#ifndef PATH_MAILDIR
+# ifdef _PATH_MAILDIR
+# define PATH_MAILDIR _PATH_MAILDIR
+# else
+# define PATH_MAILDIR "/var/mail"
+# endif
+#endif
+#ifndef PATH_EX
+# ifdef _PATH_EX
+# define PATH_EX _PATH_EX
+# else
+# define PATH_EX "/usr/bin/ex"
+# endif
+#endif
+#ifndef PATH_VI
+# ifdef _PATH_VI
+# define PATH_VI _PATH_VI
+# else
+# define PATH_VI "/usr/bin/vi"
+# endif
+#endif
+#ifndef PATH_MASTER_RC
+# ifdef _PATH_MASTER_RC
+# define PATH_MASTER_RC _PATH_MASTER_RC
+# else
+# define PATH_MASTER_RC "/etc/mail.rc"
+# endif
+#endif
+#ifndef PATH_SENDMAIL
+# ifdef _PATH_SENDMAIL
+# define PATH_SENDMAIL _PATH_SENDMAIL
+# else
+# define PATH_SENDMAIL "/usr/sbin/sendmail"
+# endif
+#endif
+#ifndef PATH_TMP
+# ifdef _PATH_TMP
+# define PATH_TMP _PATH_TMP
+# else
+# define PATH_TMP "/tmp"
+# endif
+#endif
--- dotlock.c
+++ dotlock.c 2005-10-14 15:44:09.000000000 +0200
@@ -78,7 +78,7 @@
static int
perhaps_setgid(const char *name, gid_t gid)
{
- char safepath[]= MAILSPOOL;
+ char safepath[]= PATH_MAILDIR;
if (strncmp(name, safepath, sizeof (safepath)-1) ||
strchr(name + sizeof (safepath), '/'))
--- edit.c
+++ edit.c 2005-10-14 15:47:03.000000000 +0200
@@ -153,7 +153,7 @@
* Run an editor on the file at "fpp" of "size" bytes,
* and return a new file pointer.
* Signals must be handled by the caller.
- * "Type" is 'e' for ed, 'v' for vi.
+ * "Type" is 'e' for PATH_EX, 'v' for PATH_VI.
*/
FILE *
run_editor(FILE *fp, off_t size, int type, int readonly,
@@ -212,7 +212,7 @@
}
nf = NULL;
if ((edit = value(type == 'e' ? "EDITOR" : "VISUAL")) == NULL)
- edit = type == 'e' ? "ed" : "vi";
+ edit = type == 'e' ? PATH_EX : PATH_VI;
sigemptyset(&set);
if (run_command(edit, oldint != SIG_IGN ? &set : NULL, -1, -1,
tempEdit, NULL, NULL) < 0) {
--- fio.c
+++ fio.c 2005-10-14 15:44:09.000000000 +0200
@@ -541,7 +541,7 @@
}
snprintf(cmdbuf, sizeof cmdbuf, "echo %s", name);
if ((shell = value("SHELL")) == NULL)
- shell = SHELL;
+ shell = PATH_CSHELL;
pid = start_command(shell, 0, -1, pivec[1], "-c", cmdbuf, NULL);
if (pid < 0) {
close(pivec[0]);
--- main.c
+++ main.c 2005-10-14 15:44:09.000000000 +0200
@@ -390,7 +390,7 @@
rcvmode = !to && !tflag;
spreserve();
if (!nosrc)
- load(MAILRC);
+ load(PATH_MASTER_RC);
/*
* Expand returns a savestr, but load only uses the file name
* for fopen, so it's safe to do this.
--- names.c
+++ names.c 2005-10-14 15:44:09.000000000 +0200
@@ -343,7 +343,7 @@
* on one another.
*/
if ((shell = value("SHELL")) == NULL)
- shell = SHELL;
+ shell = PATH_CSHELL;
sigemptyset(&nset);
sigaddset(&nset, SIGHUP);
sigaddset(&nset, SIGINT);
--- send.c
+++ send.c 2005-10-14 15:44:09.000000000 +0200
@@ -1049,7 +1049,7 @@
Ftfree(&tempPipe);
}
if ((shell = value("SHELL")) == NULL)
- shell = SHELL;
+ shell = PATH_CSHELL;
if ((rbuf = Popen(pipecmd, "W", shell, fileno(*qbuf)))
== NULL) {
perror(pipecmd);
--- sendout.c
+++ sendout.c 2005-10-14 15:44:09.000000000 +0200
@@ -791,7 +791,7 @@
if ((cp = value("sendmail")) != NULL)
cp = expand(cp);
else
- cp = SENDMAIL;
+ cp = PATH_SENDMAIL;
execv(cp, args);
perror(cp);
}
--- temp.c
+++ temp.c 2005-10-14 15:44:09.000000000 +0200
@@ -121,7 +121,7 @@
tmpdir = smalloc(strlen(cp) + 1);
strcpy(tmpdir, cp);
} else {
- tmpdir = "/tmp";
+ tmpdir = PATH_TMP;
}
if (myname != NULL) {
if (getuserid(myname) < 0) {
--- v7.local.c
+++ v7.local.c 2005-10-14 15:44:09.000000000 +0200
@@ -70,7 +70,7 @@
which_protocol(cp) == PROTO_IMAP) {
snprintf(buf, size, "%s/INBOX", protbase(cp));
} else if (force || (mbox = value("MAIL")) == NULL) {
- snprintf(buf, size, "%s/%s", MAILSPOOL, user);
+ snprintf(buf, size, "%s/%s", PATH_MAILDIR, user);
} else {
strncpy(buf, mbox, size);
buf[size-1]='\0';

53
nail-11.25-toaddr.dif Normal file
View File

@ -0,0 +1,53 @@
--- main.c
+++ main.c 2005-10-17 14:36:24.000000000 +0200
@@ -184,10 +184,27 @@
if (*argv) {
/*
+ * Be compatible with broken mail behaviour, which use direct
+ * sendmail options for sending mails if getopt is skiped
+ * by first argument which is non option like a mail address.
+ */
+ char **opt = argv;
+ while (*(++opt) && (**opt) && (**opt != '-')) {
+ char *cp;
+ while ((cp = strrchr(*opt, ','))) {
+ *cp++ = '\0';
+ if (cp && *cp)
+ to = checkaddrs(cat(to, nalloc(cp, GTO)));
+ }
+ to = checkaddrs(cat(to, nalloc(*opt, GTO)));
+ argc--, argv++;
+ }
+
+ /*
* Use -R option for send and folder mode. In folder mode -R is used
* for read only and in send mode for providing a reply-to address.
*/
- char **opt = argv;
+ opt = argv;
while (*(++opt) && (**opt)) {
char *cp = *opt;
if (*cp == '-' && *(cp+1) == 'R') {
@@ -386,8 +403,19 @@
ef = argv[optind];
}
} else {
- for (i = optind; argv[i]; i++)
- to = checkaddrs(cat(to, extract(argv[i], GTO|GFULL)));
+ for (i = optind; (argv[i]) && (*argv[i] != '-'); i++) {
+ char *cp;
+ while ((cp = strrchr(argv[i], ','))) {
+ *cp++ = '\0';
+ if (cp && *cp)
+ to = checkaddrs(cat(to, nalloc(cp, GTO|GFULL)));
+ }
+ to = checkaddrs(cat(to, nalloc(argv[i], GTO|GFULL)));
+ }
+ if (argv[i] && (strcmp(argv[i], "--") == 0))
+ i++;
+ for (; argv[i]; i++)
+ smopts = cat(smopts, nalloc(argv[i], 0));
}
/*
* Check for inconsistent arguments.

23
nail-11.25-ttychar.dif Normal file
View File

@ -0,0 +1,23 @@
--- mime.c
+++ mime.c 2005-10-14 16:28:39.000000000 +0200
@@ -260,7 +260,19 @@
else if (isclean & MIME_HIGHBIT) {
charset = wantcharset ? wantcharset : value("charset");
if (charset == NULL) {
- charset = defcharset;
+ char *t = value("ttycharset");
+ if (t == NULL || (ascncasecmp("ANSI_X3.4", t, 9) == 0))
+ charset = defcharset;
+ else {
+ int c;
+ char *ptr;
+
+ ptr = charset = sstrdup(t);
+ while ((c = *ptr)) {
+ *ptr = lowerconv(c & 0377);
+ ptr++;
+ }
+ }
}
} else {
/*

0
ready Normal file
View File