If admins should not use postmap etc. i think its a good idea to make a note in the manpages for this. i am using postfix since more than ten years and never used it this way. and i guess i am not alone. most howtos are talking about postmap and i guess also some books.

but i still think postmap could be improved to help to avoid an incorrect usage.

i am not sure about this. but i guess normally an aliases file should not contain any line thats a valid line for postmap. so it would be an idea that postmap will not overwrite an existing .db file unless it it finds at least one valid line in the input?

another idea would be to let postmap check if an existing .db file is an "postmap db file" and if not leave it untouched and warn the user?

regards
the2nd

On 2015-01-12 17:07, [email protected] wrote:
[email protected]:
[ Charset windows-1252 converted... ]

Am 12.01.2015 um 16:33 schrieb Wietse Venema:
> [email protected]:
>> what about
>>
>> * open a temporary new file for step 1
>> * if the operations fails just delete it
>> * if the operation suceeds move it to the final location
>
> What about databases that require TWO files? There is no
> atomic operation to move two files

create TWO temp files and decide at the end if they both are should be
moved or deleted? i don't get why you care in that context about atmoic
move of two files

People should be encouraged more to use "make" as described in
DATABASE_README (http://www.postfix.org/DATABASE_README.html). There
is an explicit example for aliases and other maps.

        Wietse

Reply via email to