On Tue, Feb 22, 2022, 14:29 Viktor Dukhovni <postfix-us...@dukhovni.org> wrote:
> On Tue, Feb 22, 2022 at 01:41:00PM -0800, Nathan Van Ymeren wrote: > > > I have enabled UTF8 in postfix as per the instructions here: > > http://www.postfix.org/SMTPUTF8_README.html#enabling , which you can > > see in the following config info: > > This enables UTF8 in SMTP, but does not presently affect the PgSQL > driver: > > src/global/dict_pgsql.c: > ... > #ifdef SNAPSHOT > if (PQsetClientEncoding(host->db, "UTF8") != 0) { > msg_warn("dict_pgsql: cannot set the encoding to UTF8, > skipping %s", > host->hostname); > plpgsql_down_host(host); > return; > } > #else > > /* > * XXX Postfix does not send multi-byte characters. The following > piece > * of code is an explicit statement of this fact, and the database > server > * should not accept multi-byte information after this point. > */ > if (PQsetClientEncoding(host->db, "LATIN1") != 0) { > msg_warn("dict_pgsql: cannot set the encoding to LATIN1, > skipping %s", > host->hostname); > plpgsql_down_host(host); > return; > } > #endif > ... > > So UTF8 is only used in development snapshots and not in release builds. > This code needs to be made either conditional on EAI (UTF8) being > enabled, or a new user-settable PgSQL table parameter. > > > How do I get postfix to speak UTF8 instead of LATIN1? > > You can run a snapshot build... > > -- > Viktor. > I'm perplexed because this exact setup ran on Debian (which certainly doesn't package snapshots). It's only on FreeBSD where I run into trouble.