mhbuild's quoted-printable encoder breaks lines to have at most
CPERLIN chars. If the it happens that the last character on the
line is a dot (`.') and the line is broken just before it, then
the following line contains nothing but one single dot. This
currently leads to problems in mmh ... but it may cause problems
to other mail software as well. Hence we avoid it by encoding
any dot at the beginning of a line, just to be sure.
break;
default:
- if (*cp < '!' || *cp > '~')
+ if (*cp < '!' || *cp > '~') {
goto three_print;
+ }
+ if (n == 0 && *cp == '.') {
+ /*
+ ** encode dot at start of line,
+ ** because it could be alone ...
+ */
+ goto three_print;
+ }
putc(*cp, out);
n++;
break;