Postfix fails with unsupported dictionary type: hash after upgrading to RHEL 10

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 10

Issue

After upgrading a system to RHEL 10.0, Postfix may fail to rebuild aliases or start correctly if the configuration still references the Berkeley DB (hash) lookup tables.

Running commands such as newaliases or postalias may result in errors like:

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

Resolution

  1. Update Postfix configuration /etc/postfix/main.cf:
    Replace hash lookups with lmdb:

       # Old settings (no longer supported in RHEL 10)
       # alias_maps = hash:/etc/aliases
       # alias_database = hash:/etc/aliases
    
       # Updated settings for RHEL 10
       default_database_type = lmdb
       alias_maps = lmdb:/etc/aliases
       alias_database = lmdb:/etc/aliases
    
    
  2. Rebuild aliases or other maps:
    Use postmap or newaliases to regenerate the database in LMDB format:

         newaliases
        postmap /etc/postfix/virtual
    
    
  3. Restart Postfix:

    systemctl restart postfix
    

Root Cause

  • RHEL 10 no longer provides the Berkeley DB (BDB) libraries.

  • Postfix configurations that rely on hash: lookup tables will fail.

  • The error message incorrectly suggests that a missing package (postfix-hash) is the cause.

SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.