Networking Forums

Networking Forums > Computer Networking > Linux Networking > postfix, regular expressions and /etc/access.

Reply
Thread Tools Display Modes

postfix, regular expressions and /etc/access.

 
 
alt
Guest
Posts: n/a

 
      11-13-2003, 08:24 PM
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
 
Reply With Quote
 
 
 
 
alt
Guest
Posts: n/a

 
      11-14-2003, 05:31 AM
alt wrote:

<snip>


never mind... its working good now. my test was bad. :\

--
Donovan Hill
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expression Dan N Linux Networking 6 04-14-2008 08:46 AM
DI704 - Can I Use It as A Regular Router? keithatqes Network Routers 0 04-28-2006 12:28 AM
Regular ADSL crashes (through Plus.net) N Orr Broadband 5 10-08-2004 04:09 PM
SpeedTouch Pro as a regular modem Crypto Broadband 1 01-22-2004 11:25 AM
VPN as well as regular connection Superlifer Wireless Internet 2 11-12-2003 04:35 PM



1 2 3 4 5 6 7 8 9 10 11