2

On a Debian Lenny server 'example.net', we have some cron jobs that need to send mail to '[email protected]'. 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 [email protected]
R: system_aliases for [email protected]
[email protected] 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?

2 Answers 2

3

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

dnslookup2:
  driver = dnslookup
  domains = example.net
  transport = remote_smtp
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  no_more

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 example.net 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.

1
  • 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 foo.example.net).
    – sbeam
    Dec 15, 2010 at 19:16
0

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

job-owner : [email protected]

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .