Relaying based on Souce IP address

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Relaying based on Souce IP address

pete pot
Hi,

Currently my Postfix is realying emails from domains listed in $relay_domains only when those emails come from IPs listed in $mynetworks.

Is it possible with postfix to split this? to allow relaying some domains only when coming from IP 'A' and some other domains only when coming from IP 'B' 

Thx...

--PPot.
Reply | Threaded
Open this post in threaded view
|

Re: Relaying based on Souce IP address

Wietse Venema
pete pot:
> Hi,
> Currently my Postfix is realying emails from domains listed in
> $relay_domains only when those emails come from IPs listed in
> $mynetworks.

Postfix does not give relay permission based on the "mail from"
address.

Instead, Postfix is usually configured to give relay permission
based on IP address (permit_mynetworks) or SASL authentication
status (permit_sasl_authenticated).

With SASL authentication it is possible to require that a user
can only send mail with a specific "mail from" address that is
configured in smtpd_sender_login_maps.

Otherwise, to enforce policies for a combination of ("mail from"
and client IP address), perhaps http://www.postfwd.org/ can help.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Relaying based on Souce IP address

Matus UHLAR - fantomas
In reply to this post by pete pot
On 04.12.18 10:10, pete pot wrote:
>Currently my Postfix is realying emails from domains listed in $relay_domains

are you aware that relay_domains is list of domains that postfix will
receive mail TO, not send from? The point is to be MX server for those
domains.

>Is it possible with postfix to split this?  to allow relaying some domains
> only when coming from IP 'A' and some other domains only when coming from
> IP 'B' 

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"Where do you want to go to die?" [Microsoft]