diff -Nru mblaze-1.0/contrib/_mblaze mblaze-1.1/contrib/_mblaze --- mblaze-1.0/contrib/_mblaze 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/contrib/_mblaze 2021-01-14 15:53:00.000000000 +0000 @@ -14,7 +14,7 @@ _files "$expl[@]" && ret=0 fi - curmsg=$(mseq .) + curmsg=$(mseq . 2>/dev/null) if [[ -z $curmsg || ! -f $curmsg ]]; then _message 'no current sequence' return $ret diff -Nru mblaze-1.0/contrib/mencrypt mblaze-1.1/contrib/mencrypt --- mblaze-1.0/contrib/mencrypt 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/contrib/mencrypt 2021-01-14 15:53:00.000000000 +0000 @@ -10,12 +10,18 @@ FROM=$(maddr -a -h from "$1" | sed 1q) [ "$FROM" ] && key="--default-key=$FROM" +if command -v gpg2 >/dev/null; then + GPG=gpg2 +else + GPG=gpg +fi + TMPD=$(mktemp -d -t mencrypt.XXXXXX) trap "rm -rf '$TMPD'" INT TERM EXIT awk '/^$/,0' "$1" | mmime | - gpg2 "$key" --armor --encrypt --sign $FLAGS -o "$TMPD/msg.asc" || + $GPG "$key" --armor --encrypt --sign $FLAGS -o "$TMPD/msg.asc" || exit $? printf 'Version: 1\n' >"$TMPD/version" diff -Nru mblaze-1.0/contrib/mgpg mblaze-1.1/contrib/mgpg --- mblaze-1.0/contrib/mgpg 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/contrib/mgpg 2021-01-14 15:53:00.000000000 +0000 @@ -1,5 +1,11 @@ #!/bin/sh -e +if command -v gpg2 >/dev/null; then + GPG=gpg2 +else + GPG=gpg +fi + tmp=$(mktemp -t mgpg.XXXXXX) trap "rm -f '$tmp'" INT TERM EXIT @@ -14,7 +20,7 @@ /: application\/octet-stream/ {if (supported) print $1}') if [ "$n" ]; then - mshow -O "$tmp" "$n" | gpg2 -d 2>&1 || exit 0 + mshow -O "$tmp" "$n" | $GPG -d 2>&1 || exit 0 exit 64 fi exit 63 diff -Nru mblaze-1.0/contrib/mmailto mblaze-1.1/contrib/mmailto --- mblaze-1.0/contrib/mmailto 1970-01-01 00:00:00.000000000 +0000 +++ mblaze-1.1/contrib/mmailto 2021-01-14 15:53:00.000000000 +0000 @@ -0,0 +1,58 @@ +#!/bin/sh +# mmailto mailto:... - mailto: handler spawning mcom in a terminal emulator + +tryterm() { + if [ -z "$TERMINAL" ] && command -v "$1" >/dev/null; then + TERMINAL="$*" + fi +} + +tryterm x-terminal-emulator +tryterm urxvt +tryterm xterm + +if [ -z "$TERMINAL" ]; then + echo 'No terminal emulator found, set $TERMINAL.' 1>&2 + exit 1 +fi + +IFS=' +' + +exec $TERMINAL -e mcom $( +awk -v url="$1" ' + +function decode(s) { + hexdigits = "0123456789abcdef" + for (i = 1; i < length(s); i++) { + if (substr(s, i, 3) ~ /%[0-9a-fA-F][0-9a-fA-F]/) { + c = sprintf("%c", (index(hexdigits, tolower(substr(s, i+1, 1)))-1) * 16 + \ + index(hexdigits, tolower(substr(s, i+2, 1)))-1) + if (c == "\n") c = " " + s = substr(s, 1, i-1) c substr(s, i+3) + i += 2 + } + } + return s +} + +BEGIN { + url = decode(url) + sub(/^mailto:/, "", url) + split(url, parts, "?") + to = parts[1] + split(parts[2], fields, "&") + args[1] = to + for (i in fields) { + split(fields[i], kv, "=") + if (kv[1] != "r") { + args[length(args)+1] = "-" kv[1] + args[length(args)+1] = kv[2] + } + } + for (i in args) { + print decode(args[i]) + } +} +' +) diff -Nru mblaze-1.0/contrib/msign mblaze-1.1/contrib/msign --- mblaze-1.0/contrib/msign 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/contrib/msign 2021-01-14 15:53:00.000000000 +0000 @@ -3,6 +3,12 @@ [ -f "$1" ] || exit 1 +if command -v gpg2 >/dev/null; then + GPG=gpg2 +else + GPG=gpg +fi + IFS=' ' @@ -13,7 +19,7 @@ [ "$FROM" ] && key="--default-key=$FROM" awk '/^$/,0' "$1" | mmime | sed 's/$/ /' >"$TMPD"/content -gpg2 $key --armor --detach-sign -o "$TMPD"/signature.asc "$TMPD"/content || +$GPG $key --armor --detach-sign -o "$TMPD"/signature.asc "$TMPD"/content || exit $? { diff -Nru mblaze-1.0/contrib/mverify mblaze-1.1/contrib/mverify --- mblaze-1.0/contrib/mverify 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/contrib/mverify 2021-01-14 15:53:00.000000000 +0000 @@ -3,6 +3,12 @@ # Needs gpg2 (for OpenPGP) and openssl (for SMIME). +if command -v gpg2 >/dev/null; then + GPG=gpg2 +else + GPG=gpg +fi + [ "$#" -eq 0 ] && set -- . mshow -t "$1" | DOS2UNIX='/ $/!s/$/ /' awk -v "msg=$1" ' @@ -14,7 +20,7 @@ function q(a) { gsub("\\47", "\47\\\47\47", a); return "\47"a"\47" } END { if (type == "" && plain) { // guess plain text armored signature - exit(system("mshow -r " q(msg) " | gpg2 --verify")); + exit(system("mshow -r " q(msg) " | '$GPG' --verify")); } else if (type == "") { print("No signature found.") exit(100) @@ -22,7 +28,7 @@ exit(system("mshow -r -O " q(msg) " " q(content) \ " | sed $DOS2UNIX | " \ " { mshow -O " q(msg) " " q(signature) \ - " | gpg2 --verify - /dev/fd/3; } 3<&0")) + " | '$GPG' --verify - /dev/fd/3; } 3<&0")) } else if (type == "application/pkcs7-signature") { exit(system("mshow -r -O " q(msg) " " q(signed) \ " | openssl smime -verify")) diff -Nru mblaze-1.0/debian/changelog mblaze-1.1/debian/changelog --- mblaze-1.0/debian/changelog 2020-11-02 09:45:35.000000000 +0000 +++ mblaze-1.1/debian/changelog 2021-01-14 16:10:53.000000000 +0000 @@ -1,3 +1,18 @@ +mblaze (1.1-1) unstable; urgency=medium + + * New upstream version (2021-01-14) + + New utility mmailto + + Improvements to mcom + + Bug fixes + + * Amend v1.0-1 changelog, mention setting up Salsa CI + * d/patches: Refresh for new upstream release + * d/control + + Declare compliance with policy v4.5.1. + + Upgrade to debhelper compatibility level 13 + + -- nicoo Thu, 14 Jan 2021 17:10:53 +0100 + mblaze (1.0-1) unstable; urgency=low * New upstream release (2020-09-12) @@ -17,6 +32,7 @@ * Update package authorship information * Update upstream's canonical URL (on vuxu.or) + * Setup Salsa CI for the packaging repository * d/source: Remove Lintian override for obsoleted tag * d/patches: Fix DEP-3 metadata format diff -Nru mblaze-1.0/debian/control mblaze-1.1/debian/control --- mblaze-1.0/debian/control 2020-11-02 09:45:35.000000000 +0000 +++ mblaze-1.1/debian/control 2021-01-14 16:10:53.000000000 +0000 @@ -2,8 +2,8 @@ Maintainer: nicoo Section: utils Priority: optional -Build-Depends: debhelper-compat (= 12) -Standards-Version: 4.5.0 +Build-Depends: debhelper-compat (= 13) +Standards-Version: 4.5.1 Homepage: https://git.vuxu.org/mblaze/about/ Vcs-Browser: https://salsa.debian.org/debian/mblaze Vcs-Git: https://salsa.debian.org/debian/mblaze.git diff -Nru mblaze-1.0/debian/patches/Fix-typo-in-NEWS.patch mblaze-1.1/debian/patches/Fix-typo-in-NEWS.patch --- mblaze-1.0/debian/patches/Fix-typo-in-NEWS.patch 2020-11-02 09:45:35.000000000 +0000 +++ mblaze-1.1/debian/patches/Fix-typo-in-NEWS.patch 2021-01-14 16:10:53.000000000 +0000 @@ -1,26 +1,23 @@ From: nicoo -Date: Mon, 2 Nov 2020 09:52:02 +0100 +Date: Thu, 14 Jan 2021 16:58:53 +0100 Subject: Fix typo in NEWS -Origin: vendor -Forwarded: https://github.com/leahneukirchen/mblaze/pull/190 -Last-Update: 2020-11-02 +Forwarded: https://github.com/leahneukirchen/mblaze/pull/199 +Last-Update: 2021-01-14 --- - NEWS.md | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + NEWS.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md -index b5a85b7..396d9aa 100644 +index d32cce6..b15fa36 100644 --- a/NEWS.md +++ b/NEWS.md -@@ -2,8 +2,8 @@ +@@ -2,7 +2,7 @@ - * Caution! Backwards incompatible changes: - * As a message name, `-` now refers to the message on the standard input, -- and not the the previous message anymore. Use `.-` to refer to -- the previous message in a short way. -+ and not the previous message anymore. Use `.-` to refer to the previous -+ message in a short way. - The tools will print a warning if you use `-` and the standard input - comes from a TTY. - * mpick: use the -F flag to read script files. + * mcom: allow tilde prefixed path for profile's outbox setting + * mcom: detect and report mmime errors +-* add contrieb/mmailto, a handler for mailto: links ++* add contrib/mmailto, a handler for mailto: links + * Bug fixes. + + ## 1.0 (2020-09-12) diff -Nru mblaze-1.0/debian/patches/Rename-mless-to-mblaze-less.patch mblaze-1.1/debian/patches/Rename-mless-to-mblaze-less.patch --- mblaze-1.0/debian/patches/Rename-mless-to-mblaze-less.patch 2020-11-02 09:45:35.000000000 +0000 +++ mblaze-1.1/debian/patches/Rename-mless-to-mblaze-less.patch 2021-01-14 16:10:53.000000000 +0000 @@ -5,14 +5,13 @@ Bug-Debian: https://bugs.debian.org/887988 Forwarded: not-needed Last-Update: 2020-11-02 - --- contrib/_mblaze | 4 ++-- contrib/mmairix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/_mblaze b/contrib/_mblaze -index f58cb65..41207e3 100644 +index 5255629..78c6faa 100644 --- a/contrib/_mblaze +++ b/contrib/_mblaze @@ -1,4 +1,4 @@ diff -Nru mblaze-1.0/debian/patches/Rename-msort-to-mblaze-sort.patch mblaze-1.1/debian/patches/Rename-msort-to-mblaze-sort.patch --- mblaze-1.0/debian/patches/Rename-msort-to-mblaze-sort.patch 2020-11-02 09:45:35.000000000 +0000 +++ mblaze-1.1/debian/patches/Rename-msort-to-mblaze-sort.patch 2021-01-14 16:10:53.000000000 +0000 @@ -5,7 +5,6 @@ Bug-Debian: https://bugs.debian.org/887988 Forwarded: not-needed Last-Update: 2020-11-02 - --- contrib/_mblaze | 4 ++-- contrib/mmairix | 2 +- @@ -13,7 +12,7 @@ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/_mblaze b/contrib/_mblaze -index 41207e3..3d11390 100644 +index 78c6faa..6e7cfc3 100644 --- a/contrib/_mblaze +++ b/contrib/_mblaze @@ -1,4 +1,4 @@ @@ -42,10 +41,10 @@ -mairix -r "$@" | sed 's,//*,/,g' | msort -rd | mblaze-less +mairix -r "$@" | sed 's,//*,/,g' | mblaze-sort -rd | mblaze-less diff --git a/mcom b/mcom -index a1a1f90..aaf5c41 100755 +index c378b33..5171ba4 100755 --- a/mcom +++ b/mcom -@@ -251,7 +251,7 @@ else +@@ -255,7 +255,7 @@ else exit 1 fi elif [ -z "$draft" ]; then diff -Nru mblaze-1.0/magrep.c mblaze-1.1/magrep.c --- mblaze-1.0/magrep.c 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/magrep.c 2021-01-14 15:53:00.000000000 +0000 @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "blaze822.h" diff -Nru mblaze-1.0/mbnc mblaze-1.1/mbnc --- mblaze-1.0/mbnc 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/mbnc 2021-01-14 15:53:00.000000000 +0000 @@ -75,7 +75,7 @@ needs_multipart() { mhdr -h attach "$1" >/dev/null || - grep -q '^#[^ ]*/[^ ]* ' "$1" + grep -qE '^#[a-zA-Z]+/[a-zA-Z0-9+.;=#-]+ ' "$1" } do_mime() { @@ -92,6 +92,10 @@ else mmime -r <"$draft" >"$draftmime" fi + if [ $? -ne 0 ]; then + printf 'mcom: fix above errors before continuing\n' 1>&2 + rm -f "$draftmime" + fi } MBLAZE=${MBLAZE:-$HOME/.mblaze} @@ -231,7 +235,7 @@ hdrs="$(printf '%s\n' "${hdrs#$NL}" | mhdr -)" -outbox=$(mhdr -h outbox "$MBLAZE/profile") +outbox=$(mhdr -h outbox "$MBLAZE/profile" | sed "s:^~/:$HOME/:") if [ -z "$outbox" ]; then if [ -z "$resume" ]; then i=0 @@ -450,7 +454,7 @@ continue fi else - if mmime -c <"$draft"; then + if mmime -c <"$draft" && ! [ "$automime" = 1 ]; then stampdate "$draft" if $sendmail <"$draft"; then if [ "$outbox" ]; then diff -Nru mblaze-1.0/mcom mblaze-1.1/mcom --- mblaze-1.0/mcom 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/mcom 2021-01-14 15:53:00.000000000 +0000 @@ -75,7 +75,7 @@ needs_multipart() { mhdr -h attach "$1" >/dev/null || - grep -q '^#[^ ]*/[^ ]* ' "$1" + grep -qE '^#[a-zA-Z]+/[a-zA-Z0-9+.;=#-]+ ' "$1" } do_mime() { @@ -92,6 +92,10 @@ else mmime -r <"$draft" >"$draftmime" fi + if [ $? -ne 0 ]; then + printf 'mcom: fix above errors before continuing\n' 1>&2 + rm -f "$draftmime" + fi } MBLAZE=${MBLAZE:-$HOME/.mblaze} @@ -231,7 +235,7 @@ hdrs="$(printf '%s\n' "${hdrs#$NL}" | mhdr -)" -outbox=$(mhdr -h outbox "$MBLAZE/profile") +outbox=$(mhdr -h outbox "$MBLAZE/profile" | sed "s:^~/:$HOME/:") if [ -z "$outbox" ]; then if [ -z "$resume" ]; then i=0 @@ -450,7 +454,7 @@ continue fi else - if mmime -c <"$draft"; then + if mmime -c <"$draft" && ! [ "$automime" = 1 ]; then stampdate "$draft" if $sendmail <"$draft"; then if [ "$outbox" ]; then diff -Nru mblaze-1.0/mdeliver.c mblaze-1.1/mdeliver.c --- mblaze-1.0/mdeliver.c 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/mdeliver.c 2021-01-14 15:53:00.000000000 +0000 @@ -10,6 +10,7 @@ #include #include #include +#include #include #include "blaze822.h" diff -Nru mblaze-1.0/mflow.c mblaze-1.1/mflow.c --- mblaze-1.0/mflow.c 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/mflow.c 2021-01-14 15:53:00.000000000 +0000 @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "blaze822.h" diff -Nru mblaze-1.0/mhdr.c mblaze-1.1/mhdr.c --- mblaze-1.0/mhdr.c 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/mhdr.c 2021-01-14 15:53:00.000000000 +0000 @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "blaze822.h" diff -Nru mblaze-1.0/mmime.c mblaze-1.1/mmime.c --- mblaze-1.0/mmime.c 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/mmime.c 2021-01-14 15:53:00.000000000 +0000 @@ -367,7 +367,7 @@ if (*s == '/') slash++; else if (isalnum(*s) || *s == '-' || *s == '+' || *s == '.' || - *s == ';' || *s == '=') + *s == ';' || *s == '=' || *s == '#') ; /* ok */ else return 0; @@ -386,6 +386,7 @@ size_t linelen = 0; int inheader = 1; int intext = 0; + int ret = 0; while (1) { ssize_t read = getdelim(&line, &linelen, '\n', stdin); @@ -423,7 +424,8 @@ printf("\n--%s\n", sep); if (line[read-1] == '\n') line[read-1] = 0; - gen_file(f+1, (char *)line+1); + if (gen_file(f+1, line+1) != 0) + ret = 1; intext = 0; continue; } @@ -446,7 +448,7 @@ printf("\n--%s--\n", sep); free(line); - return 0; + return ret; } int diff -Nru mblaze-1.0/mpick.c mblaze-1.1/mpick.c --- mblaze-1.0/mpick.c 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/mpick.c 2021-01-14 15:53:00.000000000 +0000 @@ -1466,7 +1466,7 @@ xpledge("stdio rpath wpath cpath proc exec", 0); - void *cb = need_thr ? collect : oneline; + void (*cb)(char *) = need_thr ? collect : oneline; if (argc == optind && isatty(0)) i = blaze822_loop1(":", cb); else diff -Nru mblaze-1.0/mrep mblaze-1.1/mrep --- mblaze-1.0/mrep 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/mrep 2021-01-14 15:53:00.000000000 +0000 @@ -75,7 +75,7 @@ needs_multipart() { mhdr -h attach "$1" >/dev/null || - grep -q '^#[^ ]*/[^ ]* ' "$1" + grep -qE '^#[a-zA-Z]+/[a-zA-Z0-9+.;=#-]+ ' "$1" } do_mime() { @@ -92,6 +92,10 @@ else mmime -r <"$draft" >"$draftmime" fi + if [ $? -ne 0 ]; then + printf 'mcom: fix above errors before continuing\n' 1>&2 + rm -f "$draftmime" + fi } MBLAZE=${MBLAZE:-$HOME/.mblaze} @@ -231,7 +235,7 @@ hdrs="$(printf '%s\n' "${hdrs#$NL}" | mhdr -)" -outbox=$(mhdr -h outbox "$MBLAZE/profile") +outbox=$(mhdr -h outbox "$MBLAZE/profile" | sed "s:^~/:$HOME/:") if [ -z "$outbox" ]; then if [ -z "$resume" ]; then i=0 @@ -450,7 +454,7 @@ continue fi else - if mmime -c <"$draft"; then + if mmime -c <"$draft" && ! [ "$automime" = 1 ]; then stampdate "$draft" if $sendmail <"$draft"; then if [ "$outbox" ]; then diff -Nru mblaze-1.0/NEWS.md mblaze-1.1/NEWS.md --- mblaze-1.0/NEWS.md 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/NEWS.md 2021-01-14 15:53:00.000000000 +0000 @@ -1,9 +1,16 @@ +## 1.1 (2021-01-14) + +* mcom: allow tilde prefixed path for profile's outbox setting +* mcom: detect and report mmime errors +* add contrieb/mmailto, a handler for mailto: links +* Bug fixes. + ## 1.0 (2020-09-12) * Caution! Backwards incompatible changes: * As a message name, `-` now refers to the message on the standard input, - and not the the previous message anymore. Use `.-` to refer to - the previous message in a short way. + and not the previous message anymore. Use `.-` to refer to the previous + message in a short way. The tools will print a warning if you use `-` and the standard input comes from a TTY. * mpick: use the -F flag to read script files. diff -Nru mblaze-1.0/README mblaze-1.1/README --- mblaze-1.0/README 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/README 2021-01-14 15:53:00.000000000 +0000 @@ -118,9 +118,10 @@ Leah Neukirchen There is a mailing list available at mblaze@googlegroups.com (to - subscribe, send a message to mblaze+subscribe@googlegroups.com) and an - IRC channel #vuxu on irc.freenode.net. Please report security-related - bugs directly to the author. + subscribe, send a message to mblaze+subscribe@googlegroups.com); archives + are available at https://inbox.vuxu.org/mblaze/. There also is an IRC + channel #vuxu on irc.freenode.net. Please report security-related bugs + directly to the author. LICENSE mblaze is in the public domain. @@ -130,4 +131,4 @@ http://creativecommons.org/publicdomain/zero/1.0/ -Void Linux January 6, 2018 Void Linux +Void Linux January 18, 2020 Void Linux diff -Nru mblaze-1.0/rfc2045.c mblaze-1.1/rfc2045.c --- mblaze-1.0/rfc2045.c 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/rfc2045.c 2021-01-14 15:53:00.000000000 +0000 @@ -86,6 +86,8 @@ while (*s) { while (iswsp(*s)) s++; + if (!*s) + return 0; if (strncasecmp(s, name, namelen) == 0 && s[namelen] == '=') { s += namelen + 1; break; @@ -114,6 +116,26 @@ return 1; } +// like mymemmem but check the match is followed by \r, \n or -. +static char * +mymemmemnl(const char *h0, size_t k, const char *n0, size_t l) +{ + char *r; + + while (k && (r = mymemmem(h0, k, n0, l))) { + if (r + l < h0 + k && // check if r[l] safe to access + (r[l] == '\r' || r[l] == '\n' || r[l] == '-')) + return r; + else { + // skip over this match + k -= (r - h0) + 1; + h0 = r + 1; + } + } + + return 0; +} + int blaze822_multipart(struct message *msg, struct message **imsg) { @@ -144,7 +166,7 @@ else prevpart = msg->body; - char *part = mymemmem(prevpart, msg->bodyend - prevpart, mboundary, boundarylen); + char *part = mymemmemnl(prevpart, msg->bodyend - prevpart, mboundary, boundarylen); if (!part) return 0; @@ -158,10 +180,10 @@ else return 0; // XXX error condition? - char *nextpart = mymemmem(part, msg->bodyend - part, mboundary, boundarylen); + char *nextpart = mymemmemnl(part, msg->bodyend - part, mboundary, boundarylen); if (!nextpart) - return 0; // XXX error condition - if (nextpart == part) // invalid empty MIME part + nextpart = msg->bodyend; // no boundary found, take all + else if (nextpart == part) // invalid empty MIME part return 0; // XXX error condition if (*(nextpart-1) == '\n') diff -Nru mblaze-1.0/t/1000-mmime.t mblaze-1.1/t/1000-mmime.t --- mblaze-1.0/t/1000-mmime.t 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/t/1000-mmime.t 2021-01-14 15:53:00.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh -e cd ${0%/*} . ./lib.sh -plan 4 +plan 8 cat <tmp References: @@ -15,3 +15,30 @@ check 'no overlong lines' 'awk "{if(length(\$0)>=80)exit 1}" tmp2 +Subject: inclusion test + +#message/rfc822 $PWD/tmp +EOF + +check 'include works' 'mmime tmp2 +Subject: inclusion test no filename + +#message/rfc822 $PWD/tmp> +EOF + +check 'include works, overriding filename' 'mmime tmp2 +Subject: inclusion test with other disposition + +#message/rfc822#inline $PWD/tmp> +EOF + +check 'include works, overriding filename' 'mmime tmp +MIME-Version: 1.0 +Content-type: multipart/mixed; charset=iso-8859-1; + boundary="_xec5AqfRYxfhARmklHx" + + +--_xec5AqfRYxfhARmklHx +Content-type: Multipart/alternative; charset=iso-8859-1; + boundary="_xec5AqfRYxfhARmklHx8" + + +--_xec5AqfRYxfhARmklHx8 +Content-type: text/plain; charset=iso-8859-1 +Content-Transfer-Encoding: 7bit +Content-Disposition: inline + +foo +--_xec5AqfRYxfhARmklHx8 +Content-type: text/html; charset=iso-8859-1 +Content-Transfer-Encoding: Quoted-printable +Content-Disposition: inline + +bar +--_xec5AqfRYxfhARmklHx8-- + +--_xec5AqfRYxfhARmklHx +Content-Type: application/zip +Content-Transfer-Encoding: Base64 + +quux +--_xec5AqfRYxfhARmklHx-- +EOF + +check 'nested mail has 5 attachments' 'mshow -t ./tmp | wc -l | grep 6' +check 'nested mail has text/html attachment' 'mshow -t ./tmp | grep text/html' diff -Nru mblaze-1.0/t/7000-mseq.t mblaze-1.1/t/7000-mseq.t --- mblaze-1.0/t/7000-mseq.t 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/t/7000-mseq.t 2021-01-14 15:53:00.000000000 +0000 @@ -31,7 +31,7 @@ check_test 'subthread' -eq 2 'mseq 7_ | wc -l' check 'parent' 'mseq 6^ | grep "inbox/cur/5_1:2,"' check_test 'range' -eq 3 'mseq 1:3 | wc -l' -check_same 'multiple mmsg' 'mseq 1 2' 'echo "inbox/cur/1:2,\ninbox/cur/2:2,"' +check_same 'multiple mmsg' 'mseq 1 2' 'printf "inbox/cur/1:2,\ninbox/cur/2:2,\n"' cat <seq inbox/cur/1:2, diff -Nru mblaze-1.0/VERSION mblaze-1.1/VERSION --- mblaze-1.0/VERSION 2020-09-12 16:14:35.000000000 +0000 +++ mblaze-1.1/VERSION 2021-01-14 15:53:00.000000000 +0000 @@ -1 +1 @@ -1.0 +1.1