Created attachment 265740 [details] patch to fix the above When piping a message thru dma -t and the message has cr+lf at the end of lines it will break when forwarding it to a smtp host the reason is that dma will remove \n at the end of the line and append \r\n however when the original message already has \r\n it will end with \r\r\n at the end of every line more info at https://forums.freebsd.org/threads/sending-email-using-php-mail-function-fails-via-dma-8.100466/ sendmail (receiving smpt) will complain as follows Nov 30 22:12:44 ns sm-mta[91531]: 5AUHLtwN039474: to=xxx@xxx.xx, delay=02:50:49, xdelay=00:00:00, mailer=esmtp, pri=1140782, relay=xxxx.xx.xx [xx.xx.x.xxx], dsn=4.0.0, reply=421 4.5.0 Bare carriage return (CR) not allowed, stat=Deferred: 421 4.5.0 Bare carriage return (CR) not allowed proposed patch in the attachment
I was able to replicate this on a dragonflybsd install with its dma(8) configured to use a sendmail SMARTHOST on FreeBSD 14.3R It produced the same error when attempting to send a simple message using php::mail() function. So this patch could go to dragonfly as well.