I've been through the wiki, forum search and actually found a partial solution to my issue.
So, let me go over what I need and did so far.
I need a couple of my users to not be able to receive e-mail nor send e-mail outside their domain.
So I've found plenty of articles describing how to prevent them to send e-mail outside the domain, implemented, tested, it works!
But blocking mail from outside the domain is the problem.
So, what I've done so far.
As zimbra user:
$ cd /opt/zimbra/conf
$ echo "email@example.com restrict_tpmail" > tpmail_senders
$ postmap tpmail_senders
$ echo "mydomain.lan OK" > tpmail_recipients
$ postmap tpmail_recipients
$ vi zmconfigd.cf
in the SECTION mta DEPENDS amavis, under the line POSTCONF virtual_transport LOCAL postfix_virtual_transport
POSTCONF smtpd_sender_restrictions FILE postfix_sender_restrictions.cf
POSTCONF smtpd_recipient_restrictions FILE postfix_recipient_restrictions.cf
POSTCONF smtpd_restriction_classes restrict_tpmail
POSTCONF restrict_tpmail FILE postfix_restrict_tpmail.cf
$ echo "check_sender_access hash:/opt/zimbra/conf/tpmail_senders" > postfix_sender_restrictions.cf
$ echo "check_recipient_access hash:/opt/zimbra/conf/tpmail_recipients, reject" >> postfix_restrict_tpmail.cf
$ cat postfix_sender_restrictions.cf
$ cat postfix_recipient_restrictions.cf
$ cat postfix_restrict_tpmail.cf
check_recipient_access hash:/opt/zimbra/conf/tpmail_recipients, reject
$ cat tpmail_recipients
$ cat tpmail_senders
$ zmmtactl restart
So, I've setup a second domain on my zimbra test box, when sending email from firstname.lastname@example.org to email@example.com I get the message not send popup warning like its expected.
But when I send mail from firstname.lastname@example.org to email@example.com it just gets there, and it isnt blocked.
Mail inside mydomain.lan works just fine.
Any tips? Any other info I can provide?