frames/smarthost.tex
changeset 12 e3ac4157aae4
equal deleted inserted replaced
11:3d9bb718ac1c 12:e3ac4157aae4
       
     1 \section{Beispiel}
       
     2 \subsection{Viele Smarthosts}
       
     3 
       
     4 \begin{frame}{Beispiel}{Smarthost}
       
     5 \begin{block}{Aufgabe}
       
     6 Wir haben mehrere Smarthosts und müssen je nach Sender-Adresse über
       
     7 einen anderen Smarthost versenden.
       
     8 \end{block}
       
     9 \begin{scriptsize}
       
    10 \verbatiminput{smart-config/smarthosts.example}
       
    11 \end{scriptsize}
       
    12 
       
    13 \begin{block}{Routing}
       
    14 Wir müssen beim Routing die Sender-Adresse als Kriterium
       
    15 verwenden, nicht die Zieladresse!
       
    16 \end{block}
       
    17 \end{frame}
       
    18 
       
    19 
       
    20 # some macros to ease the understanding
       
    21 ADDRESS_DATA = ${sg{${lookup{$sender_address}lsearch*@{SMARTHOSTS}}}{\\s+}{\t}}
       
    22 SMARTHOST    = ${extract{1}{\t}{$address_data}}
       
    23 USER         = ${extract{2}{\t}{$address_data}}
       
    24 PASS         = ${extract{3}{\t}{$address_data}}
       
    25 
       
    26 domainlist local_domains = @
       
    27 
       
    28 begin router
       
    29 
       
    30 # the first router routes according the sender_address
       
    31 smarthosts:
       
    32 	driver = manualroute
       
    33 	address_data = ADDRESS_DATA
       
    34 	route_data = SMARTHOST
       
    35 	transport = smtp_auth
       
    36 
       
    37 # in case you don't have a '*' line in your smarthosts file
       
    38 
       
    39 dnslookup:
       
    40 	driver = dnslookup
       
    41 	domains = !+local_domains
       
    42 	transport = smtp
       
    43 	no_more
       
    44 
       
    45 begin transport
       
    46 
       
    47 smtp_auth:
       
    48 	driver = smtp
       
    49 	port = submission
       
    50 	hosts_require_auth = *
       
    51 
       
    52 smtp:
       
    53 	driver = smtp
       
    54 
       
    55 begin authenticators
       
    56 
       
    57 plain:
       
    58 	driver = plaintext
       
    59 	public_name = PLAIN
       
    60 	client_send = ^USER^PASS
       
    61 	
       
    62 login:
       
    63 	driver = plaintext
       
    64 	public_name = LOGIN	
       
    65 	client_send = :USER:PASS