Postfix Local Mail Not Delivered

Despite the postfix server starting at boot and active, no local mail is delivered.

mailq command outputs loads of entries like…

0F8B1665B0 701 Wed May 5 19:53:02 root
root

…and there log entries like these…
postfix/cleanup[3433]: warning: hash:/etc/postfix/sender_canonical is unavailable. unsupported dictionary type: hash
postfix/cleanup[3433]: warning: hash:/etc/postfix/sender_canonical lookup error for “root@localhost”
postfix/cleanup[3433]: warning: 97E86665CF: canonical_maps map lookup problem for root@localhost – message not accepted, try again later
postfix/cleanup[3433]: warning: 97E86665CF: sender_canonical_maps map lookup problem for root@localhost – message not accepted, try again later
postfix/cleanup[3433]: warning: hash:/etc/postfix/canonical is unavailable. unsupported dictionary type: hash
postfix/cleanup[3433]: warning: hash:/etc/postfix/canonical lookup error for “root@localhost”
postfix/pickup[1276]: warning: maildrop/9CD2A660F0: error writing 97E86665CF: queue file write error

Tried web searching for these warnings above, but did not find any explanation or solution.

/etc/postfix/main.cf configs seemingy related are as such…
canonical_maps = hash:/etc/postfix/canonical
relocated_maps = hash:/etc/postfix/relocated
sender_canonical_maps = hash:/etc/postfix/sender_canonical

When looking at the contents of /etc/postfix/canonical and /etc/postfix/relocated, they strangely seem to be man page content, though that is also the case on another machine that delivers mail just fine.

Have all latest system updates, and tried rebooting, but no avail.

Running opensuse tumbleweed kernel 5.12.2-1-default, and postfix version 3.5.10 release 1.2.

What do you advise, to diagnose this and get local mail working?

Thank you

Show output of “postconf -m”.

Just looking at those two lines above postfix will be expecting to find /etc/postfix/canonical.db which should have been made with the postconf command. Do you have such a file?

cidr
environ
fail
inline
internal
ldap
lmdb
memcache
nis
pcre
pipemap
proxy
randmap
regexp
socketmap
static
tcp
texthash
unionmap
unix

Yes. /etc/postfix/canonical.db exists, and so does /etc/postfix/canonical

Though postconf command was not manually invoked.

Both files are -rw-r–r-- 1 root root

So no “hash”. Use different database type.

P.S. and please, post computer output inside of [noparse]

...

[/noparse] tags

~: file /etc/postfix/canonical*
/etc/postfix/canonical:         ASCII text
/etc/postfix/canonical.db:    Berkeley DB (Hash, version 9, native byte-order)
/etc/postfix/canonical.lmdb: data

Sounds like it’s not easier to reconfigure postfix to use type hash. If so, can you point to easiest way to change database type, and what type you’d recommend? Does it entail procuring another database, or just pointing postfix to something else already present? Not seasoned in postfix yet.

Thank you

Local mail using postfix always worked out of the box here with openSUSE. You may try a pristine reinstall.

Hmmm, is it normal that the “modified” date of my canonical.db is 04-FEB-2021 on a TW KDE that is about 2 years old?

/etc/postfix> ls -al
total 460
drwxr-xr-x   3 root root  4096 May 13 22:51 .
drwxr-xr-x 140 root root 12288 May 13 22:56 ..
-rw-r--r--   1 root root 21111 May  8 23:10 access
-rw-r--r--   1 root root 12288 Feb  4 14:06 access.db
-rw-r--r--   1 root root  8192 May 14 07:46 access.lmdb
-rw-r--r--   1 root root 10519 May  8 23:10 aliases
-rw-r--r--   1 root root  3547 May  8 23:10 bounce.cf.default
-rw-r--r--   1 root root 13194 May  8 23:10 canonical
-rw-r--r--   1 root root 12288 Feb  4 14:06 canonical.db
-rw-r--r--   1 root root  8192 May 14 07:46 canonical.lmdb
-rw-r--r--   1 root root 10221 May  8 23:10 generic
-rw-r--r--   1 root root 23802 May  8 23:10 header_checks
-rw-r--r--   1 root root   123 May  8 23:10 helo_access
-rw-r--r--   1 root root 12288 Feb  4 14:06 helo_access.db
-rw-r--r--   1 root root  8192 May 14 07:46 helo_access.lmdb
-rw-r--r--   1 root root   170 May  8 23:10 ldap_aliases.cf
-rw-r--r--   1 root root 31940 Feb 18 22:54 main.cf
-rw-r--r--   1 root root 38127 May  8 23:10 main.cf.default
-rw-r--r--   1 root root 31728 Feb 17 22:41 main.cf.rpmnew
-rw-r--r--   1 root root  7737 Feb 18 22:54 master.cf
-rw-r--r--   1 root root  7717 Apr 29  2020 master.cf.rpmnew
-rw-r--r--   1 root root  2259 May  8 23:10 openssl_postfix.conf.in
-rw-r--r--   1 root root    37 May  8 23:10 relay
-rw-r--r--   1 root root   199 May  8 23:10 relay_ccerts
-rw-r--r--   1 root root 12288 Feb  4 14:06 relay_ccerts.db
-rw-r--r--   1 root root  8192 May 14 07:46 relay_ccerts.lmdb
-rw-r--r--   1 root root 12288 Feb  4 14:06 relay.db
-rw-r--r--   1 root root  8192 May 14 07:46 relay.lmdb
-rw-r--r--   1 root root  6929 May  8 23:10 relocated
-rw-r--r--   1 root root 12288 Feb  4 14:06 relocated.db
-rw-r--r--   1 root root  8192 May 14 07:46 relocated.lmdb
-rw-------   1 root root   172 May  8 23:10 sasl_passwd
-rw-------   1 root root 12288 Feb  4 14:06 sasl_passwd.db
-rw-------   1 root root  8192 May 14 07:46 sasl_passwd.lmdb
-rw-r--r--   1 root root   412 May  8 23:10 sender_canonical
-rw-r--r--   1 root root 12288 Feb  4 14:06 sender_canonical.db
-rw-r--r--   1 root root  8192 May 14 07:46 sender_canonical.lmdb
drwxr-xr-x   3 root root  4096 May  8 23:10 ssl
-rw-r--r--   1 root root 13436 May  8 23:10 transport
-rw-r--r--   1 root root 12288 Feb  4 14:06 transport.db
-rw-r--r--   1 root root  8192 May 14 07:46 transport.lmdb
-rw-r--r--   1 root root 13963 May  8 23:10 virtual
-rw-r--r--   1 root root 12288 Feb  4 14:06 virtual.db
-rw-r--r--   1 root root  8192 May 14 07:46 virtual.lmdb

 sudo postconf -m
[sudo] password for root: 
cidr
environ
fail
inline
internal
ldap
lmdb
memcache
nis
pcre
pipemap
proxy
randmap
regexp
socketmap
static
tcp
texthash
unionmap
unix


I never touched the mail system iirc…

Much the same with my ancient system which hasn’t had it’s postfix configuration touched this year.

Cumulus:~ # ls -al /etc/postfix/can*
-rw-r--r-- 1 root root 13194 Feb  2 15:13 /etc/postfix/canonical
-rw-r--r-- 1 root root 12288 Feb  6 02:31 /etc/postfix/canonical.db

Suspect they maybe rebuilt when some updates are installed. At least my .db mod dates are after the mod dates of base text file which yours are not but your .lmdb files do show a later modification date. So did you change from using ‘hash’ to ‘btree’ file formats?

Never touched it. Maybe a bug since an update in the beginning of Feb?

Right, would figure so, but this is a pretty recent install, with very little use, and no postfix changes besides…

inet_protocols = ipv4

…in main.cf, to get the server to run since this system has ipv6 disabled, and the server would not run otherwise.

If it’s not easier to reconfigure postfix to use type hash, can someone point to easiest way to change database type, and which type is a good choice? Does it entail procuring another database, or just pointing postfix to something else already present? Still new to postfix.

Fixed. It seems hash lookup table type has been tossed. There are /etc/postfix/*.lmdb files already present, which can be used instead.

In /etc/postfix/main.cf just change each instance of…

hash:

…to…

lmdb:

…then restart postfix server.