-
Notifications
You must be signed in to change notification settings - Fork 2
/
server.json5
105 lines (82 loc) · 2.44 KB
/
server.json5
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
{
// Hostname to declare in welcome message.
hostname: "example.com",
// Interface the server will bind too (default: ::).
bind: "::",
// Port the server will listen too (default: 25).
port: 25,
// Number of connections to be allowed in the backlog (default: 25).
backlog: 25,
// Maximum number of SMTP transactions to process ofver a connection.
transactionsLimit: 200,
// Number of SMTP errors to allow before terminating connection (default: 3).
errorLimit: 3,
// Advertise AUTH support (default: true).
auth: true,
// Advertise STARTTLS support (default: true).
starttls: true,
// Advertise CHUNKING support (default: true).
chunking: true,
// Java keystore (default: /usr/local/keystore.jks).
keystore: "/usr/local/keystore",
// Keystore password.
keystorepassword: "avengers",
// Email storage configuration.
storage: {
enabled: true,
// Path to storage folder.
path: "/usr/local/store",
// Auto clean storage on service start.
clean: true,
// Auto clean delete matching filenames only.
patterns: [
"^([0-9]{8}\\.)"
]
},
// Users allowed to authorize to the server.
users: [
{
name: "[email protected]",
pass: "giveHerTheRing"
}
],
// Predefined server response scenarios based on EHLO value.
scenarios: {
// Default scenario to use if no others match.
"*": {
rcpt: [
// Custom response for addresses matching value regex.
{
value: "friday\\-[0-9]+@example\\.com",
response: "252 I think I know this user"
}
]
},
// How to reject mail at different commands.
"reject.com": {
// Custom response for EHLO.
ehlo: "501 Not talking to you",
// Custom response for MAIL.
mail: "451 I'm not listening to you",
// Custom response for given recipients.
rcpt: [
{
value: "ultron@reject\\.com",
response: "501 Heart not found"
}
],
// Custom response for DATA.
data: "554 Your data is corrupted"
},
// How to configure TLS for failure using a deprecated version and weak cipher.
"failtls.com" : {
// Custom response for STARTTLS.
// STARTTLS also supports a list of protocols and ciphers to use handshake.
starttls: {
response: "220 You will fail",
protocols: ["TLSv1.0"],
ciphers: ["TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"]
}
}
}
}