cidr map for a certain receiver address only?

2012-04-09 Thread tobi

Hello list

I wonder if it's somehow possible to block client ips from a cidr map 
for a certain receiver address only. I have some addresses for which I 
do not want clients from certain providers to send mail to. With a cidr 
map in smtpd_client_restrictions I affect all addresses on my server, 
which is not my intention ;-)
Would it be possible to define this via a postfix policy or something 
similar? My goal would be to get a cidr map that would only be used when 
certain receiver addresses occur during smtp dialog.


Thanks for any hint

tobi


Re: cidr map for a certain receiver address only?

2012-04-09 Thread /dev/rob0
On Mon, Apr 09, 2012 at 02:23:14PM +0200, tobi wrote:
 I wonder if it's somehow possible to block client ips from a cidr 
 map for a certain receiver address only. I have some addresses for 
 which I do not want clients from certain providers to send mail to. 
 With a cidr map in smtpd_client_restrictions I affect all addresses 
 on my server, which is not my intention ;-) Would it be possible to 
 define this via a postfix policy or something similar? My goal 
 would be to get a cidr map that would only be used when certain 
 receiver addresses occur during smtp dialog.

Use a restriction class called from a check_recipient_access lookup, 
which then does your check_client_access cidr: lookup.

http://www.postfix.org/RESTRICTION_CLASS_README.html
http://www.postfix.org/SMTPD_ACCESS_README.html
http://www.postfix.org/postconf.5.html#check_recipient_access
http://www.postfix.org/postconf.5.html#check_client_access
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if /dev/rob0 is in the Subject:


Re: cidr map for a certain receiver address only?

2012-04-09 Thread tobi

On 09.04.2012 15:19, /dev/rob0 wrote:

On Mon, Apr 09, 2012 at 02:23:14PM +0200, tobi wrote:

I wonder if it's somehow possible to block client ips from a cidr
map for a certain receiver address only. I have some addresses for
which I do not want clients from certain providers to send mail to.
With a cidr map in smtpd_client_restrictions I affect all addresses
on my server, which is not my intention ;-) Would it be possible to
define this via a postfix policy or something similar? My goal
would be to get a cidr map that would only be used when certain
receiver addresses occur during smtp dialog.

Use a restriction class called from a check_recipient_access lookup,
which then does your check_client_access cidr: lookup.

Thanks for putting me into the right direction. that works perfect :-)