Sorry for doubling the questions about this topic but there are so many and some are very confusing, some are still "old" format and some others does not match my case.
smtpd_restriction_classes = allowed allowed = permit smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/restricted_senders, reject smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, permit_sasl_authenticated, check_recipient_access hash:/etc/postfix/recipient_domains, reject_rbl_client zen.spamhaus.org, reject_rhsbl_helo dbl.spamhaus.org, reject_rhsbl_sender dbl.spamhaus.org
I have this code working but I can still send mails to email@example.com (some random users)
Apr 4 13:40:46 mail-server postfix/local: 0C1C5160030: to=<firstname.lastname@example.org>, relay=local, delay=0.23, delays=0.23/0/0/0, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail)
Apr 4 13:41:42 mail-server postfix/smtpd: NOQUEUE: reject: RCPT from mail-vk0-f52.google.com[188.8.131.52]: 550 5.1.1 <email@example.com>: Recipient address rejected: User unknown in local recipient table; from=<firstname.lastname@example.org> to=<email@example.com> proto=ESMTP helo=<mail-vk0-f52.google.com> Apr 4 13:41:42 mail-server postfix/smtpd: disconnect from mail-vk0-f52.google.com[184.108.40.206]
What I would like to achieve is that only 1 user of this email server (firstname.lastname@example.org) is able to send and receive emails, any other must be rejected almost instantly. And this user can only receive mails from a few users and "recipient_domains"
email@example.com allowed firstname.lastname@example.org allowed thisserveronly.net allowed
Please can anybody advice if my configuration's got errors or if I just miss something?