On Sat, Aug 02, 2025 at 01:27:53PM +0200, Matteo Bini via Postfix-users wrote:

> Hello Postfix users,
> I have a very quick and easy question for you.
> 
> Is it possible to use a texthash database for both alias_database and
> alias_maps parameters?

The correct setting would be:

    # EMPTY!  Since since texthash files are used directly, without
    # building an external indexed table via "postalias" or "postmap"
    alias_database = 

    # The format is that of any other texthash table, not that of
    # aliases(5)!
    alias_maps = texthash:${config_directory}/aliases.txt

> I tried writing
> 
> alias_maps = texthash:/etc/aliases

This won't work unless you make a copy of the file with the ":" suffixes
removed from all the keys.

> However upon restart I got the following error.
> 
> warning: /etc/aliases, line 8: record is in "key: value" format; is this an 
> alias file?

As expected.

> Is there any of you who uses a texthash database for aliases? If yes,
> how?

The map has to be a standard key/value map.  While the source file of
aliases(5) is normally "key: values...", the indexed files created by
postalias are not different from any other key/value indexed file, and
same must hold true for mysql, LDAP, texthash, ...

-- 
    Viktor.  🇺🇦 Слава Україні!
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to