Score:1

Reject emails from a subdomain in Exim4

bf flag
Tom

Is it possible in Exim4 to reject emails sent to a subdomain, eg sub.example.com?

A user has started a loop that is sending too many emails to the server, which generates the error "refused: too many connections".

Or is it possible to temporarily reject for a specific email address, eg [email protected]?

Score:0
by flag

Yes you can do that with the ACL rule file, located /etc/exim4/exim4.conf.template or /etc/exim4.conf

Here would be your ACL rule file:

acl_check_rcpt:
  ...
  # Reject all mail to sub.example.com
  deny domain       = *.sub.example.com
       message      = This subdomain is not accepting email.

and if you want to reject a specific mail address:

acl_check_rcpt:
  ...
  # Reject mail for [email protected]
  deny local_parts  = new-task
       domain       = sub.example.com
       message      = This email address is not accepting email.
  ...

then restart sudo service exim4 restart

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.