# HG changeset patch # User Heiko Schlittermann (JUMPER) # Date 1426871287 -3600 # Node ID 9665201a64b579400afe10c448e34bbfd3d2942d # Parent 855b60db012909e08dfee671f953abbc19610039 [snapshot] almost done diff -r 855b60db0129 -r 9665201a64b5 clt2015.tex --- a/clt2015.tex Fri Mar 20 13:01:27 2015 +0100 +++ b/clt2015.tex Fri Mar 20 18:08:07 2015 +0100 @@ -46,10 +46,6 @@ \section{Beispiele} -% -- Example CallForward/CutThrough -% vielleicht gehört das nach die ACL geschoben, denn die braucht man, -% um das hier zu verstehen. -\input{frames/callforward.tex} % -- Example Emig \input{frames/emig.tex} % -- Example Smarthosts @@ -58,6 +54,12 @@ % -- ACL \input{frames/acl.tex} +% -- Example CallForward/CutThrough +\input{frames/callforward.tex} + +% -- Example Single Recipient +%\input{frames/single-recipient.tex} + % -- logging \input{frames/logging.tex} @@ -78,13 +80,13 @@ \item Header-Rewriting \verb=*@*.example.com $1@example.com Ff= \item Retry-Rules \verb=*.example.com rcpt_4xx F,2h,5m;G,2d,15m= \item SMTP-Authentifizierung (Client/Server) - \item Cut-Through-Routing, PRDR, DNSSEC, DANE, Enhanced Status Codes + \item PRDR (ok), DNSSEC (ok), DANE (ok), Enhanced Status Codes (??) \end{itemize} \end{frame} \begin{frame}[<+->][fragile]{DANKE} \begin{verbatim} -2014-05-12 12:32:26 [2858] 1WjPOs-0000k4-B5 Completed +2015-03-21 15:32:26 [2858] 1WjPOs-0000k4-B5 Completed \end{verbatim} \pause \vfill diff -r 855b60db0129 -r 9665201a64b5 dia/callout-cutthrough.dia --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dia/callout-cutthrough.dia Fri Mar 20 18:08:07 2015 +0100 @@ -0,0 +1,501 @@ + + + + + + + + + + + + + #A4# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #RCPT TO:<...> +DATA +... +.# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #EHLO ... +MAIL FROM:<...> +RCPT TO:<...> +DATA +... +. +# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #250 OK# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #MX# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #1# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #2# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #3# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #intern# + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 855b60db0129 -r 9665201a64b5 frames/acl.tex --- a/frames/acl.tex Fri Mar 20 13:01:27 2015 +0100 +++ b/frames/acl.tex Fri Mar 20 18:08:07 2015 +0100 @@ -1,5 +1,5 @@ \section{Access Control Lists} -\subsection{Konfiguration} +%\subsection{Konfiguration} \begin{frame}[<+->][fragile]{Acess Control Lists} Für jede Phase der SMTP-Kommunikation gibt es einen ACL-Block @@ -28,7 +28,7 @@ \end{small} \end{frame} -\subsection{Features} +%\subsection{Features} \begin{frame}[<+->][fragile]{Access Control Lists}{Features} Zugriff auf \textbf{alles}, was an Information verfügbar ist, u.a.: @@ -49,7 +49,8 @@ \end{frame} -\subsection{Beispiel ACL} +\section{Beispiel} +\subsection{„Vereinzler“} \begin{frame}[<+->][fragile]{Access Control Lists}{Beispiel} \begin{block}{Aufgabe} diff -r 855b60db0129 -r 9665201a64b5 frames/callforward.tex --- a/frames/callforward.tex Fri Mar 20 13:01:27 2015 +0100 +++ b/frames/callforward.tex Fri Mar 20 18:08:07 2015 +0100 @@ -1,4 +1,3 @@ -\subsection{EmiG} \begin{frame}[<+->][fragile]{Beispiel: Empfängerüberprüfung}{Callforward} \begin{block}{Aufgabenstellung} Exim sei MX und soll Nachrichten an einen internen Server weiterleiten, @@ -6,9 +5,9 @@ \end{block} \begin{block}{Lösung?} \begin{itemize} - \item Nutzerdatenbank duplizieren - \item Nutzerdatenbank (LDAP, AD, …) anzapfen? - \item Also: die Entscheidung an den internen MTA zu delegieren. + \item Nutzerdatenbank duplizieren + \item Nutzerdatenbank (LDAP, AD, …) anzapfen? + \item Also: die Entscheidung an den internen MTA zu delegieren. \end{itemize} \end{block} \begin{block}{Lösung!} @@ -50,3 +49,27 @@ \scriptsize \ttinput{out/callout-not-ok.tt} \end{frame} + +\begin{frame}[<+->][fragile]{Beispiel: Empfängerüberprüfung}{Callforward + Cutthrough} +\begin{verbatim} +begin acl + + acl_check_recipient: + … + deny domains = +internal_domains + control = cutthrough_delivery + !verify = recipient/callout=use_sender,defer_ok + accept + +\end{verbatim} +\includegraphics[width=0.8\textwidth]{callout-cutthrough.eps} +\begin{itemize} + \item Delivery nach intern noch während der externen Session + \item Resultat DATA wird nach außen weitergegeben +\end{itemize} +\end{frame} + +\begin{frame}[<+->][fragile]{Test Callforward}{cutthrough} +\scriptsize +\ttinput{out/cutthrough.tt} +\end{frame} diff -r 855b60db0129 -r 9665201a64b5 frames/emig.tex --- a/frames/emig.tex Fri Mar 20 13:01:27 2015 +0100 +++ b/frames/emig.tex Fri Mar 20 18:08:07 2015 +0100 @@ -1,5 +1,5 @@ -\subsection{EmiG} -\begin{frame}[<+->][fragile]{Beispiel: DANE für Arme}{Emig} +\subsection{DANE für Arme} +\begin{frame}[<+->][fragile]{Beispiel: DANE für Arme}{} \begin{block}{Aufgabenstellung} Es existiere ein JSON-File (\verb=mxinfra.json=), in dem je MX-Host die SSL-Zertifikatsinformation liegt. Nun soll Exim, wenn er sich mit einem diff -r 855b60db0129 -r 9665201a64b5 frames/konfiguration.tex --- a/frames/konfiguration.tex Fri Mar 20 13:01:27 2015 +0100 +++ b/frames/konfiguration.tex Fri Mar 20 18:08:07 2015 +0100 @@ -1,6 +1,6 @@ % konfiguration \section{Konfiguration} -\subsection{File} +%\subsection{File} \begin{frame}[<+->][fragile]{Konfiguration}{File} \begin{itemize} @@ -14,7 +14,7 @@ \end{itemize} \end{frame} -\subsection{Struktur} +%\subsection{Struktur} \begin{frame}[<+->][fragile]{Konfiguration}{Struktur} Strukturiertes Konfigurationsfile mit mehreren Abschnitten, teilweise @@ -42,7 +42,7 @@ \end{description} \end{frame} -\subsection{Syntax} +%\subsection{Syntax} \begin{frame}[fragile]{Konfiguration}{Syntax} \begin{block}{Macros, Kommentar, lange Zeilen} @@ -66,7 +66,7 @@ allen Spielarten. \end{frame} -\subsection{String-Expansion} +%\subsection{String-Expansion} \begin{frame}[<+->][fragile]{Konfiguration}{Expansion} Etwa die Hälfte der Konfigurationsdirektiven erlaubt Variablensubstitution (Expansion) diff -r 855b60db0129 -r 9665201a64b5 frames/routing.tex --- a/frames/routing.tex Fri Mar 20 13:01:27 2015 +0100 +++ b/frames/routing.tex Fri Mar 20 18:08:07 2015 +0100 @@ -1,5 +1,5 @@ \section{Routing} -\subsection{Ablauf und Konfiguration} +%\subsection{Ablauf und Konfiguration} \begin{frame}[<+->][fragile]{Routing}{Allgemein} \begin{itemize} @@ -38,7 +38,7 @@ \end{description} \end{frame} -\subsection{Test} +%\subsection{Test} \begin{frame}[fragile]{Routing}{Test} \begin{alltt} diff -r 855b60db0129 -r 9665201a64b5 frames/single-recipient.tex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/frames/single-recipient.tex Fri Mar 20 18:08:07 2015 +0100 @@ -0,0 +1,37 @@ +\begin{frame}[<+->][fragile]{Beispiel: Alle Empfänger in der selben Domain}{} +\begin{block}{Aufgabenstellung} +Aus diversen Gründen (Spam-Policy per Domain, …) sollen nur weitere +Empfänger akteptiert werden, wenn diese zur selben Domain gehören wie +der erste Empfänger +\end{block} +\begin{block}{Lösung in ACL} +\begin{itemize} + \item erster Empfänger wird aktzeptert, Domain wird „gemerkt“: + ACL-Variable + \item weitere Empfänger werden gegen diese „gemerkte“ Domain + geprüft +\end{itemize} +\end{block} + +\begin{block}{ACL Konfiguration} +\begin{verbatim} +begin acl + … + acl_check_rcpt: + … + defer condition = ${if >={$recipients_count}{1}} + domains = !$acl_c_domain + message = same domain as 1st rcpt please ($acl_c_domain) + + accept verify = recipient + set acl_c_domain = $domain + + deny message = sorry +\end{verbatim} +\end{block} +\end{frame} + +\begin{frame}[<+->][fragile]{Test Callforward}{existierender Empfänger} +\scriptsize +\ttinput{out/callout-ok.tt} +\end{frame} diff -r 855b60db0129 -r 9665201a64b5 frames/smart.tex --- a/frames/smart.tex Fri Mar 20 13:01:27 2015 +0100 +++ b/frames/smart.tex Fri Mar 20 18:08:07 2015 +0100 @@ -1,6 +1,6 @@ -\subsection{Viele Smarthosts} +\subsection{Source based Routing} -\begin{frame}[<+->][fragile]{Beispiel: Source based Routing}{Viele Smarthosts - Vorversuche} +\begin{frame}[<+->][fragile]{Beispiel: Source based Routing}{Vorversuche} \begin{block}{Aufgabe} Wir haben mehrere Smarthosts und müssen je nach Sender-Adresse über einen anderen Smarthost versenden. diff -r 855b60db0129 -r 9665201a64b5 out/cutthrough.tt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/out/cutthrough.tt Fri Mar 20 18:08:07 2015 +0100 @@ -0,0 +1,33 @@ +swaks --attach eicar.com -f hs@schlittermann.de -t hs@schlittermann.de --pipe 'exim -bhc 8.8.4.4' +=== Trying pipe to exim -bhc 8.8.4.4... +<- **** SMTP testing session as if from host 8.8.4.4 +<- **** This is not for real! +<- 220 hs12.schlittermann.de ESMTP Exim 4.85_RC1-53-a466d09-XX Fri, 20 Mar 2015 14:04:10 +0100 +… +>>> using ACL "acl_check_rcpt" +>>> check control = cutthrough_delivery +>>> check !verify = recipient/callout=use_sender,defer_ok +>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +>>> routing hs@schlittermann.de +… +>>> SMTP>> EHLO hs12.schlittermann.de +>>> SMTP<< 250-ssl.schlittermann.de Hello hs12.schlittermann.de [84.19.194.10] +>>> SMTP>> MAIL FROM: +>>> SMTP<< 250 OK +>>> SMTP>> RCPT TO: +>>> SMTP<< 250 Accepted + -> DATA +>>> processing "accept" + … + -> WDVPIVAlQEFQWzRcUFpYNTQoUF4pN0NDKTd9JEVJQ0FSLVNUQU5EQVJELUFOVElWSVJVUy1URVNU + -> LUZJTEUhJEgrSCogCg== +>>> SMTP>> . +>>> SMTP<< 550-Classified by clamav as malware (Eicar-Test-Signature). +>>> 550-Server time: Fri, 20 Mar 2015 14:04:14 +0100 +>>> 550 Server spool id: 1YYwaz-0007uU-UZ +>>> SMTP>> QUIT +>>> ----------- cutthrough shutdown (target timeout on read) ------------ +<** 550-Classified by clamav as malware (Eicar-Test-Signature). +<** 550-Server time: Fri, 20 Mar 2015 14:04:14 +0100 +<** 550 Server spool id: 1YYwaz-0007uU-UZ + -> QUIT