On 1 Mar 2021, at 5:14, Jaap Gordijn wrote:
For my local mailserver with postfix/dovecot and virtual domains set
up as
follows:
relayhost = aaa.bbb.ccc:25
virtual_mailbox_domains = xxx.yyy.zzz
virtual_transport = lmtp:unix:private/dovecot-lmtp
I would like to achieve the following
- mail of all subnets in my LAN is relayed if nesessary (so not for
the
virtual domain). To accomplish this, I have listed all my subnets
under
mynetworks. This works
- restrict the delivery of a particular subnet, 192.168.80.0/24 only
to the
virtual domain so forbid further relay via the relayhost
How to accomplish this? I can not remove the 192.168.80.0/24 from
mynetworks
because then the email is not delivered to the virtual domain too.
One approach would be to put a restriction to block that subnet into
smtpd_relay_restrictions BEFORE permit_mynetworks. Another possibility
would be to remove that subnet from mynetworks and use a restriction
class to allow clients on that subnet to send mail to the virtual
domain.
Saying which of those would be a better fit for your config would
require you to provide more information, as described at
http://www.postfix.org/DEBUG_README.html#mail
--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire