HomeFreeBSD

dma: restore addition of newline when missing from input

Description

dma: restore addition of newline when missing from input

If input mail does not have a newline on the last line dma must add
one. This was broken by the addition of long-line splitting, with the
switch from strlen(line) to linelen returned by getline().

PR: 266629
Reviewed by: bapt, Mikko Lehto
Tested by: Mikko Lehto
MFC after: 1 week
Fixes: b0b2d05fd060 ("Split body of mails not respecting...")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36763

(cherry picked from commit 169487223143b1232ec4686b720b028af8d6d42b)