Commit Graph

12 Commits

Author SHA1 Message Date
Ed Maste
1694872231 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:		b0b2d05fd0 ("Split body of mails not respecting...")
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36763
2022-10-12 11:59:01 -04:00
Ed Maste
d21e71efce dma: use canonical getline() loop
getline() returns -1 on erorr or EOF, so use that condition instead of
feof() and check that there was no error after the loop exits.

Reviewed by:	bapt, kevans (both earlier)
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34159
2022-02-05 21:55:03 -05:00
Ed Maste
1a0dde338d dma: limit lines to 998 characters
Per RFC2822 the maximum transmitted line length is "998 characters...
excluding the CRLF."  In a file the maximum is 999 with the \n included.

Previously mail containing a line with exactly 999 characters would
bounce.

PR:		208261
Reported by:	Helge Oldach
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-01-28 10:02:43 -05:00
Baptiste Daroussin
fbe95b885f dma: import snapshot 2021-07-10 2021-09-22 11:10:58 +02:00
Jung-uk Kim
b86d13984b Make dma(8) buildable. 2018-09-19 06:42:05 +00:00
Baptiste Daroussin
b0b2d05fd0 Split body of mails not respecting RFC2822
For mails which has a body not respecting RFC2822 (which often happen with
crontabs) try to split by words finding the last space before 1000's character

If no spaces are found then consider the mail to be malformed anyway

PR:		208261
2017-12-06 22:08:35 +00:00
Baptiste Daroussin
b4b4b5304b Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
Baptiste Daroussin
814aaaa7da Revert r312923 a better approach will be taken later 2017-01-28 16:30:14 +00:00
Baptiste Daroussin
eaccd9b323 Fix build with gcc 4.2 2015-10-11 17:45:20 +00:00
Baptiste Daroussin
e56bad4a94 Update Dragonfly Mail Agent to v0.10 2015-10-10 23:31:47 +00:00
Baptiste Daroussin
22354f09c8 Fix build with gcc 2014-02-21 13:17:10 +00:00
Baptiste Daroussin
a9e8641da9 Import Dragonfly Mail Agent into base system
It is a small and lightweight Mail Transport Agent.
It accepts mails from locally installed Mail User Agents (MUA) and delivers the
mails either locally or to a remote destination. Remote delivery includes
several features like TLS/SSL support, SMTP authentication and NULLCLIENT.

Make dma conditional to new WITHOUT_DMA option and make it respect WITHOUT_MAIL

Reviewed by:	peter
Discussed with:	emaste, bz, peter
2014-02-21 07:26:49 +00:00