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
2 changed files with 19 additions and 11 deletions
|
@ -155,12 +155,9 @@ pgp encrypt the message
|
|||
.B -8
|
||||
reads recipients (
|
||||
.B To:
|
||||
and
|
||||
.B Cc:
|
||||
) and attachments (
|
||||
.B Attach:
|
||||
and
|
||||
.B Inline:
|
||||
.B Bcc:
|
||||
) from RFC 822 header of the message
|
||||
.PD
|
||||
.PP
|
||||
|
@ -184,6 +181,17 @@ For example:
|
|||
.EX
|
||||
upasname=natasha@kremvax.com upas/mail boris@squirrel.com
|
||||
.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
|
||||
.TP
|
||||
.B /mail/box/*/dead.letter
|
||||
|
|
|
@ -47,7 +47,7 @@ enum {
|
|||
Hx,
|
||||
Hprecedence,
|
||||
Hattach,
|
||||
Hinline,
|
||||
Hinclude,
|
||||
Nhdr,
|
||||
};
|
||||
|
||||
|
@ -72,8 +72,8 @@ char *hdrs[Nhdr] = {
|
|||
[Hcontent] "content-",
|
||||
[Hx] "x-",
|
||||
[Hprecedence] "precedence",
|
||||
[Hattach] "attach",
|
||||
[Hinline] "inline",
|
||||
[Hattach] "attach:",
|
||||
[Hinclude] "include:",
|
||||
};
|
||||
|
||||
struct Ctype {
|
||||
|
@ -309,7 +309,7 @@ main(int argc, char **argv)
|
|||
*/
|
||||
holding = holdon();
|
||||
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){
|
||||
Bdrain(&in);
|
||||
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");
|
||||
break;
|
||||
case Hattach:
|
||||
case Hinline:
|
||||
case Hinclude:
|
||||
if(att == nil)
|
||||
goto Addhdr;
|
||||
*att = mkattach(hdrval(s_to_c(sline)), nil, hdrtype == Hinline);
|
||||
break;
|
||||
*att = mkattach(hdrval(s_to_c(sline)), nil, hdrtype == Hinclude);
|
||||
if(*att != nil)
|
||||
att = &(*att)->next;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue