On 15/08/2024 14:42, Christopher Curzio via Exim-users wrote:
> Hey everyone. I'm having an issue that I can't figure out, and I've tried
> multiple variations of the config to no avail. I have two files in
> /etc/mail: reject_standard and reject_harsh. Both files contain a list of
> domain names. I'm trying to get exim to read these files and reject email
> if the sender's address is from one of the listed domains. None of what I
> have tried has worked.
I block individual addresses rather than entire domains - ours is a
small setup so it's not something I have to do a lot - and here's what I
have as part of the RCPT ACL. Blocked addresses are kept in a database
table.
# Reject altogether if the address is blacklisted for the recipient domain.
deny
message = The sender address has been black-listed: $sender_address
log_message = Send was blacklisted: $sender_address
condition = ${lookup pgsql{\
select 1 from blacklist_addresses \
where domain_name = '${quote_pgsql:$domain}' \
and bl_address = '${quote_pgsql:$sender_address}' \
}{true}{false}}
It's a virtual-domain setup, hence the test on $domain.
HTH,
Ray.
--
Raymond O'Donnell // Galway // Ireland
ray@???
--
## subscription configuration (requires account):
##
https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at
http://www.exim.org/
## Please use the Wiki with this list -
http://wiki.exim.org/