Sendmail+Cyrus IMAP "Data format error" and bounces

Andrea Venturoli ml at netfence.it
Fri Mar 27 13:59:52 EDT 2020


On 2020-03-17 20:13, Andrea Venturoli wrote:
> On 2020-03-17 15:52, Andrea Venturoli wrote:
> 
>> Also, 
>> https://www.cyrusimap.org/imap/reference/manpages/configs/imapd.conf.html#std:cyrusman-imapd.conf(5), 
>> says "reject8bit: 0" is the default.
>>
>>  From this I understand my setup should NOT reject 8bit headers (but 
>> change non-ASCII characters to X).
>>
>> I'm now setting this explicitly and I'll see what happens.
> 
> In fact, nothing changed.

So, I made some tests.

I prepared a text file with the following content (notice the non-ASCII 
character at the end of the Subject) and saved it as mail.txt:
> Subject: Provaà
> .

"file mail.txt" says "mail.txt: UTF-8 Unicode text".

Then I pushed this to my mailserver with curl:
> curl --url 'smtp://myserver:25' --mail-from 'ml at netfence.it' --mail-rcpt 'ml at netfence.it' --upload-file mail.txt



With "reject8bit: yes", sendmail refuses the message with "Message 
contains non-ASCII characters in headers". (Still don't know why it 
doesn't refuse it upfront, but bounces it!).

With "reject8bit: no", I get the message and the subject is translated 
to "ProvaXX", as I would expect, since rfc2047_utf8 is, by default, off.

Strangely, if I enable rfc2047_utf8, I still get "ProvaXX" as a subject.



In any case, it seems that, at least for the subject, UTF-8 characters 
are handled (almost) as expected.

*HOWEVER* curl does not use UTF8SMTPS, which is instead activated when I 
get mails that are bounced.

Any idea for a similar tool which can use UTF8SMTPS, so I can repeat 
that tests?


  bye & Thanks
	av.

P.S.
I also tried tcpdump to get full data on a troublesome mail, but, 
unfortunately TLS was enabled and I was not able to get clear data.


More information about the Info-cyrus mailing list