Port is choosen automagically by route_data.
--- a/exim4.conf Fri Dec 20 23:15:02 2013 +0100
+++ b/exim4.conf Fri Dec 20 23:39:18 2013 +0100
@@ -6,19 +6,24 @@
# in one place. This place is the "providers" file. The structure
# is simple. It consists of lines as in the example:
#
-# # sender |server[:port] |user|password
-# # -----------+---------------+----+---------
-# foo@bar.com foobar.com foo secret
-# *@bar.com bar.com/mx:smtp fuz secret2
-# * smtp.gmail.com xxx baz
+# # sender |servers[::port] |user|password
+# # -----------+-----------------+----+---------
+# foo@bar.com foobar.com foo secret
+# baz@bar.com a.com:b.com::25 foo sicrit
+# *@bar.com bar.com/mx:25 fuz secret2
+# * smtp.gmail.com xxx baz
+#
+# Note: the "servers::[port]" field is used as "route_data", thus all
+# rules for route_data apply (see spec.txt, 20.3).
+# - multiple servers are colon (:) separated
+# - you can use indirect lists by appending /mx
+# - you can specifiy a port number numerically (per default we use 587)
PROVIDERS = <your file name for the providers file here>
# some macros to ease the understanding
ADDRESS_DATA = ${sg{${lookup{$sender_address}lsearch*@{PROVIDERS}}}{\\s+}{\t}}
SMARTHOST = ${extract{1}{\t}{$address_data}}
-HOST = ${extract{1}{:}{SMARTHOST}}
-PORT = ${extract{2}{:}{SMARTHOST}{$value}{submission}}
USER = ${extract{2}{\t}{$address_data}}
PASS = ${extract{3}{\t}{$address_data}}
@@ -30,7 +35,7 @@
smarthost:
driver = manualroute
address_data = ADDRESS_DATA
- route_data = HOST
+ route_data = SMARTHOST
transport = smtp_auth
# in case you don't have a '*' line in your providers file
@@ -45,8 +50,8 @@
smtp_auth:
driver = smtp
+ port = submission
hosts_require_auth = *
- port = PORT
smtp:
driver = smtp
@@ -58,7 +63,6 @@
public_name = PLAIN
client_send = ^USER^PASS
-
login:
driver = plaintext
public_name = LOGIN