postfix postmap, when to use

Jeff Penn jeff+freebsd at jrpenn.demon.co.uk
Sun Jul 4 12:38:24 PDT 2004


dave <dmehler26 at woh.rr.com>:
>     I've got a confusion issue, regarding postfix's postmap and when to use
> it. I've read some documentation that suggests you don't need to run it when
> making regexp or pcre map types such as in header_checks, yet the
> header_checks file supplied with postfix 2.1 suggests to run it. In addition
> hash and other types i'm similar confused. Has this changed from 2.0 to 2.1?

I believe you are correct, certainly pcre & possibly regexp do not
require postmap to be run.  Postfix has the tools to help you work this
out for yourself:

 believe you are correct, certainly pcre & possibly regexp do not
require postmap to be run.  Postfix has the tools to help you work this
out for yourself:

# cat /usr/local/etc/postfix/maps/helo_access.pcre
/^[0-9]+(\.[0-9]+){3}$/     REJECT Invalid hostname
# postmap -q 10.0.0.1 pcre:/usr/local/etc/postfix/maps/helo_access.pcre
REJECT Invalid hostname

# cat /usr/local/etc/postfix/maps/user_access
jeff    OK
# postmap -q jeff hash:/usr/local/etc/postfix/maps/user_access
postmap: fatal: open database /usr/local/etc/postfix/maps/user_access.db
: No such file or directory
# postmap hash:/usr/local/etc/postfix/maps/user_access
# postmap -q jeff hash:/usr/local/etc/postfix/maps/user_access
OK

Use postconf -m to find out what databases your system supports.

jeff


More information about the freebsd-questions mailing list