
我想要使用進出口銀行透過我的 ISP 的 SMTP 伺服器發送電子郵件。但是,那拱門維基相當令人困惑(exim 在 Debian 系統上要簡單得多)。我按照中的說明進行操作最後一節,將 SMTP 位址從 修改mail.internode.on.net
為我的 SMTP 伺服器,並修改為。當我透過 ISP 連接到互聯網時,此方法有效。*@* [email protected] Ffr
*@* $1@my_emaildomain.com Ffr
但是,要在我的工作網路上使用它,我需要進行身份驗證。我嘗試按照 Gmail 列出的說明進行操作,同時更改網址,但失敗了
authenticator iinet_route: cannot find authenticator driver "manualroute"
如何設定exim
身份驗證? (FWIW我和網際網路.)
編輯
我意識到我把類似「Gmail」的設定放在了錯誤的部分。我移動了它們,並且不再收到錯誤訊息。然而,exim
現在卻悄無聲息地失敗了。我沒有收到錯誤訊息,但沒有發送郵件。
以下是我對出廠預設值所做的更改:
--- 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
+*@* [email protected] Ffr
@@ -821,6 +839,12 @@
# server_advertise_condition = ${if def:tls_in_cipher }
+iinet_login:
+ driver = plaintext
+ public_name = LOGIN
+ hide client_send = : [email protected] : PASSWORD_HERE
+
+
######################################################################
# CONFIGURATION FOR local_scan() #
######################################################################
和這裡是我的完整設定檔。
編輯2
我還嘗試將連接埠更改為 465,這也失敗了。 (FWIW 587 在 msmtp 中工作正常。)
編輯3
以下是有關失敗電子郵件的信息,使用exim -Mvl
.最初嘗試發送使用echo body | /usr/bin/mail -s subject -r [email protected] [email protected]
2015-11-10 11:53:39 Received from [email protected] U=sparhawk P=local S=428 id=20151110005339.ag4kfrHaJ%[email protected]
2015-11-10 11:53:41 [email protected] R=iinet_route T=iinet_relay defer (-42): authentication required but authentication attempt(s) failed
編輯4
我再次運行 mail 命令(按照編輯 3),並得到了略有不同的錯誤。我還連結到了完整的輸出exim -d+all -M messageID <ID>
$ sudo exim -Mvl 1ZwMHr-0008I4-92
2015-11-11 14:41:31 Received from [email protected] U=lee P=local S=426 id=20151111034131.VRuQn__aN%[email protected]
2015-11-11 14:41:31 [email protected] R=iinet_route T=iinet_relay defer (-53): retry time not reached for any host
完整的調試輸出是這裡。
答案1
根據您收到的錯誤,您已將 wiki 中 gmail 範例中的節放在錯誤的部分中。 exim 配置由不同的部分組成,依序:
- 主要的
包含全域定義和設定 - 存取控制列表
- 路由器
如何處理地址;使用第一個命中,因此順序很重要 - 運輸
定義處理訊息的方法,這些是從上面的路由器引用的;順序並不重要 - 重試
重試投遞的頻率 - 改寫
更改位址,例如將內部位址對應到全域可用位址 - 驗證器
定義驗證方式;既作為伺服器又作為客戶端
此錯誤訊息authenticator iinet_route: cannot find authenticator driver "manualroute"
清楚地表示您已將路由器節放入驗證器部分。
將每個節放在相關部分中(即,路由器定義在該行之後begin routers
和該行之前begin transports
,考慮到順序;等等),錯誤就會消失。