-1

is there a possibility to block multiple EMails with* or % like this:

Emails I want to block:

test123@domain.com REJECT
test243@domain.com REJECT
test173@domain.com REJECT
test923@domain.com REJECT

My idea:

test*@domain.com REJECT

or

test%@domain.com REJECT

Is there a possibility to do this?

Thank you.

CWollinger
  • 13
  • 5
  • Yes it is possible. May i know how you are currently trying to use this file with postfix. For eg. `check_sender_access hash:/etc/postfix/file` – clement Jan 31 '15 at 12:34
  • Yes using /etc/postfix/blacklist with postmap hash:/etc/postfix/blacklist – CWollinger Jan 31 '15 at 20:30

1 Answers1

0

Ya that is possible. You can use pcre lookup type to achieve this.

#/etc/postfix/blacklist.pcre
/^test.*@domain.com$/   REJECT

You can use this in your main.cf as pcre:/etc/postfix/blacklist.pcre.

PS: Your postfix server will need to compiled with pcre support. You can confirm the same by typing postconf -m which should give pcre in output. Hope that helps. More info about Postfix lookup tables here

clement
  • 3,289
  • 2
  • 17
  • 11