I am running Sendmail 8.15.2 on Fedora 30 with a MX relaying to a mail server.
The relay-domains file works fine to funnel only the desired domains from the MX to the mail server. But the mail server has to reject oodles of wrong users.
I would like to do the rejecting at the MX server instead.
I saw hints of this possibility on the Internet but cannot seem to get it to work. I have tried numerous formats of the access table and none seem to work. I have also tried clearing out the relay-domains and only relying on the access table.
Access table (there are many users; I am only showing one for brevity):
Connect:localhost.localdomain RELAY Connect:localhost RELAY Connect:127.0.0.1 RELAY ClientRate:127.0.0.1 0 ClientRate:3 To:firstname.lastname@example.org RELAY
I have also tried:
I have also tried adding at the bottom:
* REJECT *.* REJECT
I have also tried commenting these at the top:
Connect:localhost.localdomain RELAY Connect:localhost RELAY Connect:127.0.0.1 RELAY ClientRate:127.0.0.1 0
I have this in sendmail.mc to make use of the access db:
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
Am I missing something or is there another way to whitelist recipients at the MX level?