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

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 have a dedicated server with exim on it. I also have a regular shared hosting account ("") on hostgator. I want to configure exim to always use hostgator's smtp server ("") for email delivery.

The problem is that hostgator's smtp server is obviously requiring authentication and it's on a different port (26). Since I do have legitimate account, I do have access credentials, but I don't know how to force exim to always use that SMTP server instead of trying to connect to the receipient's smtp server directly and where to specify those access credentials.

share|improve this question

As Daniel says, you need to configure exim as a smarthost. This means defining a router like this (N.B. the double colon separating the hostname and the port number):

  debug_print = "R: smarthost for $local_part@$domain"
  driver = manualroute
  domains = ! +local_domains
  transport = remote_smtp_smarthost
  route_list = *
  host_find_failed = defer

and then a transport that can prod exim into authentication:

  debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
  driver = smtp
  hosts_require_auth =

For a lot of distributions, you can now just put your host:username:password triplet into /etc/exim/passwd.client and this should just work.

I believe that instead of specifying the port in the router, you can use the port command in the transport. In theory, both should work.

share|improve this answer

It's been a while since I've done anything interested with exim configs, but I can give you some basic pointers. This will also depend on which version of exim you are running, and which distro as well (eg, debian has a meta-config configuration file, which abstracts a lot of this for you).

Basically, you'll want to configure exim with a smarthost, set to hostgator's SMTP server. (This used to be called a "router" in exim-talk, I think it still is).

The transport that your router is configured with will need to be told to use port 26, not port 25. (There is a "port" variable you can set)

You'll also need to setup exim client authentication (eg, check here for the bit on "Authentication by an exim client"

Sorry I can't be more specific than that, but hopefully this is enough to get you on your way.

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.