Hi,

What you describe already exists. It’s called texthash.

For example:

virtual_alias_maps = texthash:/etc/postfix/virtual

No postmap step, no .db file. The text file is read into memory when the map is 
opened.

The main caveat is that changes aren’t automatically detected by processes that 
already have the map open, so a postfix reload may be needed.

See https://www.postfix.org/DATABASE_README.html


  Ömer

> Am 27.10.2026 um 09:55 schrieb Patrick Ben Koetter via Postfix-users 
> <[email protected]>:
> 
> Hi Michael!
> 
> * Michael Tokarev via Postfix-users <[email protected]>:
>> Hi!
>> 
>> Why postfix does not allow using of regular plaintext maps as used as the
>> *source* for postmap/postalias commands, without extra indexing 
>> (.db/.cdb/etc)?
>> 
>> There are very many setups where map size is not a concern at all, the maps 
>> are
>> small and consumes tiny fraction of the process memory size.  For these, 
>> reading
>> the whole file contents into memory at the process startup seems like a 
>> no-cost
>> solution, but it saves the need to index the map, to convert it to a 
>> different
>> format, and many other hassles like this.
> 
> Out of curiosity: Indexing, conversion… all of that can be taken of by
> automation nowadays. What would be the gain beyond that?
> 
> Personally I can see less dependencies, smaller machines (read: containers)
> and less attack vectors. The latter would be attractive to me given the flood
> of AI driven zeros we will be seeing in the near future.
> 
> p@rick
> 
> --
> [*] sys4 AG
> 
> https://sys4.de, +49 (89) 30 90 46 64
> Schleißheimer Straße 26/MG,80333 München
> 
> Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
> Vorstand: Patrick Ben Koetter, Marc Schiffbauer
> Aufsichtsratsvorsitzender: Florian Kirstein
> 
> _______________________________________________
> Postfix-users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to