Block certain prefixes/TLDs from accessing

2016-08-11 Thread Richard Klingler
Hello Is there an easy way to block a list of prefixes from accessing postfix? Right now I use ipfilter on FreeBSD to block certain ranges/countries as only spam is originating from there... Preferably I would like to combine prefix and domain filtering as plain helo_checks won't allow regular e

Re: Block certain prefixes/TLDs from accessing

2016-08-11 Thread Richard Klingler
On Thu, 11 Aug 2016 10:15:04 -0400, Bill Cole wrote: > On 11 Aug 2016, at 6:25, Richard Klingler wrote: > >> plain helo_checks won't allow regular expression for hostnames. > > Why do you believe this? > > I have used regexp and pcre tables for helo_checks succe

Re: Block certain prefixes/TLDs from accessing

2016-08-11 Thread Richard Klingler
>> /^.*\.ppp\..*$/ REJECT No email accepted from DSL users >> /^.*\.dsl\..*$/ REJECT No email accepted from DSL users > > useless anchors... > > /\.dsl\./ REJECT ... > /\.ppp\./ REJECT ... Hmm...but $/ is neeed if I want to completely reject a specific TLD like: /\.cn$/ Or which exta

Re: Block certain prefixes/TLDs from accessing

2016-08-11 Thread Richard Klingler
On Thu, 11 Aug 2016 10:53:14 -0500, /dev/rob0 wrote: > I believe today is my day on the pedantry schedule, so here I go, > picking nits. > > On Thu, Aug 11, 2016 at 12:25:22PM +0200, Richard Klingler wrote: >> Is there an easy way to block a list of prefixes from accessing

Re: Block certain prefixes/TLDs from accessing

2016-08-11 Thread Richard Klingler
On Thu, 11 Aug 2016 13:44:42 +0300, Nikolaos Milas wrote: > On 11/8/2016 1:25 μμ, Richard Klingler wrote: > >> Is there an easy way to block a list of prefixes from accessing postfix? >> ... >> Preferably I would like to combine prefix and domain filtering >> as

Re: Block certain prefixes/TLDs from accessing

2016-08-11 Thread Richard Klingler
On Thu, 11 Aug 2016 20:31:04 +0200, Benny Pedersen wrote: > On 2016-08-11 20:10, Richard Klingler wrote: > >> Aug 11 20:05:39 marvin postfix/smtpd[19974]: initializing >> the server-side TLS engine >> Aug 11 20:05:39 marvin postfix/smtpd[19974]: conne

Re: Block certain prefixes/TLDs from accessing

2016-08-11 Thread Richard Klingler
On Thu, 11 Aug 2016 21:33:39 +0200, Benny Pedersen wrote: > On 2016-08-11 21:06, Noel Jones wrote: > >> http://www.postfix.org/postconf.5.html#smtpd_discard_ehlo_keyword_address_maps >> http://www.postfix.org/postconf.5.html#smtpd_sasl_exceptions_networks > > same effect can be made with sasl dis

Re: Block certain prefixes/TLDs from accessing

2016-08-11 Thread Richard Klingler
On Thu, 11 Aug 2016 14:06:44 -0500, Noel Jones wrote: > On 8/11/2016 1:10 PM, Richard Klingler wrote: >> Doesn't work with the blacklisted_prefix file... >> >> Have: >> >> smtpd_recipient_restrictions = check_client_access >> cidr

Re: Block certain prefixes/TLDs from accessing

2016-08-11 Thread Richard Klingler
Okayregardless of SASL tries I have in the blacklist: 60.166.0.0/15 REJECT but still this kicks in: Aug 11 22:17:36 marvin postfix/smtpd[30519]: connect from unknown[60.167.116.249] Aug 11 22:17:37 marvin postfix/smtpd[30519]: NOQUEUE: reject: RCPT from unknown[60.167.116.249]: 55

Re: Block certain prefixes/TLDs from accessing

2016-08-11 Thread Richard Klingler
On Thu, 11 Aug 2016 22:45:01 +0200, Benny Pedersen wrote: > On 2016-08-11 22:34, Richard Klingler wrote: > >> So it made up to this point: >> smtpd_recipient_restrictions = check_client_access >> cidr:/usr/local/etc/postfix/blacklisted_prefixes, > > note smtpd_rec

Re: Block certain prefixes/TLDs from accessing

2016-08-11 Thread Richard Klingler
On Thu, 11 Aug 2016 22:54:37 +0200, Benny Pedersen wrote: > On 2016-08-11 22:49, Richard Klingler wrote: > >> I've put it also now on the client restriction..but the message looks >> the same... >> Clients still can try to do SMTP AUTH... > > disable sas

Re: Block certain prefixes/TLDs from accessing

2016-08-12 Thread Richard Klingler
> For name-based rejection (verified rDNS or HELO/EHLO) that you don't > want/need exempted by anything else, use check_client_access in > smtpd_client_restrictions and check_helo_access in > smtpd_helo_restrictions (and/or their arcane variants, see the > postconf(5) man page) > Hmm..have in