How to create Postfix database files

Every time I come to recreate the Postfix database file when I edit the file /etc/postfix/virtual.cf I forget what command I need to recreate virtual.cf.db

Hopefully I’ll check my blog next time. The command is postmap. Hope this is useful for someone else too!

postmap /etc/postfix/virtual.cf
/etc/init.d/postfix restart


6 Comments

Joe Jacobs (1 comments.) on November 11, 2009 at 11:47 am.

Funnily enough I do the same thing quite often as well. Guess I’ll just have to remember to check your blog next time!

Reply

Steve (2 comments.) on November 11, 2009 at 11:51 am.

It gets me every time too. I sit there thinking that I know I have to rebuild the hash files but I can never remember the command – probably because of its name, which although technically correct in that its to do with postfix map files, isn’t that obvious.

Reply

Donncha (1707 comments.) on November 11, 2009 at 12:32 pm.

Me too. I stared at the command prompt thinking it was “hash” something or other. It’s actually not that easy to find an answer either. I had to check more than a page or two to find postmap.

Not anymore eh? :)

Reply

Mihai Secasiu (2 comments.) on November 11, 2009 at 12:38 pm.

Editing the files and running postmap is fun :) but webmin/virtualmin is faster and you don’t have to remember to postmap :)

Reply

Geoff Kendal (1 comments.) on November 13, 2009 at 11:12 am.

I always forget this too… My solution was to just put a comment at the top of my virtual.cf file:

# postmap /etc/postfix/virtual.cf && /etc/init.d/postfix restart

So when I’ve finished editing, copy that line, save the file, paste onto the prompt… You don’t even have to look at your blog, it just there waiting for you!! :)

Reply

Julius Hyvoenen on April 3, 2012 at 7:37 pm.

How the hell am I supposed to remember the address for this blog next time I forget the same command? Some 5th or 6th googleing led me here.
But thanks anyway. At least you helped me this time.

Reply

Leave Your Comment

Your email will not be published or shared. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Holy Shmoly! is Stephen Fry proof thanks to caching by WP Super Cache