Dear all,

Yesterday I succeeded into blocking some IP (or more exactly allowing only some) to connect to one of my server and send email via SMTP.

Now for another server, I need something a little more complicated and I would be happy if someone could direct me to the right method.

I would like to activate this functionality ONLY for some domains :
 * Some (recipient) domains should accept emails from any IP
* Some other (recipient) domains should accept emails only from IP in the list

This is my working config to allow emails only from some IP, for all domains :

> 1. Added this in main.cf :
> smtpd_client_restrictions = check_client_access cidr:/etc/postfix/access
>
> 2. Added this to /etc/postfix/access :
> 216.82.240.0/20 OK
> 213.213.213.213 REJECT
>
> 3. Command line :
> postmap access
> /etc/init.d/postfix reload

How can I therefore decide for which domains this config is active and for which domains all incoming IP are accepted ?

Thanks a lot in advance for any hint !

Denis

Reply via email to