--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/frames/smart.tex Fri May 09 16:55:18 2014 +0200
@@ -0,0 +1,92 @@
+\subsection{Viele Smarthosts}
+
+\begin{frame}[<+->][fragile]{Beispiel}{Smarthost - Vorversuche}
+\begin{block}{Aufgabe}
+Wir haben mehrere Smarthosts und müssen je nach Sender-Adresse über
+einen anderen Smarthost versenden.
+\end{block}
+\begin{scriptsize}
+\verbatiminput{smart-config/smarthosts.example}
+\end{scriptsize}
+\begin{block}{Lösung}
+Wir müssen beim Routing die Sender-Adresse als Kriterium verwenden, nicht die Zieladresse!
+\begin{alltt}
+ $ exim -be\pause
+ > $\{lookup\{foo@example.org\}lsearch*@\{smarthosts\}\{$value\}\}
+ smtp.km21.com km433221 zecrit\pause
+ > $\{sg\{smtp.km21.com km433221 zecrit\}\{\BS\BS{}s+\}\{\BS{}t\}\}
+ smtp.km21.com km433221 secrit\pause
+ > $\{extract\{1\}\{\BS{}t\}\{smtp.km21.com km433221 secrit\}\}
+ smtp.km21.com\pause
+\pause
+\end{alltt}
+\end{block}
+\end{frame}
+
+\begin{frame}[<+->][fragile]{Beispiel}{Viele Smarthosts - Config}
+Das kann jetzt schön in Macros verpackt werden, damit es übersichtlich
+wird:
+\begin{verbatim}
+ ADDRESS_DATA = ${lookup{foo@example.org}\
+ lsearch*@{smarthosts}\
+ {${sg{$value}{\\s+}{\t}}}}
+ SMARTHOST = ${extract{1}{\t}{$address_data}}
+ USER = ${extract{2}{\t}{$address_data}}
+ PASS = ${extract{3}{\t}{$address_data}}
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[<+->][fragile]{Beispiel}{Viele Smarthosts - Config 2}
+\begin{small}
+\begin{verbatim}
+ begin routers
+
+ smarthosts:
+ driver = manualroute
+ address_data = ADDRESS_DATA
+ route_data = SMARTHOST
+ transport = smtpa
+ no_more
+
+ begin transports
+
+ smtpa:
+ driver = smtp
+ port = submission
+ hosts_require_auth = *
+
+ begin authenticators
+
+ plain:
+ driver = plaintext
+ public_name = PLAIN
+ client_send = ^USER^PASS
+\end{verbatim}
+\end{small}
+\end{frame}
+
+\begin{frame}[<+->][fragile]{Beispiel}{Viele Smarthosts - Test}
+Das Routing können wir wieder relativ einfach testen:
+\pause
+\begin{alltt}
+$ exim -f hans@example.com -t nobody@discworld.com
+nobody@discworld.com
+ router = smarthosts, transport = smtpa
+ host mx.freenet.de [2001:748:100:40::8:112] port=25
+ host mx.freenet.de [195.4.92.212] port=25
+\pause
+$ exim -f fred@example.com -t …
+nobody@nowhere
+ router = smarthosts, transport = smtpa
+ host ssl.schlittermann.de [212.80.235.130]
+\pause
+$ exim -f fred@foobar.com -t …
+nobody@nowhere
+ router = smarthosts, transport = smtpa
+ host smtp.km21.com [54.209.129.218]
+\end{alltt}
+
+Und natürlich haben wir die ganzen Debug-Optionen noch, für
+Expansion, DNS, …
+
+\end{frame}