--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exim4.conf Fri Dec 20 17:28:48 2013 +0100
@@ -0,0 +1,65 @@
+# this is by no way a complete configuration file!
+# it's just intended as a starting point
+
+# The providers file
+# All relevant information about the smart providers is stored
+# 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
+
+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}{\x20\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}}
+
+domainlist local_domains = @
+
+begin router
+
+# the first router routes according the sender_address
+smarthost:
+ driver = manualroute
+ address_data = ADDRESS_DATA
+ route_data = HOST
+ transport = smtp_auth
+
+# in case you don't have a '*' line in your providers file
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = smtp
+ no_more
+
+begin transport
+
+smtp_auth:
+ driver = smtp
+ hosts_require_auth = *
+ port = PORT
+
+smtp:
+ driver = smtp
+
+begin authenticators
+
+plain:
+ driver = plaintext
+ public_name = PLAIN
+ client_send = ^USER^PASS
+
+
+login:
+ driver = plaintext
+ public_name = LOGIN
+ client_send = :USER:PASS