Ban/block an email address

Yes. Edit the file /etc/exim4/exim4.conf.template and:

  1. add the following code just above the accept statement of the acl_check_rcpt: block
        # CUSTOM ADDED ACL
	deny senders	= /etc/exim4/[FILENAME]
	message		= You have been blacklisted for sending SPAM.
        # END

Replace [FILENAME] with a file that you will need to create, which will contain the email address(es) to block, or the whole domain(s).

  1. Restart the exim service systemctl restart exim4.service

Feel free to put whatever you want in the comments (lines starting with #)

2 Likes