exim4.conf
changeset 11 ed76ddec8658
parent 10 d62e15c7bccf
equal deleted inserted replaced
10:d62e15c7bccf 11:ed76ddec8658
     1 # this is by no way a complete configuration file!
       
     2 # it's just intended as a starting point
       
     3 # source: hg clone https://ssl.schlittermann.de/hg/exim-smart-config
       
     4 
       
     5 # The smarthosts file
       
     6 # -------------------
       
     7 # All relevant information about the smarthosts is stored
       
     8 # in one place. This place is the "smarthosts" file. The structure
       
     9 # is simple. It consists of lines as in the example:
       
    10 #
       
    11 # # sender     |servers[::port]  |user|password
       
    12 # # -----------+-----------------+----+---------
       
    13 # foo@bar.com	foobar.com       foo  secret
       
    14 # baz@bar.com   a.com:b.com::25  foo  sicrit
       
    15 # *@bar.com     bar.com/mx:25    fuz  secret2
       
    16 # *		smtp.gmail.com   xxx  baz
       
    17 #
       
    18 # Note: the "servers::[port]" field is used as "route_data", thus all
       
    19 # rules for route_data apply (see spec.txt, 20.3). 
       
    20 # - multiple servers are colon (:) separated
       
    21 # - you can use indirect lists by appending /mx
       
    22 # - you can specifiy a port number numerically (per default we use 587)
       
    23 
       
    24 SMARTHOSTS = /home/heiko/l/exim/smart-config/smarthosts.example
       
    25 
       
    26 # some macros to ease the understanding
       
    27 ADDRESS_DATA = ${lookup{$sender_address}lsearch*@{SMARTHOSTS}{${sg{$value}{\\s+}{\t}}}}
       
    28 SMARTHOST    = ${extract{1}{\t}{$address_data}}
       
    29 USER         = ${extract{2}{\t}{$address_data}}
       
    30 PASS         = ${extract{3}{\t}{$address_data}}
       
    31 
       
    32 domainlist local_domains = @
       
    33 
       
    34 begin router
       
    35 
       
    36 # the first router routes according the sender_address
       
    37 smarthosts:
       
    38 	driver = manualroute
       
    39 	address_data = ADDRESS_DATA
       
    40 	route_data = SMARTHOST
       
    41 	transport = smtpa
       
    42 
       
    43 # in case you don't have a '*' line in your smarthosts file
       
    44 
       
    45 dnslookup:
       
    46 	driver = dnslookup
       
    47 	domains = !+local_domains
       
    48 	transport = smtp
       
    49 	no_more
       
    50 
       
    51 begin transport
       
    52 
       
    53 smtpa:
       
    54 	driver = smtp
       
    55 	port = submission
       
    56 	hosts_require_auth = *
       
    57 
       
    58 smtp:
       
    59 	driver = smtp
       
    60 
       
    61 begin authenticators
       
    62 
       
    63 plain:
       
    64 	driver = plaintext
       
    65 	public_name = PLAIN
       
    66 	client_send = ^USER^PASS
       
    67 	
       
    68 login:
       
    69 	driver = plaintext
       
    70 	public_name = LOGIN	
       
    71 	client_send = :USER:PASS