1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
|
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage{graphics}
\usepackage{listings}
\usepackage{xcolor}
%\usetheme{Meerkat}
\title{Héberger son e-mail}
\author{Vincent-Xavier Jumel}
\institute{Parinux}
\definecolor{darkgray}{rgb}{0.95,0.95,0.95}
\lstset{
numbers=none, % where to put the line-numbers
numberstyle=\footnotesize, % the size of the fonts that are used for the line-numbers
stepnumber=2,
backgroundcolor=\color{darkgray}, % choose the background color. You must add \usepackage{color}
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
showtabs=false, % show tabs within strings adding particular underscores
frame=single, % adds a frame around the code
tabsize=2, % sets default tabsize to 2 spaces
basicstyle={\footnotesize\ttfamily},
captionpos=b
}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\section{À la découverte du mail}
\subsection{Rappel sur le courrier}
\begin{frame}
\frametitle{Votre courrier comme vous l'avez toujours connu}
\begin{block}{Composition}
\begin{itemize}
\item Une enveloppe
\begin{itemize}
\item Une adresse
\item Une adresse de retour
\end{itemize}
\item Une lettre dans l'enveloppe
\item une éventuelle pièce jointe
\end{itemize}
\end{block}
\end{frame}
\subsection{De la distribution}
\begin{frame}
\frametitle{Comment distribuer du courrier}
\begin{block}{Qui distribue}
\begin{itemize}
\item Un tiers de confiance
\item tenu de respecter quelques principes
\end{itemize}
\end{block}
\end{frame}
\subsection{Et sur internet}
\begin{frame}
\frametitle{Un schéma}
\begin{center}
\includegraphics[width=.8\linewidth]{500px-SMTP-transfer-model.png}
\end{center}
\end{frame}
\section{On s'y met ?}
\subsection{Que faut-il ?}
\begin{frame}
\frametitle{On mets les mains dans le cambouis}
\begin{block}{Ce qu'il faut savoir}
\begin{itemize}
\item Utiliser un terminal ;
\item avoir une machine connectée à Internet ;
\item avoir envie.
\end{itemize}
\end{block}
\end{frame}
\subsection{Les logiciels}
\begin{frame}
\frametitle{Quels logiciels utilisent-on ?}
\begin{block}{Le nécessaire}
\begin{itemize}
\item un os sérieux ;
\item un MTA ;
\item un MDA ;
\end{itemize}
\end{block}
\begin{block}{L'indispensable}
\begin{itemize}
\item un annuaire ;
\item du web ;
\item des listes ;
\end{itemize}
\end{block}
\end{frame}
\section{Le MTA}
\subsection{Installation}
\begin{frame}[fragile]
\frametitle{Configuration}
\begin{block}{La configuration par défaut}
\lstset{caption={Configuration minimale}}
\begin{lstlisting}
myhostname = machine.example.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = example.net
mydestination = example.net
mynetworks = 127.0.0.0/8
[::ffff:127.0.0.0]/104
[::1]/128
mailbox_command =
mailbox_size_limit = 0
inet_interfaces = all
inet_protocols = all
\end{lstlisting}
\end{block}
\end{frame}
\begin{frame}
\frametitle{Tester sa configuration}
\begin{exampleblock}{Des tests basiques}
\begin{itemize}
\item Envoyer un mail avec la commande \verb!mail!
\item Lire les logs
\item Lire un mail
\item Envoyer un mail à l'extérieur
\end{itemize}
\end{exampleblock}
\end{frame}
\begin{frame}[fragile]
\frametitle{Envoyer des mails depuis le réseau local}
\begin{block}{Pourquoi ?}
\begin{itemize}
\item Utile pour les mails de robots et autre automates
\end{itemize}
\end{block}
\begin{exampleblock}{Une ligne à remplacer}
\lstset{caption={Réseaux autorisés}}
\begin{lstlisting}
mynetworks = 127.0.0.0/8
[::ffff:127.0.0.0]/104
[::1]/128
203.0.113.0/24
[2001:db8::]/32
\end{lstlisting}
\end{exampleblock}
\end{frame}
\subsection{Recevoir des mails}
\begin{frame}[fragile]
\frametitle{Recevoir des mails}
\begin{block}{Déclarer ses enregistrements MX}
\lstset{caption={Entrées DNS}}
\begin{lstlisting}
@ IN MX 10 machine
machine IN A 203.0.113.42
machine IN AAAA 2001:db8::dead:beef:42
\end{lstlisting}
\end{block}
\begin{exampleblock}{Testons}
\begin{itemize}
\item Tester depuis une adresse externe
\end{itemize}
\end{exampleblock}
\end{frame}
\subsection{Distribuer les mails}
\begin{frame}[fragile]
\frametitle{Distribuer les mails}
\begin{block}{Localement}
\lstset{caption={Utiliser un agent}}
\begin{lstlisting}
mailbox_command = /usr/libexec/dovecot
\end{lstlisting}
\end{block}
\begin{block}{À d'autres}
\lstset{caption={Les alias pour relayer}}
\begin{lstlisting}
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
\end{lstlisting}
\end{block}
\end{frame}
\begin{frame}
\frametitle{Un point sur la distribution «locale»}
\begin{block}{«Localement» avec IMAP}
\begin{itemize}
\item Des mails stockés de façon «raisonnable» ;
\item présentés en IMAP (ou en POP) ;
\item accessible partout simplement ;
\item permettra l'authentification par la suite.
\end{itemize}
\end{block}
\end{frame}
\subsection{Envoyer des mails} % depuis presque partout
\begin{frame}[fragile,allowframebreaks]
\frametitle{Envoyer des mails de partout}
\begin{block}{SMTP authentifié}
\begin{itemize}
\item Lien SASL avec le MDA
\end{itemize}
\lstset{caption={Dans postfix}}
\begin{lstlisting}
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
smtpd_sasl_authenticated_header = yes
smtpd_tls_auth_only = yes
\end{lstlisting}
\end{block}
\begin{block}{Partageons}
\lstset{caption={Dans dovecot}}
\begin{lstlisting}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
\end{lstlisting}
\end{block}
\end{frame}
\begin{frame}[fragile,allowframebreaks]
\frametitle{Quelques restrictions}
\begin{block}{Des restrictions génériques}
\begin{lstlisting}
smtpd_helo_required = yes
strict_rfc_envelopes = yes
\end{lstlisting}
\end{block}
\begin{block}{helo}
\lstset{caption={Restrictions sur helo}}
\begin{lstlisting}
smtpd_helo_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
check_helo_access hash:/etc/postfix/helo_restrictions,
reject_non_fqdn_hostname,
reject_invalid_hostname,
permit
\end{lstlisting}
\end{block}
\begin{block}{l'expéditeur}
\lstset{caption={Restrictions sur l'expéditeur}}
\begin{lstlisting}
smtpd_sender_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
check_helo_access hash:/etc/postfix/helo_restrictions,
reject_non_fqdn_hostname,
reject_unknown_sender_domain,
reject_unauth_pipelining,
reject_unauth_destination,
reject_unlisted_sender,
permit
\end{lstlisting}
\end{block}
\begin{block}{Se connecter}
\lstset{caption={Restrictions à la connexion}}
\begin{lstlisting}
smtpd_client_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
check_client_access hash:/etc/postfix/client_restrictions,
reject_rbl_client sbl-xbl.spamhaus.org,
permit
\end{lstlisting}
\end{block}
\begin{block}{On ne reçoit pas pour n'importe qui}
\lstset{caption={Restrictions sur le récipiendaire}}
\begin{lstlisting}
smtpd_recipient_restrictions =
check_recipient_access hash:/etc/postfix/local_part
reject_unauth_pipelining,
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
reject_unauth_destination,
reject_unlisted_recipient,
reject_rbl_client sbl-xbl.spamhaus.org,
check_policy_service unix:private/policyd-spf,
permit
\end{lstlisting}
%# check_policy_service unix:private/postgrey,
\end{block}
\end{frame}
\begin{frame}[allowframebreaks]
\frametitle{Plan de cette présentation}
\tableofcontents
%
% \item \lstlistoflistings
\end{frame}
\begin{frame}
\frametitle{Bibliographie}
%http://irp.nain-t.net/doku.php/200messagerie:start
\end{frame}
\end{document}
|