2

I am trying to configure Exim to reject any $local_part that match a pattern.

For example, I know that none of the local_parts for any of the myriad of domains I host will ever contains numbers. So, I know if someone send an email to [email protected], I know it is spam and can safely reject it.

What would be the best ACL for this?

0

2 Answers 2

2

ACL line could be the next:

deny condition = ${lookup{$localpart}nwildlsearch{/path/to/the/black.list}{yes}{no}}

While black.list contains PCRE regexes one per line like that:

^.*[0-9].*
^.*[!@#$%^&*()_+].*
^.*sales.*
1
  • If other solution allows to modify regex list without exim's restart - let me know. Commented Oct 10, 2014 at 10:21
1

Based off Kondybas's answer, an Ubuntu/Debian specific answer is to change the follow lines in /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs to read:

.ifndef CHECK_RCPT_LOCAL_LOCALPARTS                                             
CHECK_RCPT_LOCAL_LOCALPARTS = ^[.] : ^.*[@%!/|`#&?0-9]                          
.endif

Clearly this only works for adding [0-9] to the pattern. Other patterns might require Kondybas's solution.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.