TMA (the TTI Trusted Mail Agent) was an early implementation of
encrypted mail and is long gone. There were a few vestigial bits
of this support left in nmh, and this is finally removing them.
This includes the check for the "Encrypted" header field in various
scan formats and some code to return the code SCNENC from scan()
function where it would have special handling by programs like inc(1).
16 files changed:
%; Like scan.default, but the date is printed in MM/DD/YY format rather than
%; MM/DD.
%;
%; Like scan.default, but the date is printed in MM/DD/YY format rather than
%; MM/DD.
%;
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
%02(mon{date})/%02(mday{date})/%(void(year{date}))%02(modulo 100)%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%02(mon{date})/%02(mday{date})/%(void(year{date}))%02(modulo 100)%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%; Like scan.default, but the date is printed in YYYY-MM-DD format rather than
%; MM/DD.
%;
%; Like scan.default, but the date is printed in YYYY-MM-DD format rather than
%; MM/DD.
%;
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
%4(year{date})-%02(mon{date})-%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%4(year{date})-%02(mon{date})-%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%4(msg)\
%;
%; If it's the current message, output a '+' in the next column, otherwise
%4(msg)\
%;
%; If it's the current message, output a '+' in the next column, otherwise
-%; a space. Also use '-' if it's got a "Replied" header and 'E' if it's
-%; encrypted (not currently supported)
+%; a space. Also use '-' if it's got a "Replied" header.
-%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%<(cur)+%| %>%<{replied}-%| %>\
%;
%; Output the date, but mark it with a '*' if it's missing and was synthesized.
%; Note the use of 02 to make sure the date is padded with a leading zero.
%;
%; Output the date, but mark it with a '*' if it's missing and was synthesized.
%; Note the use of 02 to make sure the date is padded with a leading zero.
%; format string (for non-UK sites) which was compiled into the
%; command "scan". See the source file "h/scansbr.h" for details.
%;
%; format string (for non-UK sites) which was compiled into the
%; command "scan". See the source file "h/scansbr.h" for details.
%;
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%;
%<(cur)%(zputlit(lit \e[33;40m))%>\
%<(unseen)%(zputlit(lit \e[36;40m))%>\
%;
%<(cur)%(zputlit(lit \e[33;40m))%>\
%<(unseen)%(zputlit(lit \e[36;40m))%>\
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%<(cur)>%| %>\
%<{status} %|N%>\
%<(cur)>%| %>\
%<{status} %|N%>\
-%<{replied}R%?{encrypted}E%| %>\
%4(msg) \
%<(mymbox{from})%<{to}To: %13(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%4(msg) \
%<(mymbox{from})%<{to}To: %13(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%; format for scan, that doesn't do any RFC-2047 decoding of
%; header components.
%;
%; format for scan, that doesn't do any RFC-2047 decoding of
%; header components.
%;
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%> \
%{subject}%<{body}<<%{body}>>%>
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%> \
%{subject}%<{body}<<%{body}>>%>
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%5(size) \
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%5(size) \
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
%02(mon{date})/%02(mday{date}) \
%02(hour{date}):%02(min{date})%3(tzone{date})\
%<{date} %|*%>\
%02(mon{date})/%02(mday{date}) \
%02(hour{date}):%02(min{date})%3(tzone{date})\
%<{date} %|*%>\
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
%(void(rclock{date}))\
%<(gt 15768000)%03(month{date})%(void(year{date}))%02(modulo 100)\
%?(gt 604800)%02(mday{date})%03(month{date})\
%(void(rclock{date}))\
%<(gt 15768000)%03(month{date})%(void(year{date}))%02(modulo 100)\
%?(gt 604800)%02(mday{date})%03(month{date})\
-%4(msg)%<(cur)+%| %>%<(unseen)U%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<(unseen)U%| %>%<{replied}-%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%> \
IF_S continue else goto L2
CHAR '-'
GOTO L3
IF_S continue else goto L2
CHAR '-'
GOTO L3
-L2: LS_COMP, comp "encrypted"
- IF_S continue else goto L4
- CHAR 'E'
-L3: GOTO L5
-L4: CHAR ' '
-L5: PARSEDATE, c_name "date", c_type <DATE>
+L2: CHAR ' '
+L3: PARSEDATE, c_name "date", c_type <DATE>
LV_MON, c_name "date", c_type <DATE>
NUMF, width 2, fill '0'
CHAR '/'
LV_MON, c_name "date", c_type <DATE>
NUMF, width 2, fill '0'
CHAR '/'
LV_MDAY, c_name "date", c_type <DATE>
NUMF, width 2, fill '0'
LS_COMP, comp "date", c_type <DATE>
LV_MDAY, c_name "date", c_type <DATE>
NUMF, width 2, fill '0'
LS_COMP, comp "date", c_type <DATE>
- IF_S continue else goto L6
+ IF_S continue else goto L4
- GOTO L7
-L6: CHAR '*'
-L7: MYMBOX, c_name "from", c_type <ADDR>
+ GOTO L5
+L4: CHAR '*'
+L5: MYMBOX, c_name "from", c_type <ADDR>
LV_COMPFLAG, comp "from", c_type <ADDR>
LV_COMPFLAG, comp "from", c_type <ADDR>
- IF_V_NE 0 continue else goto L8
+ IF_V_NE 0 continue else goto L6
LS_COMP, comp "to", c_type <ADDR>
LS_COMP, comp "to", c_type <ADDR>
- IF_S continue else goto L8
+ IF_S continue else goto L6
LIT "To:"
PARSEADDR, c_name "to", c_type <ADDR>
LS_FRIENDLY, c_name "to", c_type <ADDR>
LS_DECODE
STRF, width 14, fill ' '
LIT "To:"
PARSEADDR, c_name "to", c_type <ADDR>
LS_FRIENDLY, c_name "to", c_type <ADDR>
LS_DECODE
STRF, width 14, fill ' '
-L8: IF_V_EQ 0 continue else goto L9
+L6: IF_V_EQ 0 continue else goto L7
PARSEADDR, c_name "from", c_type <ADDR>
LS_FRIENDLY, c_name "from", c_type <ADDR>
LS_DECODE
STRF, width 17, fill ' '
PARSEADDR, c_name "from", c_type <ADDR>
LS_FRIENDLY, c_name "from", c_type <ADDR>
LS_DECODE
STRF, width 17, fill ' '
LS_COMP, comp "subject"
LS_DECODE
STR
LS_COMP, comp "body"
LS_COMP, comp "subject"
LS_DECODE
STR
LS_COMP, comp "body"
- IF_S continue else goto L10
+ IF_S continue else goto L8
LIT "<<"
COMP, comp "body"
LIT ">>"
LIT "<<"
COMP, comp "body"
LIT ">>"
IF_S continue else goto L2
CHAR '-'
GOTO L3
IF_S continue else goto L2
CHAR '-'
GOTO L3
-L2: LS_COMP, comp "encrypted"
- IF_S continue else goto L4
- CHAR 'E'
-L3: GOTO L5
-L4: CHAR ' '
-L5: PARSEDATE, c_name "date", c_type <DATE>
+L2: CHAR ' '
+L3: PARSEDATE, c_name "date", c_type <DATE>
LV_MON, c_name "date", c_type <DATE>
NUMF, width 2, fill '0'
CHAR '/'
LV_MON, c_name "date", c_type <DATE>
NUMF, width 2, fill '0'
CHAR '/'
LV_MDAY, c_name "date", c_type <DATE>
NUMF, width 2, fill '0'
LS_COMP, comp "date", c_type <DATE>
LV_MDAY, c_name "date", c_type <DATE>
NUMF, width 2, fill '0'
LS_COMP, comp "date", c_type <DATE>
- IF_S continue else goto L6
+ IF_S continue else goto L4
- GOTO L7
-L6: CHAR '*'
-L7: MYMBOX, c_name "from", c_type <ADDR>
+ GOTO L5
+L4: CHAR '*'
+L5: MYMBOX, c_name "from", c_type <ADDR>
LV_COMPFLAG, comp "from", c_type <ADDR>
LV_COMPFLAG, comp "from", c_type <ADDR>
- IF_V_NE 0 continue else goto L8
+ IF_V_NE 0 continue else goto L6
LS_COMP, comp "to", c_type <ADDR>
LS_COMP, comp "to", c_type <ADDR>
- IF_S continue else goto L8
+ IF_S continue else goto L6
LIT "To:"
PARSEADDR, c_name "to", c_type <ADDR>
LS_FRIENDLY, c_name "to", c_type <ADDR>
LS_DECODE
LS_UNQUOTE
STRF, width 14, fill ' '
LIT "To:"
PARSEADDR, c_name "to", c_type <ADDR>
LS_FRIENDLY, c_name "to", c_type <ADDR>
LS_DECODE
LS_UNQUOTE
STRF, width 14, fill ' '
-L8: IF_V_EQ 0 continue else goto L9
+L6: IF_V_EQ 0 continue else goto L7
PARSEADDR, c_name "from", c_type <ADDR>
LS_FRIENDLY, c_name "from", c_type <ADDR>
LS_DECODE
LS_UNQUOTE
STRF, width 17, fill ' '
PARSEADDR, c_name "from", c_type <ADDR>
LS_FRIENDLY, c_name "from", c_type <ADDR>
LS_DECODE
LS_UNQUOTE
STRF, width 17, fill ' '
LS_COMP, comp "subject"
LS_DECODE
STR
LS_COMP, comp "body"
LS_COMP, comp "subject"
LS_DECODE
STR
LS_COMP, comp "body"
- IF_S continue else goto L10
+ IF_S continue else goto L8
LIT "<<"
COMP, comp "body"
LIT ">>"
LIT "<<"
COMP, comp "body"
LIT ">>"
default:
if (aud)
fputs (charstring_buffer (scanl), aud);
default:
if (aud)
fputs (charstring_buffer (scanl), aud);
/*
* Run the external program hook on the message.
*/
/*
* Run the external program hook on the message.
*/
default:
/*
* Run the external program hook on the message.
default:
/*
* Run the external program hook on the message.
hdrflag ? file : NULL, 0L, 1, &scanl);
if (scanl)
charstring_clear(scanl);
hdrflag ? file : NULL, 0L, 1, &scanl);
if (scanl)
charstring_clear(scanl);
- if (state != SCNMSG && state != SCNENC)
break;
}
charstring_free (scanl);
break;
}
charstring_free (scanl);
msgnum == mp->curmsg, unseen,
folder, 0L, 1, &scanl)) {
case SCNMSG:
msgnum == mp->curmsg, unseen,
folder, 0L, 1, &scanl)) {
case SCNMSG:
{
static bool deja_vu;
static int tty_width;
{
static bool deja_vu;
static int tty_width;
- int i, compnum, encrypted, state;
char *cp, *tmpbuf, *startbody, **nxtbuf;
char *saved_c_text = NULL;
struct comp *cptr;
char *cp, *tmpbuf, *startbody, **nxtbuf;
char *saved_c_text = NULL;
struct comp *cptr;
cptr = fmt_findcomp("folder");
if (cptr && folder)
cptr->c_text = mh_xstrdup(folder);
cptr = fmt_findcomp("folder");
if (cptr && folder)
cptr->c_text = mh_xstrdup(folder);
- if (fmt_addcompentry("encrypted")) {
- ncomps++;
- }
cptr = fmt_findcomp("dtimenow");
if (cptr)
cptr->c_text = getcpy(dtimenow (0));
cptr = fmt_findcomp("dtimenow");
if (cptr)
cptr->c_text = getcpy(dtimenow (0));
if (noisy)
fputs (charstring_buffer (*scanl), stdout);
if (noisy)
fputs (charstring_buffer (*scanl), stdout);
- cptr = fmt_findcomp ("encrypted");
- encrypted = cptr && cptr->c_text;
-
/* return dynamically allocated buffers to pool */
while ((cptr = *savecomp++)) {
cptr->c_text = NULL;
/* return dynamically allocated buffers to pool */
while ((cptr = *savecomp++)) {
cptr->c_text = NULL;
if (scnout && (ferror(scnout) || fclose (scnout) == EOF))
DIEWRERR();
if (scnout && (ferror(scnout) || fclose (scnout) == EOF))
DIEWRERR();
- return state != FILEEOF ? SCNERR : encrypted ? SCNENC : SCNMSG;
+ return state != FILEEOF ? SCNERR : SCNMSG;
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information. */
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information. */
-#define SCNENC 2 /* message just fine, but encrypted(!!) */
#define SCNMSG 1 /* message just fine */
#define SCNEOF 0 /* empty message */
#define SCNERR (-1) /* error message */
#define SCNMSG 1 /* message just fine */
#define SCNEOF 0 /* empty message */
#define SCNERR (-1) /* error message */
#ifndef UK
#define FORMAT \
#ifndef UK
#define FORMAT \
-"%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+"%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
%<(zero)%17(decode(friendly{from}))%> \
%(decode{subject})%<{body}<<%{body}>>%>\n"
#else
#define FORMAT \
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
%<(zero)%17(decode(friendly{from}))%> \
%(decode{subject})%<{body}<<%{body}>>%>\n"
#else
#define FORMAT \
-"%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+"%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
%02(mday{date})/%02(mon{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
%<(zero)%17(decode(friendly{from}))%> \
%02(mday{date})/%02(mon{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
%<(zero)%17(decode(friendly{from}))%> \