Hello,

I am trying to set up postgresql-based virtual domains.  I am on
FreeBSD 13.  When I try to test my domain mapping, I get a strange
error about character encodings:

# postmap -v -q example.org
pgsql:/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf
postmap: name_mask: ipv4
postmap: name_mask: host
postmap: inet_addr_local: configured 2 IPv4 addresses
postmap: been_here: <redacted>/32: 0
postmap: been_here: 127.0.0.1/32: 0
postmap: mynetworks_core: <redacted>/32 127.0.0.1/32
postmap: cfg_get_str:
/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf: user =
mailuser
postmap: cfg_get_str:
/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf: password =
<redacted>
postmap: cfg_get_str:
/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf: dbname =
mailserver
postmap: cfg_get_str:
/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf: result_format
= %s
postmap: cfg_get_int:
/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf:
expansion_limit = 0
postmap: cfg_get_str:
/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf: query =
SELECT 1 FROM virtual_domains WHERE name='%s'
postmap: cfg_get_str:
/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf: domain =
postmap: cfg_get_str:
/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf: hosts =
127.0.0.1
postmap: dict_open:
pgsql:/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf
postmap: dict_pgsql_get_active: attempting to connect to host 127.0.0.1
postmap: dict_pgsql: successful connection to host 127.0.0.1
postmap: warning: dict_pgsql: cannot set the encoding to LATIN1,
skipping 127.0.0.1
postmap: fatal: table
pgsql:/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf: query
error: Application error

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:

# postconf -n
command_directory = /usr/local/sbin
compatibility_level = 3.6
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = /usr/local/share/doc/postfix
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
meta_directory = /usr/local/libexec/postfix
mynetworks_style = host
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/local/share/doc/postfix
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
shlib_directory = /usr/local/lib/postfix
smtputf8_enable = yes
unknown_local_recipient_reject_code = 550
virtual_mailbox_domains =
pgsql:/usr/local/etc/postfix/pgsql-virtual-mailbox-domains.cf

How do I get postfix to speak UTF8 instead of LATIN1?

Reply via email to