Matus UHLAR - fantomas:
> >> I would like to configure Postfix the following way:
> >>
> >> - emails from localhost -> 192.168.1.5
> >> - emails from my_network (192.168.1.0/24) -> the rest of the world
> >> (with MX resolution)
> >>
>
> On 03.05.21 15:08, IL Ka wrote:
> > Do you know which sender will be used for your locally generated mail?
> >If so, try
> >http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps
>
> note that sender_dependent_relayhost_maps use sender mail address, not
> sending IP.
Assuming that no content_filter is configured on this machine:
1) Set a filter action in an access map for mail from 127.0.0.1:
/etc/postfix/main.cf
smtpd_client_restrictions =
check_client_access inline:{{127.0.0.1 = filter smtp:[192.168.1.5]}}
2) Set a content_filter option for /usr/sbin/sendmail submission:
/etc/postfix/master.cf
pickup .. .. .. .. .. .. pickup
-o content_filter=smtp:[192.168.1.5]
Otherwise, this may be a job for
http://www.postfix.org/MULTI_INSTANCE_README.html
Wietse