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 root@thisserver.net (some random users)
Apr 4 13:40:46 mail-server postfix/local[22937]: 0C1C5160030: to=<root@thisserver.net>, relay=local, delay=0.23, delays=0.23/0/0/0, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail)
And "user@thisserver.net"
Apr 4 13:41:42 mail-server postfix/smtpd[22931]: NOQUEUE: reject: RCPT from mail-vk0-f52.google.com[209.85.213.52]: 550 5.1.1 <user@thisserver.net>: Recipient address rejected: User unknown in local recipient table; from=<someuser@randomserver.com> to=<user@thisserver.net> proto=ESMTP helo=<mail-vk0-f52.google.com>
Apr 4 13:41:42 mail-server postfix/smtpd[22931]: disconnect from mail-vk0-f52.google.com[209.85.213.52]
What I would like to achieve is that only 1 user of this email server (info@thisserver.net) 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"
restricted_senders:
info@thisserver.net allowed
recipient_domains:
info@google.com allowed
user35@server.com allowed
thisserveronly.net allowed
Please can anybody advice if my configuration's got errors or if I just miss something?