# HG changeset patch # User Heiko Schlittermann (JUMPER) # Date 1399456457 -7200 # Node ID 53887d94881e27caa8687a5ffb3410d4c3515968 # Parent 5c175e3d9aa629cd1de7127e420f1ca82fbffe6a [snapshot] diff -r 5c175e3d9aa6 -r 53887d94881e Makefile --- a/Makefile Tue May 06 18:41:42 2014 +0200 +++ b/Makefile Wed May 07 11:54:17 2014 +0200 @@ -1,5 +1,7 @@ IMAGES = procs.pdf routing.pdf ALL = mk2014.pdf +TT = $(wildcard *.tt) +CONF = $(wildcard *.conf) .PHONY: clean all: $(ALL) @@ -7,10 +9,10 @@ rubber -d --clean mk2014.tex -rm -f *.vrb $(IMAGES) -mk2014.pdf: $(IMAGES) $(wildcard *.conf) +mk2014.pdf: mk2014.tex $(IMAGES) $(TT) $(CONF) %.pdf: %.tex - rubber -d $< + rubber -f -d $< %.pdf: %.dia dia --export $@ $< diff -r 5c175e3d9aa6 -r 53887d94881e minimal.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/minimal.conf Wed May 07 11:54:17 2014 +0200 @@ -0,0 +1,29 @@ +ALIASES = /etc/aliases +domainlist local_domains = localhost : @[] + +begin routers + + remote: + driver = dnslookup + domains = !+local_domains + transport = remote_smtp + more = no + + alias: + driver = redirect + require_files = ALIASES + data = ${lookup{$local_part}lsearch{ALIASES}} + + mbox: + driver = accept + check_local_user + transport = mbox + +begin transports + + remote_smtp: + driver = smtp + + mbox: + driver = appendfile + file = /var/mail/$local_part diff -r 5c175e3d9aa6 -r 53887d94881e mk2014.tex --- a/mk2014.tex Tue May 06 18:41:42 2014 +0200 +++ b/mk2014.tex Wed May 07 11:54:17 2014 +0200 @@ -349,13 +349,12 @@ %\end{frame} % -\section{Router} +\section{Routing} \begin{frame}[fragile]{Routing}{Allgemein} \begin{itemize} \item Router entscheiden über den Fortgang der Bearbeitung -\item Router werden in sequentiell „gefragt“, wenn die Vorbedingungen - erfüllt sind (\verb=domains=, \verb=local_parts=, …) +\item Vorbedingungen entscheiden, ob der Router „befragt“ wird \item Router liefern für eine gegebene Adresse \begin{description} \item[accept] Zuordnung zu Transport oder erzeugung neuer Adressen @@ -366,24 +365,59 @@ \item[error] Panik \end{description} \item werden auch von ACL genutzt (Adressüberpüfung) +\item einfache Tests sind möglich mit \verb=exim -bt= (Adresstest - + Routing) bzw. \verb=exim -bv= (Adressüberprüfung - ACL) \end{itemize} +\end{frame} -\begin{exampleblock}{Router-Test} +\begin{frame}[fragile]{Routing}{Test} \begin{verbatim} - $ exim -bt info@example.com - info@example.com - router = dnslookup, transport = smtp - host example.com [93.184.216.119] + $ exim -bt hans@example.com + hans@example.com + router = remote, transport = remote_smtp + host example.com [2606:2800:220:6d:26bf:1447:1097:aa7] + host example.com [93.184.216.119] + + $ exim -bt hans@localhost + hans@example.com + <-- hans@localhost + router = remote, transport = remote_smtp + host example.com [2606:2800:220:6d:26bf:1447:1097:aa7] + host example.com [93.184.216.119] + + $ exim -bt heiko@localhost + heiko@localhost + router = mbox, transport = local_mbox \end{verbatim} -\end{exampleblock} +\end{frame} + +\begin{frame}[fragile]{Routing}{Konfiguration} +\verbatiminput{routers.conf} \end{frame} \begin{frame}{Routing}{Schema} \includegraphics[width=0.8\textwidth,angle=270]{routing} \end{frame} -\begin{frame}[fragile]{Routing}{Konfiguration} -\verbatiminput{routers.conf} +\begin{frame}[fragile]{Routing}{Remote} +\scriptsize +\begin{alltt} +\input{routingremote.tt} +\end{alltt} +\end{frame} + +\begin{frame}[fragile]{Routing}{Alias} +\scriptsize +\begin{alltt} +\input{routingalias.tt} +\end{alltt} +\end{frame} + +\begin{frame}[fragile]{Routing}{Local} +\scriptsize +\begin{alltt} +\input{routinglocal.tt} +\end{alltt} \end{frame} % diff -r 5c175e3d9aa6 -r 53887d94881e routers.conf --- a/routers.conf Tue May 06 18:41:42 2014 +0200 +++ b/routers.conf Wed May 07 11:54:17 2014 +0200 @@ -1,18 +1,20 @@ +ALIASES = /etc/aliases +domainlist local_domains = localhost : @[] + begin routers - remote: - driver = dnslookup - domains = !+local_domains - transport = remote_smtp - more = no - redirect: - driver = redirect - require_files = /etc/vmail/$domain/aliases - data = ${lookup{$local_part}lsearch{/etc/vmail/$domain/aliases}} + remote: + driver = dnslookup + domains = !+local_domains + transport = remote_smtp + more = no - vmail: - driver = accept - condition = ${lookup{$local_part@$domain}\ - lsearch{/etc/vmail/passwd}\ - {yes}{no}} - transport = dovecot + alias: + driver = redirect + require_files = ALIASES + data = ${lookup{$local_part}lsearch{ALIASES}} + + mbox: + driver = accept + check_local_user = yes + transport = local_mbox diff -r 5c175e3d9aa6 -r 53887d94881e routing.dia --- a/routing.dia Tue May 06 18:41:42 2014 +0200 +++ b/routing.dia Wed May 07 11:54:17 2014 +0200 @@ -65,13 +65,13 @@ - + - + - + @@ -94,7 +94,7 @@ - #router a# + #remote# @@ -103,7 +103,7 @@ - + @@ -116,10 +116,10 @@ - + - + @@ -133,7 +133,7 @@ - + @@ -152,10 +152,10 @@ - + - + @@ -169,7 +169,7 @@ - + @@ -188,13 +188,13 @@ - + - + - + @@ -217,7 +217,7 @@ - #router b# + #alias# @@ -226,7 +226,7 @@ - + @@ -239,10 +239,10 @@ - + - + @@ -256,7 +256,7 @@ - + @@ -275,10 +275,10 @@ - + - + @@ -292,7 +292,7 @@ - + @@ -311,13 +311,13 @@ - + - + - + @@ -340,7 +340,7 @@ - #router c# + #mbox# @@ -349,7 +349,7 @@ - + @@ -362,19 +362,19 @@ - + - + - + - + - + @@ -391,7 +391,7 @@ - #?# + #domains?# @@ -400,7 +400,7 @@ - + @@ -413,70 +413,19 @@ - + - + - + - + - - - - - - - - - - - - - - - - - - #?# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -493,7 +442,7 @@ - #?# + #local_user?# @@ -502,7 +451,7 @@ - + @@ -513,12 +462,12 @@ - + - + - + @@ -532,7 +481,7 @@ - + @@ -546,16 +495,16 @@ - + - + - + - - + + @@ -566,6 +515,9 @@ + + + @@ -580,16 +532,16 @@ - + - + - + - - + + @@ -600,6 +552,9 @@ + + + @@ -610,20 +565,20 @@ - + - + - + - + - - + + @@ -634,6 +589,9 @@ + + + @@ -644,20 +602,20 @@ - + - + - + - + - - + + @@ -679,19 +637,19 @@ - + - + - + - + - - + + @@ -712,135 +670,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -864,16 +706,16 @@ - + - + - + - - + + @@ -897,16 +739,16 @@ - + - + - + - - + + @@ -930,16 +772,16 @@ - + - + - + - - + + @@ -960,20 +802,21 @@ - + - + - + - + - #done# + #accept +N: hans@example.com# @@ -982,13 +825,13 @@ - + - + @@ -996,17 +839,18 @@ - + - + - + - #done# + #accept +T: dovecot# @@ -1015,13 +859,13 @@ - + - + @@ -1029,40 +873,7 @@ - - - - - - - - - - - #done# - - - - - - - - - - - - - - - - - - - - - - - + @@ -1095,12 +906,12 @@ - + - + @@ -1114,7 +925,40 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + @@ -1128,5 +972,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #accept +T: remote_smtp# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # file? # + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 5c175e3d9aa6 -r 53887d94881e routingalias.tt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/routingalias.tt Wed May 07 11:54:17 2014 +0200 @@ -0,0 +1,30 @@ +$ exim -d-all+route -bt hans@localhost +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +routing hans@localhost +--------> remote router <-------- +local_part=hans domain=localhost +checking domains +remote router skipped: domains mismatch +--------> alias router <-------- +local_part=hans domain=localhost +checking require_files +file check: /etc/aliases +stat() yielded 0 +calling alias router +rda_interpret (string): $\{lookup\{$local_part\}lsearch\{/etc/aliases\}\} +expanded: hans@example.com +extract item: hans@example.com +alias router generated hans@example.com +routed by alias router + envelope to: hans@localhost + transport: +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +routing hans@example.com +--------> remote router <-------- +… +>>>>>>>>>>>>>>>> Exim pid=9381 terminating with rc=0 >>>>>>>>>>>>>>>> +hans@example.com + <-- hans@localhost + router = remote, transport = remote_smtp + host example.com [2606:2800:220:6d:26bf:1447:1097:aa7] + host example.com [93.184.216.119] diff -r 5c175e3d9aa6 -r 53887d94881e routinglocal.tt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/routinglocal.tt Wed May 07 11:54:17 2014 +0200 @@ -0,0 +1,26 @@ +$ exim -d-all+route -bt heiko@localhost +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +routing heiko@localhost +--------> remote router <-------- +local_part=heiko domain=localhost +checking domains +remote router skipped: domains mismatch +--------> alias router <-------- +local_part=heiko domain=localhost +checking require_files +… +rda_interpret (string): $\{lookup\{$local_part\}lsearch\{/etc/aliases\}\} +expanded: +alias router declined for heiko@localhost +--------> mbox router <-------- +local_part=heiko domain=localhost +checking for local user +calling mbox router +mbox router called for heiko@localhost +set transport local_mbox +queued for local_mbox transport: local_part = heiko +domain = localhost +routed by mbox router +>>>>>>>>>>>>>>>> Exim pid=9909 terminating with rc=0 >>>>>>>>>>>>>>>> +heiko@localhost + router = mbox, transport = local_mbox diff -r 5c175e3d9aa6 -r 53887d94881e routingremote.tt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/routingremote.tt Wed May 07 11:54:17 2014 +0200 @@ -0,0 +1,24 @@ +$ exim -d-all+route -bt hans@example.com +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +routing hans@example.com +--------> remote router <-------- +local_part=hans domain=example.com +checking domains +calling remote router +remote router called for hans@example.com + domain = example.com +set transport remote_smtp +queued for remote_smtp transport: local_part = hans +domain = example.com + errors_to=NULL + domain_data=NULL localpart_data=NULL +routed by remote router + envelope to: hans@example.com + transport: remote_smtp + host example.com [2606:2800:220:6d:26bf:1447:1097:aa7] + host example.com [93.184.216.119] +>>>>>>>>>>>>>>>> Exim pid=9434 terminating with rc=0 >>>>>>>>>>>>>>>> +hans@example.com + router = remote, transport = remote_smtp + host example.com [2606:2800:220:6d:26bf:1447:1097:aa7] + host example.com [93.184.216.119] diff -r 5c175e3d9aa6 -r 53887d94881e transports.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/transports.conf Wed May 07 11:54:17 2014 +0200 @@ -0,0 +1,8 @@ +begin transports + + remote_smtp: + driver = smtp + + local_mbox: + driver = appendfile + file = /var/mail/$local_part