-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactivity_policy.puml
75 lines (69 loc) · 1.91 KB
/
activity_policy.puml
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
@startuml
title ExOTA-Milter security policy flow
start
:MTA connected;
:HDR: Collecting all relevant headers;
note left: From, Authentication-Results, X-MS-Exchange-CrossTenant-Id
:HDR: Recognising sender domain;
note left: Taken from RFC5322.From header and/or RFC5322.Resent-From header. RFC5321.mail (envelope) is NOT relevant!
:EOM: Looking up policy in backend;
note left: Based on RFC5322.from domain
if (Policy found?) then (yes)
if (Milter: x509 client CN checking enabled?) then (yes)
:Looking up x509 client CN;
note left: ENV[MILTER_X509_TRUSTED_CN]
if (Found trusted x509 client CN?) then (yes)
else (no)
:REJECT;
stop
endif
else (no)
endif
if (Milter: DKIM checking enabled?) then (yes)
if (Policy has DKIM checking enabled?) then (yes)
:Looking up trusted Authentication-Results headers;
note left: ENV[MILTER_TRUSTED_AUTHSERVID]
if (Found trusted DKIM AR-headers?) then (yes)
else (no)
:REJECT;
stop
endif
if (Milter: DKIM alignment checking enabled?) then (yes)
if (Policy has DKIM-alignment enabled?) then (yes)
:Checking if DKIM-signature is aligned;
note left: DKIM SDID must equal to RFC5322.from_domain!
if (Is DKIM aligned?) then (yes)
else (no)
:REJECT;
stop
endif
else (no)
endif
else (no)
endif
else (no)
endif
else (no)
endif
if (Milter: tenant-ID header checking enabled?) then (yes)
:Looking up tenant-id in policy;
if (Found trusted tenant-ID?) then (no)
:REJECT;
stop
else (yes)
endif
else (no)
endif
else (no)
:REJECT;
stop
endif
:Removing all X-ExOTA-Authentication-Results headers if present;
if (Milter: add header?) then (yes)
:Adding X-ExOTA-Authentication-Results header;
note left: ENV[MILTER_ADD_HEADER]
else (no)
endif
:CONTINUE;
stop
@enduml