Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using exim4 with a catchall router to forward mail to a java process. The java process users are the valid recipients. I'm trying to reduce the amount of spam routed to the java process by whitelisting the users in exim.

I have tried this in my config file:

acl_check_rcpt:

  deny message = invalid recipient
  domains = thedomain.com
  recipients = !/etc/exim4/recipients_whitelist

Along with about a billion other things. I have verified that if I rewrite the condition as just deny or deny recipients = foobar@thedomain.com the message is rejected but I cannot get the whitelisting approach to work. I have also tried inverting the logic to accept the whitelisted users but that does not work either.

Here is my router:

outer_catchall:
  driver = accept
  transport = dev_null_transport
share|improve this question

2 Answers 2

This works for me:

acl_check_rcpt:

  discard    
  !recipients = /etc/exim4/recipients_whitelist

The mail addresses of the allowed recipients are listed one per line in /etc/exim4/recipients_whitelist. This file is the whitelist.

Please note the exclamation mark before recipients.

share|improve this answer

If some recipients are white-listed and others denied - that's quite not a catch all. Use router like the one below and let the standard ACL recipient verification do the job.

outer_java:
  driver = accept
  domains = thedomain.com
  local_parts = /etc/exim4/java_local_parts
  transport = java_pipe
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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