Noel Jones a écrit :
> Denis BUCHER wrote:
>> I have a server with different domains on it. Some domains should only
>> receive emails from specific IP adresses (SPAM filtering) while other
>> domains should accept emails from all domains.
>>
>> How could I implement this ?
>>
>> I suppose I have to do a hash with the specific IPs, and add this hash
>> as filter for the domains that should be filtered ?
>>
>> Is this correct, and could someone point me to how it should be done ?
> 
> Here's the documentation on how to do something like this:
> http://www.postfix.org/RESTRICTION_CLASS_README.html
> 
> A brief example:
> #main.cf
> smtpd_delay_reject = yes
> (this is the default; required for this example)
> 
> smtpd_restriction_classes = from_spamfilter_only
> 
> from_spamfilter_only =
>   check_client_access cidr:/etc/postfix/from_spamfilter.cidr
> 
> smtpd_client_restrictions =
>   check_recipient_access hash:/etc/postfix/filtered_domains
> 
> # filtered_domains table
> # postmap this table after edits!
> example.com  from_spamfilter_only
> other.example.org  from_spamfilter_only
> 
> # from_spamfilter cidr table
> # postmap not necessary.
> 10.1.1.0/27  OK
> 192.168.100.127  OK
>  # next line rejects any unauthorized clients
> 0.0.0.0/0  REJECT you must use our MX host

Thanks a lot, this looks very nice and powerful, exactly what I was
searching for :-))

(And thanks to Ralf Hildebrandt that pointed to the same method too)

Have a nice week !

Denis

Reply via email to