FILLER="$THISDIR/filler.txt"
FROMLINE="$THISDIR/fromline.txt"
-MMDF_DELIM='printf "\x01\x01\x01\x01\x0a"'
+MMDF_DELIM='printf "\01\01\01\01\012"'
HDR="$THISDIR/msgheader.txt"
if grep From "$FILLER" >/dev/null; then
STDIO_BUFSZ=16384
FROMLINESZ=`wc -c < "$FROMLINE"`
-MMDFDELIMLINESZ=1
+MMDFDELIMLINESZ=5
HDRSZ=`wc -c < "$HDR"`
# makembox_A mboxname sz
}
# makemmdf_A mmdfboxname sz
+# The first email in $MBOX will be sz bytes long, including its MMDF
+# magic strings that top and tail it.
makemmdf_A () {
MBOX="$1"
SZ=$2
- arith_eval $SZ - $HDRSZ - $MMDFDELIMLINESZ - 1; WANTSZ=$arith_val
+ arith_eval $SZ - $MMDFDELIMLINESZ - $HDRSZ - 1 - $MMDFDELIMLINESZ; WANTSZ=$arith_val
dd if="$FILLER" of="$MBOX.body" bs="$WANTSZ" count=1 2>/dev/null
echo >> "$MBOX.body"
#### The trailing $MMDF_DELIM's allows $MBOX to exactly match a file