I've got the following problem which is not critical but still interesting. I'm cloning an LXC container which optionally can contain postfix installation. After cloning the filesystem there's a number of places I need to change the hostname in.

I used grep to search for these places and unexpectedly found mentioning of hostname in /etc/aliases.db, even though /etc/aliases does not include it. Thus I wonder if I need to re-generate /etc/aliases.db and how can I do it without actually starting container?


I can run `newaliases -oAhash:/container/rootfs/etc/aliases` from host, but then there's a name of the host system in aliases.db, not container's. I can also re-generate it from within a container after starting it and then reload postfix, but it is kludgy. Is there some better way?


--

With Best Regards,
Marat Khalili

Reply via email to