Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to setup Exim with Amazon's SES. I've defined a router that catches all emails and sends them through SES. I don't want to filter anything for outboud. Everything goes through SES. My router config is the following:

begin routers

  debug_print = "R: aws_ses for $local_part@$domain"
  driver = accept
  transport = aws_ses_pipe

It's working great except for one problem. Whenever I get any inbound email, Exim also tries sending them through SES. That's the problem. Local emails should be caught by Exim. I tried adding this just before my aws_ses router but it's not working. Exim still uses the aws_ses router for inbound emails to

  driver = accept
  domains =
  transport = virtual_userdelivery

So, how do I make Exim send all outbound emails through aws_ses router but at the same time, tell it to catch all inbound mails to so that it can be delivered to the user's mailboxes?


p.s. You can see the complete configuration on the tutorial I've put together. The relevant configs are pasted in this question though.

share|improve this question
up vote 2 down vote accepted

Routers are tried in order. You should just have been able to find a Router named "dnslookup" or "smarthost" or somesuch, and put your new router there in its place. Completely replacing the list of Routers is not advisable unless you have a lot of Exim experience (and the same goes for the RCPT ACL).

You should have a domainlist called local_domains, which is a list of domains to be handled on this host itself. Then, your aws_ses Router would include a line:

domains = !+local_domains

With that pre-condition in place, mails sent to a domain in the local_domains domainlist will not be handled by the aws_ses Router.

Next: you talk about in the text but then use in your obfuscated example. An error like that would certainly explain what you're seeing. :)

Then: use something like:

$ exim -d -bt

to get some copious debugging output about the decisions Exim is making in deciding how to handle that address.

share|improve this answer
Hehe, thanks for pointing out the 'local' mistake. That crept in during the obfuscation. Didn't want to look like I was promoting a client's website or anything. Your solution works though. – recluze Aug 29 '11 at 4:02

Your Answer


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.