Rich Shepard wrote:
On Thu, 7 Aug 2008, Stan Hoeppner wrote:

Oh, heheh.  No, I meant like do I need to be running postmap on it from
the command line kinda scenario, like with the access file.

Stan,

  Yes: postmap. I use a Makefile so each time I change anything in
/etc/postfix the proper builds are run. Here's my Makefile:

# Makefile for /etc/postfix

TARGETS := access.db badaddr.db badip.db helo_checks.db\
    virtual.db aliases.db major-aliases.db recipients.db .build.mark

all: $(TARGETS)
    /usr/sbin/postfix reload
    rm -f *~

aliases.db: aliases
    /usr/sbin/postalias aliases

major-aliases.db: major-aliases
    /usr/sbin/postalias major-aliases

virtual.db: virtual
    /usr/sbin/postmap hash:/etc/postfix/virtual

.build.mark: main.cf master.cf header_checks body_checks
    touch .build.mark

%.db: %
    /usr/sbin/postmap $<

Rich


No, you do not need to "postmap" cidr: or regexp: or pcre: tables. These are all just plain text files. Postfix reads in the plain text file and processes it internally.

/* comments:
Postmap will not return an error if you attempt to index a table intended for cidr or regexp, but postfix will never use the resulting .db file. So while "postmap table.cidr" is unlikely to break anything, all it does is waste your time.

Yes, a Makefile is a great way to manage your indexed files. cidr tables are not indexed files.

(secret from the crypt: you might want to tell your Makefile to postmap some *other* indexed file when a cidr/pcre/regexp file changes. Read the docs carefully to figure out why you might want to do this.)
*/

--
Noel Jones

Reply via email to