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.
manualroute
is used in the routers part and not in the authentication part. Add the parts you have edited to the question. – wurtel Nov 09 '15 at 10:53exim
bpor simply
mailqwhich 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 '15 at 08:54exim
)? I've edited the question with the new information. – Sparhawk Nov 10 '15 at 09:21exim -d+all -M messageID
, hopefully that will help determine why the auth fails. Note that these messages have a temporary failed status, they will be retried (if you have exim running with a-q
option, or have queue runs in cron). Upon a timeout or permanent error they will be returned to the envelope sender. – wurtel Nov 10 '15 at 10:07