Re: Postfix: reject mynetworks and after that permit all mail

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Postfix: reject mynetworks and after that permit all mail

Justin Piszcz


On Wed, 2 Jul 2008, Alejandro Cabrera Obed wrote:

> - Postfix mail server
> - 1.com, 2.com and 3.com are supported virtual domains
> - I want to deny mails from 1.com and 2.com to 3.com AND I want to
> accept mails coming from Internet to 3.com
>
> In others words, something like this: "reject mynetworks, permit all".
>
> How can I implement what I need ???
>
> Special thanks again
>
>
> Alejandro
>
> --
> Alejandro Cabrera Obed
> [hidden email]
> www.alejandrocabrera.com.ar
>

Ack, I have a general idea but I do not use virtual domains here other
than for e-mail re-direction/etc, you may want to consult the mailing list
for this one.

For your internal domain you would want to do this before the
check_recipient_access:

check_client_access hash:/etc/postfix/client_checks,

# check_recipient_access
ip_of_domain1  OK

Or use a check_sender_access hash and use the domain itself.

Then,

check_client_access hash:/etc/postfix/client_checks,

check_recipient_access hash:/etc/postfix/recipient_checks

# recipient_checks
@1.com  REJECT
@2.com  REJECT
@3.com  DUNNO

Will cc the mailing list to verify/check this.

Justin.