Dr. Werner Fink 2011-05-13 11:37:37 +00:00 committed by Git OBS Bridge
parent aea2252ea0
commit 83ef0bf4c0
12 changed files with 300 additions and 421 deletions

View File

@ -1,186 +0,0 @@
--- def.h
+++ def.h 2007-04-17 11:32:43.960721000 +0000
@@ -142,7 +142,8 @@ enum mimeclean {
MIME_LONGLINES = 002, /* has lines too long for RFC 2822 */
MIME_CTRLCHAR = 004, /* contains control characters */
MIME_HASNUL = 010, /* contains \0 characters */
- MIME_NOTERMNL = 020 /* lacks a terminating newline */
+ MIME_NOTERMNL = 020, /* lacks a terminating newline */
+ MIME_UTF8 = 040 /* UTF-8 high bit characters */
};
enum tdflags {
--- mime.c
+++ mime.c 2007-04-17 13:08:06.352702764 +0000
@@ -258,7 +258,10 @@ getcharset(int isclean)
if (isclean & (MIME_CTRLCHAR|MIME_HASNUL))
charset = NULL;
else if (isclean & MIME_HIGHBIT) {
- charset = wantcharset ? wantcharset : value("charset");
+ if (isclean & MIME_UTF8)
+ charset = defcharset;
+ if (charset == NULL)
+ charset = wantcharset ? wantcharset : value("charset");
if (charset == NULL) {
char *t = value("ttycharset");
if (t == NULL || (ascncasecmp("ANSI_X3.4", t, 9) == 0))
@@ -742,6 +745,7 @@ mime_isclean(FILE *f)
lastc = c;
c = getc(f);
curlen++;
+ check:
if (c == '\n' || c == EOF) {
/*
* RFC 821 imposes a maximum line length of 1000
@@ -754,10 +758,38 @@ mime_isclean(FILE *f)
curlen = 1;
} else if (c & 0200) {
isclean |= MIME_HIGHBIT;
+ if (c & 0100) {
+ int n, follow;
+
+ if ((c & 040) == 0) /* 110xxxxx */
+ follow = 1;
+ else if ((c & 020) == 0) /* 1110xxxx */
+ follow = 2;
+ else if ((c & 010) == 0) /* 11110xxx */
+ follow = 3;
+ else if ((c & 004) == 0) /* 111110xx */
+ follow = 4;
+ else if ((c & 002) == 0) /* 1111110x */
+ follow = 5;
+ else
+ continue;
+
+ for (n = 0; n < follow; n++) {
+ lastc = c;
+ c = getc(f);
+
+ if ((c & 0200) == 0 || (c & 0100) ||
+ (c == '\0') || (c == '\n') || (c == EOF)) {
+ curlen += n;
+ goto check;
+ }
+ }
+ isclean |= MIME_UTF8;
+ }
} 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);
@@ -826,13 +858,16 @@ 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";
} else
*contenttype = "text/plain";
*charset = getcharset(*isclean);
- }
+ } else if (ascncasecmp(*contenttype, "text/", 5) == 0)
+ *charset = getcharset(*isclean);
return convert;
}
--- sendout.c
+++ sendout.c 2007-04-17 13:11:40.576871634 +0000
@@ -206,7 +206,7 @@ attach_file(struct attachment *ap, FILE
size_t bufsize, count;
int lastc = EOF;
#ifdef HAVE_ICONV
- char *tcs;
+ char *tcs = NULL;
#endif
if ((fi = Fopen(ap->a_name, "r")) == NULL) {
@@ -231,8 +231,16 @@ attach_file(struct attachment *ap, FILE
send_boundary, contenttype);
if (charset == NULL)
putc('\n', fo);
- else
- fprintf(fo, ";\n charset=%s\n", charset);
+ else {
+#ifdef HAVE_ICONV
+ if (wantcharset && ascncasecmp(wantcharset, "ANSI_X3.4", 9))
+ tcs = wantcharset;
+ if (tcs)
+ fprintf(fo, ";\n charset=%s\n", tcs);
+ else
+#endif
+ fprintf(fo, ";\n charset=%s\n", charset);
+ }
if (ap->a_content_disposition == NULL)
ap->a_content_disposition = "attachment";
fprintf(fo, "Content-Transfer-Encoding: %s\n"
@@ -254,16 +262,15 @@ attach_file(struct attachment *ap, FILE
iconv_close(iconvd);
iconvd = (iconv_t)-1;
}
- tcs = gettcharset();
if ((isclean & (MIME_HASNUL|MIME_CTRLCHAR)) == 0 &&
ascncasecmp(contenttype, "text/", 5) == 0 &&
isclean & MIME_HIGHBIT &&
- charset != NULL && asccasecmp(charset, tcs)) {
- if ((iconvd = iconv_open_ft(charset, tcs)) == (iconv_t)-1 &&
+ charset != NULL && tcs != NULL && asccasecmp(charset, tcs)) {
+ if ((iconvd = iconv_open_ft(tcs, charset)) == (iconv_t)-1 &&
errno != 0) {
if (errno == EINVAL)
fprintf(stderr, catgets(catd, CATSET, 179,
- "Cannot convert from %s to %s\n"), tcs, charset);
+ "Cannot convert from %s to %s\n"), charset, tcs);
else
perror("iconv_open");
Fclose(fi);
@@ -467,6 +474,7 @@ infix(struct header *hp, FILE *fi, int d
}
if ((isclean & (MIME_HASNUL|MIME_CTRLCHAR)) == 0 &&
ascncasecmp(contenttype, "text/", 5) == 0 &&
+ ascncasecmp(tcs, "ANSI_X3.4", 9) &&
isclean & MIME_HIGHBIT &&
charset != NULL && asccasecmp(charset, tcs)) {
if (iconvd != (iconv_t)-1)
@@ -1162,8 +1170,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 ?
@@ -1208,9 +1217,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 ?
@@ -1218,8 +1228,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 ?

View File

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

116
mailx-12.5-mime.dif Normal file
View File

@ -0,0 +1,116 @@
--- def.h
+++ def.h 2011-05-13 11:04:51.779926337 +0000
@@ -142,7 +142,8 @@ enum mimeclean {
MIME_LONGLINES = 002, /* has lines too long for RFC 2822 */
MIME_CTRLCHAR = 004, /* contains control characters */
MIME_HASNUL = 010, /* contains \0 characters */
- MIME_NOTERMNL = 020 /* lacks a terminating newline */
+ MIME_NOTERMNL = 020, /* lacks a terminating newline */
+ MIME_UTF8 = 040 /* UTF-8 high bit characters */
};
enum tdflags {
--- mime.c
+++ mime.c 2011-05-13 11:04:51.779926337 +0000
@@ -258,8 +258,11 @@ getcharset(int isclean)
if (isclean & (MIME_CTRLCHAR|MIME_HASNUL))
charset = NULL;
else if (isclean & MIME_HIGHBIT) {
- charset = (wantcharset && wantcharset != (char *)-1) ?
- wantcharset : value("charset");
+ if (isclean & MIME_UTF8)
+ charset = defcharset;
+ if (charset == NULL)
+ charset = (wantcharset && wantcharset != (char *)-1) ?
+ wantcharset : value("charset");
if (charset == NULL) {
char *t = value("ttycharset");
if (t == NULL || (ascncasecmp("ANSI_X3.4", t, 9) == 0))
@@ -737,6 +740,7 @@ mime_isclean(FILE *f)
lastc = c;
c = getc(f);
curlen++;
+ check:
if (c == '\n' || c == EOF) {
/*
* RFC 821 imposes a maximum line length of 1000
@@ -749,10 +753,38 @@ mime_isclean(FILE *f)
curlen = 1;
} else if (c & 0200) {
isclean |= MIME_HIGHBIT;
+ if (c & 0100) {
+ int n, follow;
+
+ if ((c & 040) == 0) /* 110xxxxx */
+ follow = 1;
+ else if ((c & 020) == 0) /* 1110xxxx */
+ follow = 2;
+ else if ((c & 010) == 0) /* 11110xxx */
+ follow = 3;
+ else if ((c & 004) == 0) /* 111110xx */
+ follow = 4;
+ else if ((c & 002) == 0) /* 1111110x */
+ follow = 5;
+ else
+ continue;
+
+ for (n = 0; n < follow; n++) {
+ lastc = c;
+ c = getc(f);
+
+ if ((c & 0200) == 0 || (c & 0100) ||
+ (c == '\0') || (c == '\n') || (c == EOF)) {
+ curlen += n;
+ goto check;
+ }
+ }
+ isclean |= MIME_UTF8;
+ }
} 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);
@@ -826,12 +858,15 @@ 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";
} else if (*contenttype == NULL)
*contenttype = "text/plain";
- }
+ } else if (ascncasecmp(*contenttype, "text/", 5) == 0)
+ *charset = getcharset(*isclean);
return convert;
}
--- sendout.c
+++ sendout.c 2011-05-13 11:07:31.623926237 +0000
@@ -230,6 +230,11 @@ attach_file1(struct attachment *ap, FILE
"\n--%s\n"
"Content-Type: %s",
send_boundary, contenttype);
+ tcs = gettcharset();
+#ifdef HAVE_ICONV
+ if (wantcharset && ascncasecmp(wantcharset, "ANSI_X3.4", 9))
+ charset = wantcharset;
+#endif
if (charset == NULL)
putc('\n', fo);
else
@@ -259,7 +264,7 @@ attach_file1(struct attachment *ap, FILE
if ((isclean & (MIME_HASNUL|MIME_CTRLCHAR)) == 0 &&
ascncasecmp(contenttype, "text/", 5) == 0 &&
isclean & MIME_HIGHBIT &&
- charset != NULL) {
+ charset != NULL && tcs != NULL && asccasecmp(charset, tcs)) {
if ((iconvd = iconv_open_ft(charset, tcs)) == (iconv_t)-1 &&
errno != 0) {
if (errno == EINVAL)

View File

@ -1,6 +1,6 @@
--- collect.c --- collect.c
+++ collect.c 2006-07-20 13:21:32.000000000 +0200 +++ collect.c 2006-07-20 11:21:32.000000000 +0000
@@ -718,7 +718,7 @@ cont: @@ -720,7 +720,7 @@ cont:
* Grab a bunch of headers. * Grab a bunch of headers.
*/ */
do do
@ -9,7 +9,7 @@
value("bsdcompat") != NULL && value("bsdcompat") != NULL &&
value("bsdorder") != NULL); value("bsdorder") != NULL);
while (hp->h_to == NULL); while (hp->h_to == NULL);
@@ -741,13 +741,21 @@ cont: @@ -743,13 +743,21 @@ cont:
break; break;
case 's': case 's':
/* /*
@ -33,7 +33,7 @@
/* /*
* Edit the attachment list. * Edit the attachment list.
--- def.h --- def.h
+++ def.h 2006-07-20 13:21:32.000000000 +0200 +++ def.h 2006-07-20 11:21:32.000000000 +0000
@@ -393,7 +393,7 @@ enum gfield { @@ -393,7 +393,7 @@ enum gfield {
GUA = 128, /* User-Agent field */ GUA = 128, /* User-Agent field */
GMIME = 256, /* MIME 1.0 fields */ GMIME = 256, /* MIME 1.0 fields */
@ -53,29 +53,28 @@
#define visible(mp) (((mp)->m_flag&(MDELETED|MHIDDEN|MKILL))==0|| \ #define visible(mp) (((mp)->m_flag&(MDELETED|MHIDDEN|MKILL))==0|| \
dot==(mp) && (mp)->m_flag&MKILL) dot==(mp) && (mp)->m_flag&MKILL)
--- extern.h --- extern.h
+++ extern.h 2006-07-20 13:21:32.000000000 +0200 +++ extern.h 2011-05-13 09:07:33.891926124 +0000
@@ -456,7 +456,8 @@ int send(struct message *mp, FILE *obuf, @@ -457,7 +457,7 @@ int send(struct message *mp, FILE *obuf,
char *prefix, enum sendaction action, off_t *stats);
/* sendout.c */
char *makeboundary(void); char *makeboundary(void);
int mail(struct name *to, struct name *cc, struct name *bcc, -int mail(struct name *to, struct name *cc, struct name *bcc,
+int mail(struct name *to, struct name *cc, struct name *bcc, struct name *replyto,
struct name *smopts, char *subject, struct attachment *attach, struct name *smopts, char *subject, struct attachment *attach,
- char *quotefile, int recipient_record, int tflag); char *quotefile, int recipient_record, int tflag, int Eflag);
+ char *quotefile, int recipient_record, int tflag,
+ struct name * replyto);
int sendmail(void *v); int sendmail(void *v);
int Sendmail(void *v);
enum okay mail1(struct header *hp, int printheaders, struct message *quote,
--- mailx.1 --- mailx.1
+++ mailx.1 2006-07-20 13:23:09.000000000 +0200 +++ mailx.1 2011-05-13 09:11:27.640426515 +0000
@@ -43,7 +43,7 @@ mailx \- send and receive Internet mail @@ -43,7 +43,7 @@ mailx \- send and receive Internet mail
.PD 0 .PD 0
.HP .HP
.ad l .ad l
-\fBmailx\fR [\fB\-BDdFintv~\fR] -\fBmailx\fR [\fB\-BDdEFintv~\fR]
+\fBmailx\fR [\fB\-BDdFintv~\fR] [\fB\-R\fI\ address\fR ] +\fBmailx\fR [\fB\-BDdEFintv~\fR] [\fB\-R\fR [\fIaddress\fR]]
[\fB\-s\fI\ subject\fR] [\fB\-a\fI\ attachment\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\-c\fI\ cc-addr\fR] [\fB\-b\fI\ bcc-addr\fR] [\fB\-r\fI\ from-addr\fR]
[\fB\-h\fI\ hops\fR] [\fB\-h\fI\ hops\fR]
@@ -192,8 +192,12 @@ it is recommended to set the @@ -203,8 +203,12 @@ it is recommended to set the
.I from .I from
variable directly instead. variable directly instead.
.TP .TP
@ -89,7 +88,7 @@
.TP .TP
.BI \-s \ subject .BI \-s \ subject
Specify subject on command line (only the first argument after the Specify subject on command line (only the first argument after the
@@ -2104,6 +2108,9 @@ copying the message to @@ -2131,6 +2135,9 @@ copying the message to
`dead.letter' in the user's home directory `dead.letter' in the user's home directory
if save is set. if save is set.
.TP .TP
@ -100,8 +99,8 @@
Read the named file into the message. Read the named file into the message.
.TP .TP
--- main.c --- main.c
+++ main.c 2006-07-20 13:37:02.000000000 +0200 +++ main.c 2011-05-13 09:18:29.747926305 +0000
@@ -52,6 +52,11 @@ static char sccsid[] = "@(#)main.c 2.48 @@ -52,6 +52,11 @@ static char sccsid[] = "@(#)main.c 2.51
* Note: We set egid to realgid ... and only if we need the egid we will * 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. * switch back temporary. Nevertheless, I do not like seg faults.
* Werner Fink, <werner@suse.de> * Werner Fink, <werner@suse.de>
@ -113,68 +112,49 @@
*/ */
@@ -86,9 +91,9 @@ static void setscreensize(int dummy); @@ -87,9 +92,9 @@ static void setscreensize(int dummy);
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
- const char optstr[] = "A:BHFINVT:RS:a:b:c:dDefh:inqr:s:tu:v~"; - const char optstr[] = "A:BHEFINVT:RS:a:b:c:dDefh:inqr:s:tu:v~";
+ const char optstr[] = "A:BHFINVT:R\rS:a:b:c:dDefh:inqr:s:tu:v~"; + const char optstr[] = "A:BHEFINVT:R::S:a:b:c:dDefh:inqr:s:tu:v~";
int i, existonly = 0, headersonly = 0, sendflag = 0; int i, existonly = 0, headersonly = 0, sendflag = 0;
- struct name *to, *cc, *bcc, *smopts; - struct name *to, *cc, *bcc, *smopts;
+ struct name *to, *cc, *bcc, *smopts, *replyto; + struct name *to, *cc, *bcc, *replyto, *smopts;
struct attachment *attach; struct attachment *attach;
char *subject, *cp, *ef, *qf = NULL, *fromaddr = NULL, *Aflag = NULL; char *subject, *cp, *ef, *qf = NULL, *fromaddr = NULL, *Aflag = NULL;
char nosrc = 0; char nosrc = 0;
@@ -175,6 +180,26 @@ main(int argc, char *argv[]) @@ -179,6 +184,8 @@ main(int argc, char *argv[])
attach = NULL; attach = NULL;
smopts = NULL; smopts = NULL;
subject = NULL; subject = NULL;
+ replyto = 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) { while ((i = getopt(argc, argv, optstr)) != EOF) {
switch (i) { switch (i) {
case 'V': case 'V':
@@ -339,13 +364,20 @@ main(int argc, char *argv[]) @@ -348,12 +355,18 @@ main(int argc, char *argv[])
case 'A':
Aflag = optarg; Aflag = optarg;
break; break;
+ case '\r': case 'R':
- Rflag = 1;
+ /* + /*
+ * Set the Reply-to Address (as who we send mail) + * Set the Reply-to Address (as who we send mail)
+ */ + */
+ if (optarg && *optarg) + if (optarg && *optarg)
+ replyto = checkaddrs(cat(replyto, extract(optarg, GREPLYTO|GFULL))); + replyto = checkaddrs(cat(replyto, extract(optarg, GREPLYTO|GFULL)));
+ break; + else
case 'R': + Rflag = 1;
Rflag = 1;
break; break;
case '?': case '?':
usage: usage:
fprintf(stderr, catgets(catd, CATSET, 135, 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 -eiIUdEFntBDNHRV~ -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); +"Usage: %s -eiIUdEFntBDNHV~ [-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); exit(2);
} }
} }
@@ -379,6 +411,10 @@ usage: @@ -387,6 +400,10 @@ usage:
fprintf(stderr, "The -R option is meaningless in send mode.\n"); fprintf(stderr, "The -R option is meaningless in send mode.\n");
goto usage; goto usage;
} }
@ -185,28 +165,29 @@
if (Iflag && ef == NULL) { if (Iflag && ef == NULL) {
fprintf(stderr, catgets(catd, CATSET, 204, fprintf(stderr, catgets(catd, CATSET, 204,
"Need -f with -I.\n")); "Need -f with -I.\n"));
@@ -427,7 +463,7 @@ usage: @@ -441,8 +458,8 @@ usage:
if (fromaddr) if (fromaddr)
assign("from", fromaddr); assign("from", fromaddr);
if (!rcvmode) { if (!rcvmode) {
- mail(to, cc, bcc, smopts, subject, attach, qf, Fflag, tflag); - mail(to, cc, bcc, smopts, subject, attach, qf, Fflag, tflag,
+ mail(to, cc, bcc, smopts, subject, attach, qf, Fflag, tflag, replyto); - Eflag);
+ mail(to, cc, bcc, replyto, smopts, subject, attach, qf,
+ Fflag, tflag, Eflag);
/* /*
* why wait? * why wait?
*/ */
--- sendout.c --- sendout.c
+++ sendout.c 2006-07-20 13:21:39.000000000 +0200 +++ sendout.c 2011-05-13 09:19:01.288426393 +0000
@@ -638,7 +638,8 @@ savemail(char *name, FILE *fi) @@ -712,7 +712,7 @@ savemail(char *name, FILE *fi)
* which does all the dirty work.
*/
int int
mail(struct name *to, struct name *cc, struct name *bcc, -mail(struct name *to, struct name *cc, struct name *bcc,
+mail(struct name *to, struct name *cc, struct name *bcc, struct name *replyto,
struct name *smopts, char *subject, struct attachment *attach, struct name *smopts, char *subject, struct attachment *attach,
- char *quotefile, int recipient_record, int tflag) char *quotefile, int recipient_record, int tflag, int Eflag)
+ char *quotefile, int recipient_record, int tflag,
+ struct name *replyto)
{ {
struct header head; @@ -731,6 +731,7 @@ mail(struct name *to, struct name *cc, s
struct str in, out;
@@ -655,6 +656,7 @@ mail(struct name *to, struct name *cc, s
head.h_to = to; head.h_to = to;
head.h_cc = cc; head.h_cc = cc;
head.h_bcc = bcc; head.h_bcc = bcc;
@ -215,7 +196,7 @@
head.h_attach = attach; head.h_attach = attach;
head.h_smopts = smopts; head.h_smopts = smopts;
--- tty.c --- tty.c
+++ tty.c 2006-07-20 13:21:39.000000000 +0200 +++ tty.c 2006-07-20 11:21:39.000000000 +0000
@@ -338,6 +338,12 @@ grabh(struct header *hp, enum gfield gfl @@ -338,6 +338,12 @@ grabh(struct header *hp, enum gfield gfl
hp->h_organization = rtty_internal("Organization: ", hp->h_organization = rtty_internal("Organization: ",
hp->h_organization); hp->h_organization);

View File

@ -1,5 +1,5 @@
--- .pkgextract --- .pkgextract
+++ .pkgextract 2006-07-20 13:42:19.000000000 +0200 +++ .pkgextract 2006-07-20 11:42:19.000000000 +0000
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
+patch -p 0 -s --suffix=".path" < ../nail-11.25-path.dif +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=".rplyto" < ../mailx-12.1-replyto.patch
@ -7,7 +7,7 @@
+patch -p 0 -s --suffix=".toaddr" < ../nail-11.25-toaddr.dif +patch -p 0 -s --suffix=".toaddr" < ../nail-11.25-toaddr.dif
+patch -p 0 -s --suffix=".mime" < ../mailx-12.2-mime.dif +patch -p 0 -s --suffix=".mime" < ../mailx-12.2-mime.dif
--- Makefile --- Makefile
+++ Makefile 2007-04-17 12:12:48.536367085 +0200 +++ Makefile 2007-04-17 10:12:49.000000000 +0000
@@ -10,6 +10,7 @@ PREFIX = /usr/local @@ -10,6 +10,7 @@ PREFIX = /usr/local
BINDIR = $(PREFIX)/bin BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man MANDIR = $(PREFIX)/share/man
@ -26,7 +26,7 @@
########################################################################### ###########################################################################
########################################################################### ###########################################################################
--- aux.c --- aux.c
+++ aux.c 2006-07-20 13:42:19.000000000 +0200 +++ aux.c 2006-07-20 11:42:19.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)aux.c 2.83 ( @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)aux.c 2.83 (
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -36,7 +36,7 @@
#include "extern.h" #include "extern.h"
#include <sys/stat.h> #include <sys/stat.h>
--- base64.c --- base64.c
+++ base64.c 2006-07-20 13:42:19.000000000 +0200 +++ base64.c 2006-07-20 11:42:19.000000000 +0000
@@ -33,6 +33,7 @@ static char sccsid[] = "@(#)base64.c 2.1 @@ -33,6 +33,7 @@ static char sccsid[] = "@(#)base64.c 2.1
* base64 functions * base64 functions
*/ */
@ -46,8 +46,8 @@
#include "extern.h" #include "extern.h"
--- cmd1.c --- cmd1.c
+++ cmd1.c 2006-07-20 13:42:19.000000000 +0200 +++ cmd1.c 2006-07-20 11:42:19.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmd1.c 2.96 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmd1.c 2.97
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -56,8 +56,8 @@
#include "extern.h" #include "extern.h"
#ifdef HAVE_WCWIDTH #ifdef HAVE_WCWIDTH
--- cmd2.c --- cmd2.c
+++ cmd2.c 2006-07-20 13:42:19.000000000 +0200 +++ cmd2.c 2006-07-20 11:42:19.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmd2.c 2.46 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmd2.c 2.47
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -66,8 +66,8 @@
#include "extern.h" #include "extern.h"
#include <sys/wait.h> #include <sys/wait.h>
--- cmd3.c --- cmd3.c
+++ cmd3.c 2006-07-20 13:42:19.000000000 +0200 +++ cmd3.c 2006-07-20 11:42:19.000000000 +0000
@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)cmd3.c 2.84 @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)cmd3.c 2.87
#include <math.h> #include <math.h>
#include <float.h> #include <float.h>
@ -76,7 +76,7 @@
#include "extern.h" #include "extern.h"
#include <unistd.h> #include <unistd.h>
--- cmdtab.c --- cmdtab.c
+++ cmdtab.c 2006-07-20 13:42:19.000000000 +0200 +++ cmdtab.c 2006-07-20 11:42:19.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmdtab.c 2.5 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)cmdtab.c 2.5
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -86,7 +86,7 @@
#include "extern.h" #include "extern.h"
--- collect.c --- collect.c
+++ collect.c 2006-07-20 13:42:19.000000000 +0200 +++ collect.c 2006-07-20 11:42:19.000000000 +0000
@@ -49,6 +49,7 @@ static char sccsid[] = "@(#)collect.c 2. @@ -49,6 +49,7 @@ static char sccsid[] = "@(#)collect.c 2.
* ~ escapes. * ~ escapes.
*/ */
@ -96,7 +96,7 @@
#include "extern.h" #include "extern.h"
#include <unistd.h> #include <unistd.h>
--- dotlock.c --- dotlock.c
+++ dotlock.c 2006-07-20 13:42:19.000000000 +0200 +++ dotlock.c 2006-07-20 11:42:19.000000000 +0000
@@ -38,6 +38,7 @@ static char sccsid[] = "@(#)dotlock.c 2. @@ -38,6 +38,7 @@ static char sccsid[] = "@(#)dotlock.c 2.
#endif #endif
#endif #endif
@ -106,8 +106,8 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
--- edit.c --- edit.c
+++ edit.c 2006-07-20 13:42:19.000000000 +0200 +++ edit.c 2006-07-20 11:42:19.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)edit.c 2.24 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)edit.c 2.24
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -116,8 +116,8 @@
#include "extern.h" #include "extern.h"
#include <sys/stat.h> #include <sys/stat.h>
--- fio.c --- fio.c
+++ fio.c 2006-07-20 13:42:19.000000000 +0200 +++ fio.c 2006-07-20 11:42:19.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)fio.c 2.71 ( @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)fio.c 2.76 (
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -126,7 +126,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/file.h> #include <sys/file.h>
--- getname.c --- getname.c
+++ getname.c 2006-07-20 13:42:19.000000000 +0200 +++ getname.c 2006-07-20 11:42:19.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)getname.c 2. @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)getname.c 2.
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -136,8 +136,8 @@
#include <pwd.h> #include <pwd.h>
#include "extern.h" #include "extern.h"
--- head.c --- head.c
+++ head.c 2006-07-20 13:42:19.000000000 +0200 +++ head.c 2006-07-20 11:42:19.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)head.c 2.17 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)head.c 2.17
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -146,7 +146,7 @@
#include "extern.h" #include "extern.h"
#include <time.h> #include <time.h>
--- hmac.c --- hmac.c
+++ hmac.c 2006-07-20 13:42:19.000000000 +0200 +++ hmac.c 2006-07-20 11:42:19.000000000 +0000
@@ -32,6 +32,7 @@ Appendix -- Sample Code @@ -32,6 +32,7 @@ Appendix -- Sample Code
/* Sccsid @(#)hmac.c 1.8 (gritter) 3/4/06 */ /* Sccsid @(#)hmac.c 1.8 (gritter) 3/4/06 */
@ -156,7 +156,7 @@
#include "md5.h" #include "md5.h"
--- imap_gssapi.c --- imap_gssapi.c
+++ imap_gssapi.c 2006-07-20 13:42:19.000000000 +0200 +++ imap_gssapi.c 2006-07-20 11:42:19.000000000 +0000
@@ -73,6 +73,8 @@ static char sccsid[] = "@(#)imap_gssapi. @@ -73,6 +73,8 @@ static char sccsid[] = "@(#)imap_gssapi.
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -167,7 +167,7 @@
* Implementation of IMAP GSSAPI authentication according to RFC 1731. * Implementation of IMAP GSSAPI authentication according to RFC 1731.
*/ */
--- lex.c --- lex.c
+++ lex.c 2006-07-20 13:42:19.000000000 +0200 +++ lex.c 2006-07-20 11:42:19.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)lex.c 2.86 ( @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)lex.c 2.86 (
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -177,8 +177,8 @@
#include "extern.h" #include "extern.h"
#include <errno.h> #include <errno.h>
--- list.c --- list.c
+++ list.c 2006-07-20 13:42:19.000000000 +0200 +++ list.c 2006-07-20 11:42:19.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)list.c 2.61 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)list.c 2.62
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -187,13 +187,13 @@
#include <ctype.h> #include <ctype.h>
#include "extern.h" #include "extern.h"
--- mail.rc --- mail.rc
+++ mail.rc 2006-07-20 13:42:19.000000000 +0200 +++ mail.rc 2006-07-20 11:42:19.000000000 +0000
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
+set asksub append dot save crt=20 +set asksub append dot save crt=20
+ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via +ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via
--- mailx.1 --- mailx.1
+++ mailx.1 2006-07-20 13:42:22.000000000 +0200 +++ mailx.1 2006-07-20 11:42:22.000000000 +0000
@@ -164,7 +164,7 @@ Only applicable in combination with @@ -175,7 +175,7 @@ Only applicable in combination with
.IR \-f . .IR \-f .
.TP .TP
.B \-n .B \-n
@ -202,7 +202,7 @@
This option should be activated for This option should be activated for
.I mailx .I mailx
scripts that are invoked on more than one machine, scripts that are invoked on more than one machine,
@@ -3062,7 +3062,7 @@ in the user's home directory. @@ -3097,7 +3097,7 @@ in the user's home directory.
The name of an optional startup file The name of an optional startup file
to be read after ~/.mailrc. to be read after ~/.mailrc.
This variable is ignored if it is imported from the environment; This variable is ignored if it is imported from the environment;
@ -211,7 +211,7 @@
to allow bypassing the configuration with e. g. `MAILRC=/dev/null'. to allow bypassing the configuration with e. g. `MAILRC=/dev/null'.
Use this file for commands Use this file for commands
that are not understood by other mailx implementations. that are not understood by other mailx implementations.
@@ -3637,7 +3637,7 @@ Used as directory for temporary files in @@ -3674,7 +3674,7 @@ Used as directory for temporary files in
~/.mailrc ~/.mailrc
File giving initial commands. File giving initial commands.
.TP .TP
@ -221,21 +221,21 @@
.TP .TP
~/.mime.types ~/.mime.types
--- main.c --- main.c
+++ main.c 2006-07-20 14:13:32.000000000 +0200 +++ main.c 2011-05-13 11:25:38.211926290 +0000
@@ -92,7 +92,7 @@ int @@ -93,7 +93,7 @@ int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
const char optstr[] = "A:BHFINVT:R\rS:a:b:c:dDefh:inqr:s:tu:v~"; const char optstr[] = "A:BHEFINVT:R::S:a:b:c:dDefh:inqr:s:tu:v~";
- int i, existonly = 0, headersonly = 0, sendflag = 0; - int i, existonly = 0, headersonly = 0, sendflag = 0;
+ int i, existonly = 0, headersonly = 0, sendflag = 0, err = 1; + int i, existonly = 0, headersonly = 0, sendflag = 0, err = 1;
struct name *to, *cc, *bcc, *smopts, *replyto; struct name *to, *cc, *bcc, *replyto, *smopts;
struct attachment *attach; struct attachment *attach;
char *subject, *cp, *ef, *qf = NULL, *fromaddr = NULL, *Aflag = NULL; char *subject, *cp, *ef, *qf = NULL, *fromaddr = NULL, *Aflag = NULL;
@@ -395,8 +395,11 @@ main(int argc, char *argv[]) @@ -385,8 +385,11 @@ main(int argc, char *argv[])
case '?': case '?':
usage: usage:
fprintf(stderr, catgets(catd, CATSET, 135, 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); -"Usage: %s -eiIUdEFntBDNHV~ [-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); - exit(2);
+"Usage: %s [-BDFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr]\n\ +"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\ + [-r from-addr] [-h hops] [-A account] [-R reply-addr] [-S option] to-addr ...\n\
@ -245,7 +245,7 @@
} }
} }
if (ef != NULL) { if (ef != NULL) {
@@ -437,11 +440,13 @@ usage: @@ -427,11 +430,13 @@ usage:
goto usage; goto usage;
} }
if (Rflag && to != NULL) { if (Rflag && to != NULL) {
@ -262,12 +262,12 @@
} }
if (Iflag && ef == NULL) { if (Iflag && ef == NULL) {
--- makeconfig --- makeconfig
+++ makeconfig 2006-07-20 13:42:19.000000000 +0200 +++ makeconfig 2011-05-13 11:28:45.907925652 +0000
@@ -298,23 +298,49 @@ int main(void) @@ -304,23 +304,48 @@ int main(void)
'for socket functionality in libsocket and libnsl' \ 'for socket functionality in libsocket and libnsl' \
'#define HAVE_SOCKETS' '-lsocket -lnsl' '#define HAVE_SOCKETS' '-lsocket -lnsl'
-#link_check 'for IPv6 functionality' '#define HAVE_IPv6_FUNCS' <<\! -#link_check ipv6 'for IPv6 functionality' '#define HAVE_IPv6_FUNCS' <<\!
-##include "config.h" -##include "config.h"
-##include <sys/types.h> -##include <sys/types.h>
-##include <sys/socket.h> -##include <sys/socket.h>
@ -284,20 +284,19 @@
-# return 0; -# return 0;
-#} -#}
-#! -#!
+
+cat >$tmp1.c <<\! +cat >$tmp1.c <<\!
+#include "config.h" +#include "config.h"
+#include <sys/types.h> +#include <sys/types.h>
+#include <sys/socket.h> +#include <sys/socket.h>
+#include <netdb.h> +#include <netdb.h>
+#include <netinet/in.h> +#include <netinet/in.h>
+#ifdef HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h> +#include <arpa/inet.h>
+#endif /* HAVE_ARPA_INET_H */ +#endif /* HAVE_ARPA_INET_H */
+ +
+int main() +int main()
+{ +{
+ struct addrinfo a, *ap; + struct addrinfo a, *ap;
+ getaddrinfo("foo", "0", &a, &ap); + getaddrinfo("foo", "0", &a, &ap);
+ return 0; + return 0;
+} +}
@ -309,9 +308,9 @@
+#include <sys/socket.h> +#include <sys/socket.h>
+#include <netdb.h> +#include <netdb.h>
+#include <netinet/in.h> +#include <netinet/in.h>
+#ifdef HAVE_ARPA_INET_H +#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h> +#include <arpa/inet.h>
+#endif /* HAVE_ARPA_INET_H */ +#endif /* HAVE_ARPA_INET_H */
+ +
+int main() +int main()
+{ +{
@ -321,17 +320,17 @@
+} +}
+! +!
+ +
+<$tmp1.c link_check 'for IPv6 functionality getaddrinfo' '#define HAVE_GETADDRINFO' && +<$tmp1.c link_check ipv6 'for IPv6 functionality getaddrinfo' '#define HAVE_GETADDRINFO' &&
+ <$tmp2.c link_check 'for IPv6 functionality getnameinfo' '#define HAVE_GETNAMEINFO' + <$tmp2.c link_check ipv6 'for IPv6 functionality getnameinfo' '#define HAVE_GETNAMEINFO'
+echo \ +echo \
+'#if defined(HAVE_GETADDRINFO) && defined(HAVE_GETNAMEINFO) +'#if defined(HAVE_GETADDRINFO) && defined(HAVE_GETNAMEINFO)
+# define HAVE_IPv6_FUNCS +# define HAVE_IPv6_FUNCS
+#endif' >>$out +#endif' >>$out
link_check 'for Network Security Services (NSS)' '#define USE_SSL link_check nss 'for Network Security Services (NSS)' '#define USE_SSL
#define USE_NSS' '-lsmime3 -lnss3 -lssl3 -lnspr4 -lplc4' <<\! || \ #define USE_NSS' '-lsmime3 -lnss3 -lssl3 -lnspr4 -lplc4' <<\! || \
--- md5.c --- md5.c
+++ md5.c 2006-07-20 13:42:19.000000000 +0200 +++ md5.c 2006-07-20 11:42:19.000000000 +0000
@@ -33,6 +33,7 @@ documentation and/or software. @@ -33,6 +33,7 @@ documentation and/or software.
/* Sccsid @(#)md5.c 1.8 (gritter) 3/4/06 */ /* Sccsid @(#)md5.c 1.8 (gritter) 3/4/06 */
@ -341,8 +340,8 @@
#include "md5.h" #include "md5.h"
--- mime.c --- mime.c
+++ mime.c 2006-07-20 13:42:19.000000000 +0200 +++ mime.c 2006-07-20 11:42:19.000000000 +0000
@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)mime.c 2.67 @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)mime.c 2.71
#endif /* DOSCCS */ #endif /* DOSCCS */
#endif /* not lint */ #endif /* not lint */
@ -351,7 +350,7 @@
#include "extern.h" #include "extern.h"
#include <ctype.h> #include <ctype.h>
--- names.c --- names.c
+++ names.c 2006-07-20 13:42:22.000000000 +0200 +++ names.c 2006-07-20 11:42:22.000000000 +0000
@@ -48,6 +48,7 @@ static char sccsid[] = "@(#)names.c 2.22 @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)names.c 2.22
* Handle name lists. * Handle name lists.
*/ */
@ -361,7 +360,7 @@
#include "extern.h" #include "extern.h"
#include <sys/stat.h> #include <sys/stat.h>
--- nsserr.c --- nsserr.c
+++ nsserr.c 2006-07-20 13:42:22.000000000 +0200 +++ nsserr.c 2006-07-20 11:42:22.000000000 +0000
@@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
/* "@(#)nsserr.c 1.3 (gritter) 3/4/06" */ /* "@(#)nsserr.c 1.3 (gritter) 3/4/06" */
@ -371,7 +370,7 @@
#include <secerr.h> #include <secerr.h>
--- popen.c --- popen.c
+++ popen.c 2006-07-20 13:42:22.000000000 +0200 +++ popen.c 2006-07-20 11:42:22.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)popen.c 2.20 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)popen.c 2.20
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -381,8 +380,8 @@
#include "extern.h" #include "extern.h"
#include <sys/stat.h> #include <sys/stat.h>
--- quit.c --- quit.c
+++ quit.c 2006-07-20 13:42:22.000000000 +0200 +++ quit.c 2006-07-20 11:42:22.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)quit.c 2.28 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)quit.c 2.30
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -391,8 +390,8 @@
#include "extern.h" #include "extern.h"
#include <stdio.h> #include <stdio.h>
--- send.c --- send.c
+++ send.c 2006-07-20 13:42:22.000000000 +0200 +++ send.c 2006-07-20 11:42:22.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)send.c 2.83 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)send.c 2.86
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -401,7 +400,7 @@
#include "extern.h" #include "extern.h"
#include <time.h> #include <time.h>
--- sendout.c --- sendout.c
+++ sendout.c 2006-07-20 13:42:22.000000000 +0200 +++ sendout.c 2006-07-20 11:42:22.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)sendout.c 2. @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)sendout.c 2.
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -411,8 +410,8 @@
#include "extern.h" #include "extern.h"
#include <errno.h> #include <errno.h>
--- smtp.c --- smtp.c
+++ smtp.c 2006-07-20 13:42:22.000000000 +0200 +++ smtp.c 2006-07-20 11:42:22.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)smtp.c 2.38 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)smtp.c 2.43
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -421,7 +420,7 @@
#include <sys/utsname.h> #include <sys/utsname.h>
--- strings.c --- strings.c
+++ strings.c 2006-07-20 13:42:22.000000000 +0200 +++ strings.c 2006-07-20 11:42:22.000000000 +0000
@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)strings.c 2. @@ -50,6 +50,7 @@ static char sccsid[] = "@(#)strings.c 2.
* loop each time, so they need not be freed. * loop each time, so they need not be freed.
*/ */
@ -431,7 +430,7 @@
#include "extern.h" #include "extern.h"
--- temp.c --- temp.c
+++ temp.c 2006-07-20 13:42:22.000000000 +0200 +++ temp.c 2006-07-20 11:42:22.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)temp.c 2.8 ( @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)temp.c 2.8 (
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -441,8 +440,8 @@
#include "extern.h" #include "extern.h"
#include <errno.h> #include <errno.h>
--- tty.c --- tty.c
+++ tty.c 2006-07-20 13:42:22.000000000 +0200 +++ tty.c 2006-07-20 11:42:22.000000000 +0000
@@ -48,6 +48,7 @@ static char sccsid[] = "@(#)tty.c 2.28 ( @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)tty.c 2.29 (
* Generally useful tty stuff. * Generally useful tty stuff.
*/ */
@ -451,7 +450,7 @@
#include "extern.h" #include "extern.h"
#include <errno.h> #include <errno.h>
--- v7.local.c --- v7.local.c
+++ v7.local.c 2006-07-20 13:42:22.000000000 +0200 +++ v7.local.c 2006-07-20 11:42:22.000000000 +0000
@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)v7.local.c 2 @@ -50,6 +50,7 @@ static char sccsid[] = "@(#)v7.local.c 2
* Local routines that are installation dependent. * Local routines that are installation dependent.
*/ */
@ -461,8 +460,8 @@
#include "extern.h" #include "extern.h"
#include <sys/stat.h> #include <sys/stat.h>
--- vars.c --- vars.c
+++ vars.c 2006-07-20 13:42:22.000000000 +0200 +++ vars.c 2006-07-20 11:42:22.000000000 +0000
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)vars.c 2.11 @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)vars.c 2.12
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -471,7 +470,7 @@
#include "extern.h" #include "extern.h"
--- catd/en_US --- catd/en_US
+++ catd/en_US 2006-07-20 14:48:28.000000000 +0200 +++ catd/en_US 2006-07-20 12:48:28.000000000 +0000
@@ -180,7 +180,10 @@ The following ~ escapes are defined:\n\ @@ -180,7 +180,10 @@ The following ~ escapes are defined:\n\
132 No applicable messages\n 132 No applicable messages\n
133 %d: Inappropriate message\n 133 %d: Inappropriate message\n

BIN
mailx-12.5.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,5 +1,5 @@
--- openssl.c.orig --- openssl.c
+++ openssl.c +++ openssl.c 2011-05-13 00:00:00.000000000 +0000
@@ -63,6 +63,7 @@ static sigjmp_buf ssljmp; @@ -63,6 +63,7 @@ static sigjmp_buf ssljmp;
#include <openssl/x509.h> #include <openssl/x509.h>
#include <openssl/pem.h> #include <openssl/pem.h>
@ -8,16 +8,7 @@
#include "rcv.h" #include "rcv.h"
#include <errno.h> #include <errno.h>
@@ -105,7 +106,7 @@ static SSL_METHOD *ssl_select_method(con @@ -171,6 +172,10 @@ ssl_init(void)
static void ssl_load_verifications(struct sock *sp);
static void ssl_certificate(struct sock *sp, const char *uhp);
static enum okay ssl_check_host(const char *server, struct sock *sp);
-static int smime_verify(struct message *m, int n, STACK *chain,
+static int smime_verify(struct message *m, int n, STACK_OF(X509) *chain,
X509_STORE *store);
static EVP_CIPHER *smime_cipher(const char *name);
static int ssl_password_cb(char *buf, int size, int rwflag, void *userdata);
@@ -166,6 +167,10 @@ ssl_init(void)
verbose = value("verbose") != NULL; verbose = value("verbose") != NULL;
if (initialized == 0) { if (initialized == 0) {
SSL_library_init(); SSL_library_init();
@ -28,7 +19,7 @@
initialized = 1; initialized = 1;
} }
if (rand_init == 0) if (rand_init == 0)
@@ -211,9 +216,12 @@ ssl_select_method(const char *uhp) @@ -216,9 +221,12 @@ ssl_select_method(const char *uhp)
cp = ssl_method_string(uhp); cp = ssl_method_string(uhp);
if (cp != NULL) { if (cp != NULL) {
@ -42,61 +33,3 @@
method = SSLv3_client_method(); method = SSLv3_client_method();
else if (equal(cp, "tls1")) else if (equal(cp, "tls1"))
method = TLSv1_client_method(); method = TLSv1_client_method();
@@ -308,7 +316,7 @@ ssl_check_host(const char *server, struc
X509 *cert;
X509_NAME *subj;
char data[256];
- /*GENERAL_NAMES*/STACK *gens;
+ STACK_OF(GENERAL_NAME) *gens;
GENERAL_NAME *gen;
int i;
@@ -494,7 +502,7 @@ smime_sign(FILE *ip, struct header *head
}
static int
-smime_verify(struct message *m, int n, STACK *chain, X509_STORE *store)
+smime_verify(struct message *m, int n, STACK_OF(X509) *chain, X509_STORE *store)
{
struct message *x;
char *cp, *sender, *to, *cc, *cnttype;
@@ -503,7 +511,8 @@ smime_verify(struct message *m, int n, S
off_t size;
BIO *fb, *pb;
PKCS7 *pkcs7;
- STACK *certs, *gens;
+ STACK_OF(X509) *certs;
+ STACK_OF(GENERAL_NAME) *gens;
X509 *cert;
X509_NAME *subj;
char data[LINESIZE];
@@ -612,7 +621,7 @@ cverify(void *vp)
{
int *msgvec = vp, *ip;
int ec = 0;
- STACK *chain = NULL;
+ STACK_OF(X509) *chain = NULL;
X509_STORE *store;
char *ca_dir, *ca_file;
@@ -685,7 +694,7 @@ smime_encrypt(FILE *ip, const char *cert
X509 *cert;
PKCS7 *pkcs7;
BIO *bb, *yb;
- STACK *certs;
+ STACK_OF(X509) *certs;
EVP_CIPHER *cipher;
certfile = expand((char *)certfile);
@@ -948,9 +957,9 @@ smime_certsave(struct message *m, int n,
off_t size;
BIO *fb, *pb;
PKCS7 *pkcs7;
- STACK *certs;
+ STACK_OF(X509) *certs;
X509 *cert;
- STACK *chain = NULL;
+ STACK_OF(X509) *chain = NULL;
enum okay ok = OKAY;
message_number = n;

View File

@ -1,4 +1,42 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Fri May 13 13:29:52 CEST 2011 - werner@suse.de
- Update to heirloom mailx 12.5
* Better detection of base64 encoded text if acrossed a line
* A null pointer dereference that lead to a segmentation fault
when the user hit return at a yes/no question has been fixed
* When both standard input and standard output refer to a
terminal, ignore SIGPIPE
* With the "-E" command line option or if the "skipemptybody"
variable is set, outgoing messages that contain no text in
their first or only part are not sent but silently discarded.
* When an attachment that would have a "text/something" content
type contains illegal byte sequences, it is now reliably sent
out with the "application/octet-stream" content type instead
* Fixed a bug that caused messages to be truncated with IMAP servers that
use LF as line ending in message data, such as Google Mail (reported by
Matthew L. Shobe).
* Do not run filename expansion for IMAP or POP3 mailboxes names, making
it possible to select mailboxes that contain both brackets and spaces
in their names (reported by Matthew L. Shobe).
* Fixed the format of the timezone in "Date" header fields for zones in
the Western Hemisphere whose offsets are not an integral number of hours
(patch by Matthew Fischer).
* Fixed a message corruption that occurred when the "inc" command was used
with a mbox format mailbox after encrypted messages had been viewed
(reported by Martin Neitzel).
* Fixed a condition that caused mailx to hang when looking at a message,
copying that message, and issuing a "z" command evaluating an uncached
portion of an IMAP folder.
* Make it compile with OpenSSL 1.0.0-beta2
* For RFC 2047 MIME "encoded-word" parts in headers, assume that the end of
each word resets the conversion state (Yedidyah Bar-David).
* When the ORGANIZATION variable has an empty value, do not generate an
"Organization:" header field. Previously, this condition resulted in
mailx refusing to send mail
- Fix my Reply-To patch found by milli
------------------------------------------------------------------
Sat Apr 9 21:30:46 UTC 2011 - crrodriguez@opensuse.org Sat Apr 9 21:30:46 UTC 2011 - crrodriguez@opensuse.org
- Allow mailx to compile properly when openSSL is built without - Allow mailx to compile properly when openSSL is built without

View File

@ -26,13 +26,13 @@ Group: Productivity/Networking/Email/Utilities
Provides: mail Provides: mail
Recommends: smtp_daemon Recommends: smtp_daemon
AutoReqProv: on AutoReqProv: on
Version: 12.2 Version: 12.5
Release: 158 Release: 1
Summary: A MIME-Capable Implementation of the mailx Command Summary: A MIME-Capable Implementation of the mailx Command
Source: mailx-%{version}.tar.bz2 Source: mailx-%{version}.tar.bz2
Patch: mailx-%{version}.dif Patch: mailx-%{version}.dif
Patch1: nail-11.25-path.dif Patch1: nail-11.25-path.dif
Patch2: mailx-12.1-replyto.patch Patch2: mailx-%{version}-replyto.patch
Patch3: nail-11.25-ttychar.dif Patch3: nail-11.25-ttychar.dif
Patch4: nail-11.25-toaddr.dif Patch4: nail-11.25-toaddr.dif
Patch5: mailx-%{version}-mime.dif Patch5: mailx-%{version}-mime.dif
@ -53,8 +53,9 @@ minor enhancements like the ability to set a "From:" address.
%patch3 -p0 -b .ttychr %patch3 -p0 -b .ttychr
%patch4 -p0 -b .toaddr %patch4 -p0 -b .toaddr
%patch5 -p0 -b .mime %patch5 -p0 -b .mime
%patch6 -p0 -b .ssl
exit
%patch -p0 %patch -p0
%patch6
%build %build
CC=gcc CC=gcc

View File

@ -85,7 +85,7 @@
if ((obuf = Popen(cmd, "r", cp, 0)) == NULL) { if ((obuf = Popen(cmd, "r", cp, 0)) == NULL) {
perror(cmd); perror(cmd);
return; return;
@@ -1049,7 +1049,7 @@ mespipe(char *cmd) @@ -1051,7 +1051,7 @@ mespipe(char *cmd)
* stdout = new message. * stdout = new message.
*/ */
if ((shell = value("SHELL")) == NULL) if ((shell = value("SHELL")) == NULL)
@ -198,7 +198,7 @@
tempEdit, NULL, NULL) < 0) { tempEdit, NULL, NULL) < 0) {
--- fio.c --- fio.c
+++ fio.c 2005-10-14 13:44:09.000000000 +0000 +++ fio.c 2005-10-14 13:44:09.000000000 +0000
@@ -539,7 +539,7 @@ globname(char *name) @@ -542,7 +542,7 @@ globname(char *name)
} }
snprintf(cmdbuf, sizeof cmdbuf, "echo %s", name); snprintf(cmdbuf, sizeof cmdbuf, "echo %s", name);
if ((shell = value("SHELL")) == NULL) if ((shell = value("SHELL")) == NULL)
@ -209,7 +209,7 @@
close(pivec[0]); close(pivec[0]);
--- main.c --- main.c
+++ main.c 2005-10-14 13:44:09.000000000 +0000 +++ main.c 2005-10-14 13:44:09.000000000 +0000
@@ -396,7 +396,7 @@ usage: @@ -403,7 +403,7 @@ usage:
rcvmode = !to && !tflag; rcvmode = !to && !tflag;
spreserve(); spreserve();
if (!nosrc) if (!nosrc)
@ -231,7 +231,7 @@
sigaddset(&nset, SIGINT); sigaddset(&nset, SIGINT);
--- send.c --- send.c
+++ send.c 2005-10-14 13:44:09.000000000 +0000 +++ send.c 2005-10-14 13:44:09.000000000 +0000
@@ -1049,7 +1049,7 @@ getpipefile(char *pipecmd, FILE **qbuf, @@ -1088,7 +1088,7 @@ getpipefile(char *pipecmd, FILE **qbuf,
Ftfree(&tempPipe); Ftfree(&tempPipe);
} }
if ((shell = value("SHELL")) == NULL) if ((shell = value("SHELL")) == NULL)
@ -242,7 +242,7 @@
perror(pipecmd); perror(pipecmd);
--- sendout.c --- sendout.c
+++ sendout.c 2005-10-14 13:44:09.000000000 +0000 +++ sendout.c 2005-10-14 13:44:09.000000000 +0000
@@ -837,7 +837,7 @@ start_mta(struct name *to, struct name * @@ -884,7 +884,7 @@ start_mta(struct name *to, struct name *
if ((cp = value("sendmail")) != NULL) if ((cp = value("sendmail")) != NULL)
cp = expand(cp); cp = expand(cp);
else else

View File

@ -1,9 +1,11 @@
--- main.c --- main.c
+++ main.c 2005-10-17 14:36:24.000000000 +0200 +++ main.c 2011-05-13 09:28:48.052426589 +0000
@@ -184,10 +184,27 @@ @@ -186,6 +186,25 @@ main(int argc, char *argv[])
subject = NULL;
replyto = NULL;
if (*argv) { + if (*argv) {
/* + /*
+ * Be compatible with broken mail behaviour, which use direct + * Be compatible with broken mail behaviour, which use direct
+ * sendmail options for sending mails if getopt is skiped + * sendmail options for sending mails if getopt is skiped
+ * by first argument which is non option like a mail address. + * by first argument which is non option like a mail address.
@ -19,17 +21,12 @@
+ to = checkaddrs(cat(to, nalloc(*opt, GTO))); + to = checkaddrs(cat(to, nalloc(*opt, GTO)));
+ argc--, argv++; + argc--, argv++;
+ } + }
+ }
+ +
+ /* while ((i = getopt(argc, argv, optstr)) != EOF) {
* Use -R option for send and folder mode. In folder mode -R is used switch (i) {
* for read only and in send mode for providing a reply-to address. case 'V':
*/ @@ -380,8 +399,19 @@ usage:
- char **opt = argv;
+ opt = argv;
while (*(++opt) && (**opt)) {
char *cp = *opt;
if (*cp == '-' && *(cp+1) == 'R') {
@@ -386,8 +403,19 @@
ef = argv[optind]; ef = argv[optind];
} }
} else { } else {

View File

@ -1,8 +1,8 @@
--- mime.c --- mime.c
+++ mime.c 2005-10-14 16:28:39.000000000 +0200 +++ mime.c 2005-10-14 14:28:39.000000000 +0000
@@ -260,7 +260,19 @@ @@ -261,7 +261,19 @@ getcharset(int isclean)
else if (isclean & MIME_HIGHBIT) { charset = (wantcharset && wantcharset != (char *)-1) ?
charset = wantcharset ? wantcharset : value("charset"); wantcharset : value("charset");
if (charset == NULL) { if (charset == NULL) {
- charset = defcharset; - charset = defcharset;
+ char *t = value("ttycharset"); + char *t = value("ttycharset");