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 need to configure Exim to require TLS when sending emails to a specific domain.

I know that I can use

 hosts_require_tls = host

in the smtp transport. But it sounds like that requires that I set the host of the receiving mail server. I would instead like to specify the domain.

Also, if I use this, will all other hosts/domains work without TLS? Just want to confirm before I implement.


share|improve this question
up vote 2 down vote accepted

you can use the recipient ACL and use the encrypted condition, see here.

    domains =
    ! encrypted = *


To force sending encrypted mail to some domains, you can create a "required tls" transport (specifying host_require_tls), and then create a router for the domains you want, e.g (untested):

begin router

    driver = accept
    domains =
    transport = tls_smtp

begin transport

    driver = smtp
    hosts_require_tls = * 
share|improve this answer
I am looking to force TLS when sending emails from my server. – mhost Apr 16 '10 at 17:39

hosts_require_tls can be a list or wild card such as * : the same as any other list.

Reverse configuration would be tls_hosts = * :

Documentation for exim is at Check host lists in chapter 7.

share|improve this answer

You use two Routers for remote delivery. The first has a domains = foo restriction, to apply only to your domain; most options are the same as the next Router, which handles normal remote delivery. But you also change the transport = ... option to transport = remote_smtp_tls.

You then copy the remote_smtp Transport, duplicating it; call the new copy remote_smtp_tls and in it set hosts_require_tls = *

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.