1

I want to use exim to send emails via my ISP's SMTP server. However, the Arch wiki is quite confusing (exim is much simpler on a Debian system). I followed instructions in the final section, modifying the SMTP address from mail.internode.on.net to my SMTP server, and modifying *@* $1@bullet.homenet.org Ffr to *@* $1@my_emaildomain.com Ffr. This worked when I was connected to the internet via my ISP.

However, to use this on my work network, I need to authenticate. I tried to follow the instructions listed for Gmail, while changing the url, but this failed with

authenticator iinet_route: cannot find authenticator driver "manualroute"

How can I set up exim for authentication? (FWIW I'm with iinet.)

EDIT

I realised I had been putting the "Gmail"-like settings in the wrong parts. I moved them around, and am no longer getting the error messages. However, exim now fails silently. I get no error message, but no mail is delivered.

Here are the changes I made to the factory default:

--- exim.conf.factory_default   2015-08-03 02:14:31.000000000 +1000
+++ exim.conf   2015-11-10 08:09:54.196287461 +1100
@@ -402,7 +402,7 @@

   # Deny unless the sender address can be verified.

-  require verify        = sender
+  #require verify        = sender

   # Accept if the message comes from one of the hosts for which we are an
   # outgoing relay. It is assumed that such hosts are most likely to be MUAs,
@@ -552,14 +552,19 @@
 # If the DNS lookup fails, no further routers are tried because of the no_more
 # setting, and consequently the address is unrouteable.

-dnslookup:
-  driver = dnslookup
-  domains = ! +local_domains
-  transport = remote_smtp
-  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
+#dnslookup:
+#  driver = dnslookup
+#  domains = ! +local_domains
+#  transport = remote_smtp
+#  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
 # if ipv6-enabled then instead use:
 # ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
-  no_more
+#  no_more
+
+iinet_route:
+  driver = manualroute
+  transport = iinet_relay
+  route_list = * mail.iinet.net.au


 # This alternative router can be used when you want to send all mail to a
@@ -735,6 +746,12 @@
 address_reply:
   driver = autoreply

+iinet_relay:
+  driver = smtp
+  port = 587
+  hosts_require_auth = <; $host_address
+  hosts_require_tls = <; $host_address
+


 ######################################################################
@@ -769,6 +786,7 @@
 # There are no rewriting specifications in this default configuration file.

 begin rewrite
+*@* test_exim_sender@mydomain.foo.com Ffr



@@ -821,6 +839,12 @@
 #  server_advertise_condition = ${if def:tls_in_cipher }


+iinet_login:
+  driver = plaintext
+  public_name = LOGIN
+  hide client_send = : smtp_account@iinet.net.au : PASSWORD_HERE
+
+
 ######################################################################
 #                   CONFIGURATION FOR local_scan()                   #
 ######################################################################

And here is my full configuration file.

EDIT 2

I also tried changing the port to 465, which also fails silently. (FWIW 587 works fine in msmtp.)

EDIT 3

Here is the information on a failed email, using exim -Mvl. The original attempt to send used echo body | /usr/bin/mail -s subject -r sender@mydomain.foo.com recipient@mydomain.foo.com

2015-11-10 11:53:39 Received from test_exim_sender@mydomain.foo.com U=sparhawk P=local S=428 id=20151110005339.ag4kfrHaJ%sender@mydomain.foo.com
2015-11-10 11:53:41 recipient@mydomain.foo.com R=iinet_route T=iinet_relay defer (-42): authentication required but authentication attempt(s) failed

EDIT 4

I ran the mail command again (as per edit 3), and got a slightly different error. I've also linked to the full output of exim -d+all -M messageID <ID>

$ sudo exim -Mvl 1ZwMHr-0008I4-92
2015-11-11 14:41:31 Received from eximsender@mydomain.foo.com U=lee P=local S=426 id=20151111034131.VRuQn__aN%sender@mydomain.foo.com
2015-11-11 14:41:31 recipient@mydomain.foo.com R=iinet_route T=iinet_relay defer (-53): retry time not reached for any host

Full debug output is here.

9
  • You probably mistyped somewhere, as manualroute is used in the routers part and not in the authentication part. Add the parts you have edited to the question.
    – wurtel
    Nov 9, 2015 at 10:53
  • @wurtel Ah, yes, I misinterpreted the wiki. I had put everything from the Gmail section at the end. I've updated the question.
    – Sparhawk
    Nov 10, 2015 at 0:21
  • Exim is an email server, why send emails via another email server?
    – markmnl
    Nov 10, 2015 at 1:29
  • @markmnl The rationale is in the first link of my question.
    – Sparhawk
    Nov 10, 2015 at 1:34
  • If you submit a message to exim, and it's not getting delivered, then it will still be in the queue; exim does not silently discard messages. Check the queue (exim bp` or simply mailq which should work), you can check the log for a given message ID by running exim -Mvl messageID. Or just check the exim mainlog / paniclog. That should give hints what's wrong.
    – wurtel
    Nov 10, 2015 at 8:54

1 Answer 1

1

According to the error you get, you have put the stanzas from the gmail example in the wiki in the wrong sections. The exim config is built up in distinct parts, in order:

  • main
    contains global definitions and settings
  • acl
  • routers
    how to handle an address; first hit is used so order is important
  • transports
    defines ways to disposing of a message, these are referenced from the routers above; order is not important
  • retry
    how often to retry delivery
  • rewrite
    changing addresses e.g. to map internal addresses to globally usable addresses
  • authenticators
    defines ways of authenticating; both as server and as client

The error message authenticator iinet_route: cannot find authenticator driver "manualroute" clearly indicates that you have put a router stanza in the authenticators section.

Put each stanza in the relevant section (i.e. the router definition after the line begin routers and before the line begin transports, taking order into account; etc.) and the error should go away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.