[ILUG] postfix whitelist smtp servers

Gavin McCullagh gmccullagh at gmail.com
Thu Feb 14 14:52:44 GMT 2008


Hi,

I'm looking to whitelist a few smtp servers which ours should accept mail
from while blocking all others.  We're using postfix.

The first way I thought of was to use:

  smtpd_recipient_restrictions = ..., check_client_access hash:/etc/postfix/access, ...

and then create the map with something like:

  w.x.y.z OK
  a.b.c.d OK
  ???     401 try again later

except that the ??? is the problem.  I can't figure out how to specify all
networks.  A /8 is easy with eg. "127. " but to ban everyone would require
254 of those lines which can't be right.

I could perhaps allow certain HELO hostnames, but the IP address seems the
more concrete thing to block by.

I'm sure I must be missing something obvious here.  Does anyone know the
best way to do this?

Thanks in advance,
Gavin




More information about the ILUG mailing list