Exim custom filter

izghitu

Verified User
Joined
Apr 15, 2007
Messages
10
Hi,

I am trying to add a custom Exim ACL that would check incoming messages and block them based on the FROM "Friendly Name" but I do not know where exactly I can add the custom ACL so it works and takes effect.

The ACL i want to add is this:
acl_check_data:
# Blacklist if friendly name matches any patterns.
drop
condition = ${if match{$h_from:}lsearch{/etc/virtual/blacklist_from}}
message = Blacklisted.
log_message = Blacklisted nasty.

I tried to add it to /etc/exim.acl_check_message.pre.conf but the result was that absolutely all messages were blocked.

Please advise
 
Hi,

When I put that there I get a bounce:
550 Administrative prohibition

And the exim mainlog says:
incomplete transaction (QUIT)

Is there perhaps something wrong with my ACL? Please advise
 
Hi,

When I put that there I get a bounce:
550 Administrative prohibition

And the exim mainlog says:
incomplete transaction (QUIT)

Is there perhaps something wrong with my ACL? Please advise
I wasn't thinking properly it seems. That would put you at the top of acl_check_recipient and you're using acl_check_data. You may have to create a custom exim.conf for that. If you want to follow how I do my custom exim.conf you're welcome to: https://github.com/mxroute/da_server_updates/blob/master/exim/update_exim.sh

When there's a new exim.conf update that I'm ready to use, I grab it and re-customize it to deploy in that repo.

Edit: Actually, try putting it in /etc/exim.acl_check_message.pre.conf. I forgot about this line in the config as I haven't been altering this section:

Code:
acl_smtp_data = acl_check_message

Just cut out the top "acl_check_data:" of your ACL of course, as that should already be defined right above the include for exim.acl_check_message.pre.conf as acl_check_message.
 
Last edited:
Back
Top