I accidentally emptied my ā/etc/postfix/virtualā file. How can I regenerate this file from Virtualminās own database? Is āvirtualmin rebuild-maps --all-domainsā the right command for this, and is it safe to run?
Wait, I thought postmap was the one for creating the .db file from the text file.
Doesnāt virtualmin rebuild-maps actually generate the text content itself by pulling data from Virtualminās own configs? If not, how am I supposed to fill that empty text file back up?
Exactly. So since my virtual text file is now empty, I need a way to refill it using Virtualminās own database.
Is virtualmin rebuild-maps --all-domains the right command to regenerate that text file content? Or is there another way to tell Virtualmin to write its current alias list back into /etc/postfix/virtual?
I think thereās a misunderstanding. Iām not trying to build the .db file from the text file. I know postmap does that.
My problem is the /etc/postfix/virtualtext file itself is empty. I need Virtualmin to look at its own database (where it stores alias/domain info) and rewrite the content into that empty text file. I believe virtualmin rebuild-maps --all-domains is designed to do this sync. Is that correct? If not, how can I trigger Virtualmin to āre-exportā its internal alias list back into the text file?
Thanks, but postmap -s only works if the .db file is intact. In my case, the .db file is also corrupted because the source text file was emptied. I donāt want to extract data from Postfix; I need Virtualmin to push its own internal data into Postfix.
Iām pretty sure virtualmin rebuild-maps --all-domains is the command that handles this sync by pulling from Virtualminās metadata. I just want to be 100% sure that running it wonāt touch or break anything else outside of the /etc/postfix folder. Thatās my main concern.
what size is your virtual.db? virtual.db doesnāt need virtual for postfix to work, its only use to build virtual.db, unless you did a rebuild after you lost the content of virtual (then your pretty much stuffed).
did you try running the command?
Vitualmin rebuld-maps would just use the postmap commands, its a script design to make life easier for virtuamin users, donāt overthink it.
Also Virtuamin is just GUI to configure your server, its not the server it dosnāt store that info in its configās, its just reading from the postfix config files. If you stop Virtualmin your server still keeps running.
I remember losing a file in my /etc before and found that Virtualmin (or something) kept backups of the entire /etc folder for me⦠so I was able to restore⦠but I canāt remember what it was.