upas/marshal: change Inline: to Include: header, interpret even withou -8 flag
after some thought, the file attachment headers Attach: and Include: (before Inline:) are more like the Subject: line and should be interpreted every time.
This commit is contained in:
parent
be01be80cc
commit
0e4fc14f7e
|
@ -155,12 +155,9 @@ pgp encrypt the message
|
||||||
.B -8
|
.B -8
|
||||||
reads recipients (
|
reads recipients (
|
||||||
.B To:
|
.B To:
|
||||||
and
|
|
||||||
.B Cc:
|
.B Cc:
|
||||||
) and attachments (
|
|
||||||
.B Attach:
|
|
||||||
and
|
and
|
||||||
.B Inline:
|
.B Bcc:
|
||||||
) from RFC 822 header of the message
|
) from RFC 822 header of the message
|
||||||
.PD
|
.PD
|
||||||
.PP
|
.PP
|
||||||
|
@ -184,6 +181,17 @@ For example:
|
||||||
.EX
|
.EX
|
||||||
upasname=natasha@kremvax.com upas/mail boris@squirrel.com
|
upasname=natasha@kremvax.com upas/mail boris@squirrel.com
|
||||||
.EE
|
.EE
|
||||||
|
.PP
|
||||||
|
.I Marshal
|
||||||
|
interprets file attachment headers
|
||||||
|
.B Attach:
|
||||||
|
and
|
||||||
|
.B Include:
|
||||||
|
as if the
|
||||||
|
.B -A
|
||||||
|
or
|
||||||
|
.B -a
|
||||||
|
options would have been given.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.TP
|
.TP
|
||||||
.B /mail/box/*/dead.letter
|
.B /mail/box/*/dead.letter
|
||||||
|
|
|
@ -47,7 +47,7 @@ enum {
|
||||||
Hx,
|
Hx,
|
||||||
Hprecedence,
|
Hprecedence,
|
||||||
Hattach,
|
Hattach,
|
||||||
Hinline,
|
Hinclude,
|
||||||
Nhdr,
|
Nhdr,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,8 +72,8 @@ char *hdrs[Nhdr] = {
|
||||||
[Hcontent] "content-",
|
[Hcontent] "content-",
|
||||||
[Hx] "x-",
|
[Hx] "x-",
|
||||||
[Hprecedence] "precedence",
|
[Hprecedence] "precedence",
|
||||||
[Hattach] "attach",
|
[Hattach] "attach:",
|
||||||
[Hinline] "inline",
|
[Hinclude] "include:",
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Ctype {
|
struct Ctype {
|
||||||
|
@ -309,7 +309,7 @@ main(int argc, char **argv)
|
||||||
*/
|
*/
|
||||||
holding = holdon();
|
holding = holdon();
|
||||||
headersrv = readheaders(&in, &flags, &hdrstring,
|
headersrv = readheaders(&in, &flags, &hdrstring,
|
||||||
eightflag? &to: nil, eightflag? &cc: nil, eightflag? &bcc: nil, eightflag? l: nil, 1);
|
eightflag? &to: nil, eightflag? &cc: nil, eightflag? &bcc: nil, l, 1);
|
||||||
if(rfc822syntaxerror){
|
if(rfc822syntaxerror){
|
||||||
Bdrain(&in);
|
Bdrain(&in);
|
||||||
fatal("rfc822 syntax error, message not sent");
|
fatal("rfc822 syntax error, message not sent");
|
||||||
|
@ -501,10 +501,10 @@ readheaders(Biobuf *in, int *fp, String **sp, Addr **top, Addr **ccp, Addr **bcc
|
||||||
s_append(s, "\n");
|
s_append(s, "\n");
|
||||||
break;
|
break;
|
||||||
case Hattach:
|
case Hattach:
|
||||||
case Hinline:
|
case Hinclude:
|
||||||
if(att == nil)
|
if(att == nil)
|
||||||
goto Addhdr;
|
break;
|
||||||
*att = mkattach(hdrval(s_to_c(sline)), nil, hdrtype == Hinline);
|
*att = mkattach(hdrval(s_to_c(sline)), nil, hdrtype == Hinclude);
|
||||||
if(*att != nil)
|
if(*att != nil)
|
||||||
att = &(*att)->next;
|
att = &(*att)->next;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue