# postmap question with regexp

## dstutz97

man postmap says this: Use  the  command  postconf  -m  to  find  out  what types of database your Postfix installation can support....sooooo:

```
# postconf -m

static

sdbm

pcre

nis

regexp

environ

proxy

btree

unix

hash

```

and then...

```
# postmap regexp:header_checks

postmap: fatal: unsupported map type: regexp
```

Anyone know what's goin on here?

----------

## dstutz97

Well...it seems that you don't need to run postmap on regexp or pcre files.  They just work as is in ASCII format.  

```
Sep 28 01:28:37 erma postfix/cleanup[4427]: 2D1623440D: reject: header Subject: ADV: buy some viagra you limp dicked bastard!!! from web40513.mail.yahoo.com[66.218.78.130]; from=<fakeemail@yahoo.com> to=<dstutz@example.com> proto=SMTP helo=<web40513.mail.yahoo.com>: Message content rejected
```

here's my header_checks so far:

```
# cat header_checks

#Header checks file

/^Subject: ADV/                 REJECT
```

All you need is the header_checks file and then put this in your main.cf for postfix

```
header_checks = regexp:/etc/postfix/header_checks

```

then

```
# postfix reload 
```

Obviously it's quite similar for the body checks.

----------

