Here is what I've done.
I have a file named /etc/postfix/access which is a hash file used to limit
client access. I've created another file called /etc/postfix/access.regexp
which is defined as a regexp in main.cf which is also to limit client
access, but based on regular expressions. I've added the regular
expressions for clients I don't want to see, but it doesn't seem to be
working.
Has anyone ever done this, or something like it?
My end goal is to reject connections from hostnames with "adsl" or "pcp" in
them.
Relevant portions of main.cf:
==========
smtpd_client_restrictions =
reject_unauth_pipelining,
permit_mynetworks,
check_client_access hash:/var/lib/pop-before-smtp/hosts,
check_client_access hash:/etc/postfix/access,
check_client_access regexp:/etc/postfix/access.regexp,
reject_maps_rbl
==========
/etc/postfix/access (only part):
==========
200 554 LACNIC Addresses Blocked due to high spam content
201 554 LACNIC Addresses Blocked due to high spam content
209 554 LACNIC Addresses Blocked due to high spam content
66.44.7 OK
..client.comcast.net REJECT DSL/Cable Users should use their ISP's mail
server
===========
/etc/postfix/access.regexp:
===========
/.*adsl.*/ REJECT DSL/Cable Users should use their ISPs mail server
/.*pcp.*/ REJECT DSL/Cable Users should use their ISPs mail server
===========
Anyone have any thoughts? Should I reformat /etc/postfix/access as regular
expressions and use only one file?
--
Donovan Hill
|