1

To catch mail send to any recipient I have added the following router directive in my exim4 configuration:

local_catchall:
 debug_print = "R: catchall for $local_part@$domain"
 driver = redirect
 domains = +local_domains
 allow_fail
 allow_defer
 data = johanna

How can I exclude some recipient addresses like it is possible with sender addresses per:

acl_check_data: 
 strong textdeny senders = /etc/deny_senders 
2

Use the condition router option and a single-key query like

condition = ${lookup {$local_part@$domain} lsearch {/etc/deny_recips} {0} {1}}

You could use the acl_smtp_rcpt instead, but note that it's for SMTP input only, extend if necessary:

deny recipients = /etc/deny_recips
| improve this answer | |
1

You can use this:

deny
  condition = ${lookup{$local_part}nwildlsearch{/path/to/black.list}{yes}{no}}                                                                          
  message = User is black listed. Go away. 

The advantage is that you can use regexp in the black.list file. The disadvantage is that you can user regexp in the black.list file. Therefore you need a lot of testing (via ecim -v -bt 1.2.3.4 …) to make sure your regexp is correct.

My file black.list looks like thus:

^Diana.*$
^Evelina.*$
^Julia.*$ 
^Katherin.*$
^Olga.*$
^Violette.*$
^fax$                                                                                                                                                   
^sales$

See this question if you are unfortunate enough to use Debian/Ubuntu…

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.