Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

On a Debian Lenny server '', we have some cron jobs that need to send mail to ''. The MX for the domain is an offsite dedicated SMTP server. Exim is using the system-aliases router to find the local user, and not finding him:

$ exim -bt
R: system_aliases for is undeliverable: Unrouteable address

In /etc/aliases we have the normal redirect for system users to root, which I'd like to keep.

What is the best way to have exim send mail for users that aren't found locally to the SMTP host specified through dnslookup?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

So, after your localuser router, add a slightly modified copy of your dnslookup router:

  driver = dnslookup
  domains =
  transport = remote_smtp
  ignore_target_hosts = :

Note that "domains =" has been changed as has the name of the router.

FWIW it's an odd configuration to have the server in question think that is local if it's being handled as a local domain, with a different set of valid users, somewhere else. Not a wrong configuration necessarily, but odd enough to make my "you may have made a wrong choice before you got here" sense tingle.

share|improve this answer
I agree it's non-kosher, but the choice was made to have GoDaddy (!) host the SMTP service for the domain, and the server was given only the domain name as it's hostname (as opposed to – sbeam Dec 15 '10 at 19:16

The simplest solution for your problem is probably to put something like the following in your /etc/aliases:

job-owner :

A different and purer solution is for the local machine to route email only for itself (eg for server 'localserver', so that is routed correctly over DNS via the dnslookup router as suggested by jj33.

Your local server should not be resolving unless it is the main mail routing server for the domain.

share|improve this answer

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.