0

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:user@domain.com RELAY

I have also tried:

user@domain.com RELAY

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?

Dave M
  • 4,494
  • 21
  • 30
  • 30

1 Answers1

0

FEATURE(blacklist_recipients) is required to selectively reject envelope recipients in access table.

Sample access table entries:

# default for addresses in example.com domain
to:example.com  REJECT
# list of valid/relayed addresses in example.com
to:user1@example.com  RELAY
to:user2@example.com  RELAY

Possible alternative methods/ways:

  • virtusertable for non local email domains
  • FEATURE(ldpap_routing) - it can use standard sendmail maps instead of LDAP lookups
AnFi
  • 5,883
  • 1
  • 12
  • 26