Creating a national/local restriction group as per the documentation works, local and national, but the server keep receiving mails for them from the outside world, but the send restriction is in place.
Investigation
Further investigation revealed that this bug only affect setups that uses a mail gateway, and the bug is the inclusion of the mail gateway IP on the "my_networks" listing; that way makes incoming email skips the restrictions.
The solution is to remove the mail gateway IP from the my networks variable.
Describe the bug
Creating a national/local restriction group as per the documentation works, local and national, but the server keep receiving mails for them from the outside world, but the send restriction is in place.
Investigation
Further investigation revealed that this bug only affect setups that uses a mail gateway, and the bug is the inclusion of the mail gateway IP on the "my_networks" listing; that way makes incoming email skips the restrictions.
The solution is to remove the mail gateway IP from the my networks variable.