You are not logged in.

#1 2024-04-11 14:14:49

sukolyn
Member
Registered: 2024-02-14
Posts: 112

[solved] postfix: unsupported dictionary type: hash

hi,

I noticed I don't have my mails from cronie anymore, but cronie doesn't have errors in journalctl.

postfix has error messages :

Apr 11 16:09:00 OptiPlex790 postfix/local[482394]: warning: hash:/etc/postfix/aliases: lookup of 'sukolyn' failed
Apr 11 16:09:00 OptiPlex790 postfix/local[482394]: warning: hash:/etc/postfix/aliases is unavailable. unsupported dictionary type: hash

I tried to rebuild /etc/postfix/aliases using newaliases, and I get this error:

postalias: warning: unsupported dictionary type: hash. Is the postfix-hash package installed?
postalias: fatal: unsupported map type: hash

I don't find postfix-hash using pacman.

system is up to date, and I reinstalled postfix.


EDIT:
I can see that /etc/postfix/aliases.lmdb date is today (after using newaliases) when /etc/postfix/aliases.db date is (more or less) 4 months old.
so, I changed alias_maps from hash:/etc/postfix/aliases to lmdb:/etc/postfix/aliases
and I got my mails

is it normal ?

Last edited by sukolyn (2024-04-11 17:35:58)

Offline

#2 2024-04-11 15:36:47

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,094
Website

Re: [solved] postfix: unsupported dictionary type: hash

sukolyn wrote:

is it normal ?

Yes. Support for BDB hash and btree has been removed.
Pacman notified you about that during the respecive upgrade:
https://gitlab.archlinux.org/archlinux/ … =heads#L10


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#3 2024-04-13 09:11:09

Epp
Member
Registered: 2022-07-11
Posts: 81

Re: [solved] postfix: unsupported dictionary type: hash

Excuses mods/schard for me being too rude, replying at a solved post.

The actions from sukolyn did work for me receiving mail again.

But, perphaps anybody else (like me) without any experience with postmap could be also helped with this.
If you have these btree lines in your main.cf causing errors:

smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

Replace btree by lmdb (as stated) and then run:

postmap /etc/postfix/generic

See: https://www.postfix.org/STANDARD_CONFIG … EADME.html (Solution 1)

Last edited by Epp (2024-04-13 09:17:21)

Offline

#4 2024-04-13 22:46:17

ki9
Member
From: Colorado, USA
Registered: 2023-07-09
Posts: 10
Website

Re: [solved] postfix: unsupported dictionary type: hash

Just to help people searching error messages, this problem manifested for me as:

warning: unsupported dictionary type: hash. Is the postfix-hash package installed?
error: unsupported dictionary type: hash
warning: hash:/etc/aliases is unavailable. unsupported dictionary type: hash
warning: hash:/etc/aliases: lookup of 'myalias' failed

And I replaced the hash db with lmdb with these steps:

  1. sudo pacman -Syu postfix-lmdb

  2. Replace 'alias_maps = hash:/etc/aliases' with 'alias_maps = lmdb:/etc/aliases' in main.cf

  3. sudo postalias lmdb:/etc/aliases && sudo rm /etc/aliases.db

Then check the config and restart postfix.

Offline

#5 2024-04-17 11:34:38

HLFH
Member
Registered: 2012-07-16
Posts: 6

Re: [solved] postfix: unsupported dictionary type: hash

Because it was a breaking change, I downgraded postfix with agetpkg.

Then, I did that:

1) pikaur -Syu postfix-lmdb

2) replaced hash and btree by lmdb in main.cf

3) postalias lmdb:/etc/postfix/aliases
postmap lmdb:/etc/postfix/transport
postmap -F lmdb:/etc/postfix/sni.map
postmap lmdb:/etc/postfix/dnsbl-reply-map
postmap lmdb:/etc/postfix/rbl_override
postmap lmdb:/etc/postfix/generic
postmap lmdb:/etc/postfix/virtual
postmap lmdb:/etc/postfix/generic
postmap lmdb:/etc/postfix/access

4) rm /etc/postfix/*.db

5) And I updated postfix again and restarted it with systemctl restart postfix.

6) I also updated ExecStartPost line of /etc/systemd/system/certbot.service

[Unit]
Description=Let's Encrypt renewal

[Service]
Type=oneshot
ExecStart=/usr/bin/certbot renew --quiet --agree-tos --deploy-hook "/usr/bin/certbot-ocsp-fetcher -o /etc/nginx/ocsp 2>&1"
ExecStartPost=/usr/bin/postmap -F lmdb:/etc/postfix/sni.map 
ExecStartPost=/usr/sbin/systemctl reload nginx postfix dovecot

Last edited by HLFH (2024-04-17 11:35:24)

Offline

#6 2024-05-02 05:34:47

iPaq
Member
Registered: 2019-12-06
Posts: 5

Re: [solved] postfix: unsupported dictionary type: hash

Orchestrating a fleet consisting of hundreds of postfix hosts (where `pacman` output isn't monitored) is there a channel to receive warning about these kind of breaking changes in future? I'm lucky to have caught this on the test stack first.

Offline

Board footer

Powered by FluxBB