Re: [exim] Additional line in body when submitting?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Evgeniy Berdnikov
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Additional line in body when submitting?
On Wed, Jun 01, 2022 at 04:55:18PM +0100, Jeremy Harris via Exim-users wrote:
> On 01/06/2022 16:46, Evgeniy Berdnikov via Exim-users wrote:
> > Strace of Debian bsd-mailx (my version is 8.1.2-0.20180807cvs-2)
> > shows that it does not append newline writing to MTA child process,
> > it only converts "\n" to "\r\n".
>
> Is bsd-mailx talking SMTP-on-TCP to exim, or stdin?
> If the latter, it should use Unix lines: \n - terminated.


Bsd-mailx executes /usr/sbin/sendmail, which is a symlink to Exim.

I was wrong with the statement that bsd-mailx converts "\n" to "\r\n".
Reading strace carefully, I lead to conclution that bsd-mailx passes the
body of mail to Exim withoout modifications:

32252 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ffb26a64390) = 32253
32253 execve("/usr/sbin/sendmail", ["send-mail", "-i", "-t"], 0x7ffd8ba1c160 /* 32 vars */) = 0
...
32253 read(0, "To: root\nSubject: test\nMIME-Version: 1.0\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit\n\nFrom: root\nTo: root\nSubject: test\n\ntest\n", 4096) = 156

Conversion "\n" to "\r\n" happens when 2nd Exim subprocess send mail
to smarthost relay via SMTP (this is my configuration on test node),
but extra lines are not added here. Sorry for misinformation.
--
Eugene Berdnikov