01.12.2024 18:19, Wietse Venema via Postfix-users wrote:
Michael Tokarev via Postfix-users:
And while it's definitely true there's no encoding specified for the
GECOS field in /etc/passwd, the common practice over last couple decades
is to use utf8 in there.  Also we've $LANG at submission which can be
used too.  Or failing that, we can tell postfix which encoding our
GECOS field is, like using gecos_charset = foo.

Shouldn't postfix at least try to generate valid email message in
such case?

To send messsages with 8bit UTF8 headers:

1 - Use Postfix default settings:

        smtputf8_enable = yes (assuming compatibility_level > 0)
        smtputf8_autodetect_classes = sendmail, verify

     With this, Postfix will detect UTF8 in headers and will require
     that the message is transmitted as SMTPUTF8. This limits the
     destinations that the message can be sent to.

It looks like we've the first case here.  The above settings are
the default.  The final destination (debian.org domain) advertises
SMTPUTF8:

250-mailly.debian.org Hello isrv.corpit.ru [86.62.121.231]
250-SIZE 104857600
250-8BITMIME
250-CHUNKING
250-STARTTLS
250-SMTPUTF8
250 HELP

I wonder if it is exim who dislikes "raw UTF8" in this case despite
advertising SMTPUTF8.  Wonder what the conversation between the two
looks like, - lemme enable debugging..

Dec 01 18:42:57 isrv postfix/smtp[3009]: < mailly.debian.org[82.195.75.114]:25: 
250-mailly.debian.org Hello isrv.corpit.ru [86.62.121.231]
Dec 01 18:42:57 isrv postfix/smtp[3009]: < mailly.debian.org[82.195.75.114]:25: 
250-SIZE 104857600
Dec 01 18:42:57 isrv postfix/smtp[3009]: < mailly.debian.org[82.195.75.114]:25: 
250-8BITMIME
Dec 01 18:42:57 isrv postfix/smtp[3009]: < mailly.debian.org[82.195.75.114]:25: 
250-CHUNKING
Dec 01 18:42:57 isrv postfix/smtp[3009]: < mailly.debian.org[82.195.75.114]:25: 
250-SMTPUTF8
Dec 01 18:42:57 isrv postfix/smtp[3009]: < mailly.debian.org[82.195.75.114]:25: 
250 HELP
Dec 01 18:42:57 isrv postfix/smtp[3009]: server features: 0x20100b size 
104857600
Dec 01 18:42:57 isrv postfix/smtp[3009]: smtp_stream_setup: maxtime=300 
enable_deadline=0 min_data_rate=0
Dec 01 18:42:57 isrv postfix/smtp[3009]: > mailly.debian.org[82.195.75.114]:25: MAIL 
FROM:<m...@tls.msk.ru> SIZE=586 BODY=8BITMIME
Dec 01 18:42:57 isrv postfix/smtp[3009]: smtp_stream_setup: maxtime=300 
enable_deadline=0 min_data_rate=0
Dec 01 18:42:57 isrv postfix/smtp[3009]: vstream_fflush_some: fd 15 flush 50
Dec 01 18:42:57 isrv postfix/smtp[3009]: vstream_buf_get_ready: fd 15 got 8
Dec 01 18:42:57 isrv postfix/smtp[3009]: < mailly.debian.org[82.195.75.114]:25: 
250 OK
Dec 01 18:42:57 isrv postfix/smtp[3009]: > mailly.debian.org[82.195.75.114]:25: RCPT 
TO:<m...@debian.org>
Dec 01 18:42:57 isrv postfix/smtp[3009]: smtp_stream_setup: maxtime=300 
enable_deadline=0 min_data_rate=0
Dec 01 18:42:57 isrv postfix/smtp[3009]: vstream_fflush_some: fd 15 flush 26
Dec 01 18:42:57 isrv postfix/smtp[3009]: vstream_buf_get_ready: fd 15 got 14
Dec 01 18:42:57 isrv postfix/smtp[3009]: < mailly.debian.org[82.195.75.114]:25: 
250 Accepted
Dec 01 18:42:57 isrv postfix/smtp[3009]: > mailly.debian.org[82.195.75.114]:25: 
DATA
Dec 01 18:42:57 isrv postfix/smtp[3009]: smtp_stream_setup: maxtime=120 
enable_deadline=0 min_data_rate=0
Dec 01 18:42:57 isrv postfix/smtp[3009]: vstream_fflush_some: fd 15 flush 6
Dec 01 18:42:57 isrv postfix/smtp[3009]: vstream_buf_get_ready: fd 15 got 56
Dec 01 18:42:57 isrv postfix/smtp[3009]: < mailly.debian.org[82.195.75.114]:25: 354 Enter 
message, ending with "." on a line by itself
Dec 01 18:42:57 isrv postfix/smtp[3009]: smtp_stream_setup: maxtime=180 
enable_deadline=0 min_data_rate=500
Dec 01 18:42:57 isrv postfix/smtp[3009]: vstream_buf_get_ready: fd 14 got 605
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 63 data Received:
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 53 data ?by isrv.c
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 60 data ?for <mjt@
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 55 data Received:
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 54 data ?id E8F711
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 18 data To: mjt@de
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 13 data Subject: t
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 17 data MIME-Versi
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 41 data Content-Ty
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 31 data Content-Tr
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 55 data Message-Id
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 43 data Date: Sun,
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 49 data From: Ми
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 0 data
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type N len 4 data test
Dec 01 18:42:57 isrv postfix/smtp[3009]: rec_get: type X len 0 data
Dec 01 18:42:57 isrv postfix/smtp[3009]: > mailly.debian.org[82.195.75.114]:25: 
.
Dec 01 18:42:57 isrv postfix/smtp[3009]: smtp_stream_setup: maxtime=600 
enable_deadline=0 min_data_rate=0
Dec 01 18:42:57 isrv postfix/smtp[3009]: vstream_fflush_some: fd 15 flush 589
Dec 01 18:42:57 isrv postfix/smtp[3009]: vstream_buf_get_ready: fd 15 got 68
Dec 01 18:42:57 isrv postfix/smtp[3009]: < mailly.debian.org[82.195.75.114]:25: 
550 improper use of 8-bit data in message header: message rejected

Apparently something is not working, - either on postfix or on exim (in this 
case)
side.

2 - Encode headers before invoking the Postfix sendmail command.
     This will increase the number of destinations that the message
     can be sent to.

What I asked in my email is this one:

If postfix sendmail command is THE one which added these headers,
can't it encode them properly too?

3 - Wait until IETF issues guidelines for converting messages (and
     envelopes) from SMTPUTF8 to legacy format.

4 - Invent our own conversion guideline: if "smtputf8_enable = no",
     encode Postfix-generated headers: From:, Date:, Message-ID.
     Should this use RFC 2047/2231 for an entire header, or punycode
     for substrings that contain a domain name, or what? How are
     people expected to reply to an RFC 2047 encoded From: address?

I think neither 3 nor 4 are to the point in this context.

The question seems to be simpler than this.

Thanks,

/mjt
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to