1sendmail_selinux(8) SELinux Policy sendmail sendmail_selinux(8)
2
3
4
6 sendmail_selinux - Security Enhanced Linux Policy for the sendmail pro‐
7 cesses
8
10 Security-Enhanced Linux secures the sendmail processes via flexible
11 mandatory access control.
12
13 The sendmail processes execute with the sendmail_t SELinux type. You
14 can check if you have these processes running by executing the ps com‐
15 mand with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep sendmail_t
20
21
22
24 The sendmail_t SELinux type can be entered via the mta_exec_type, send‐
25 mail_exec_t, mta_exec_type file types.
26
27 The default entrypoint paths for the sendmail_t domain are the follow‐
28 ing:
29
30 /usr/sbin/sendmail(.sendmail)?, /usr/bin/esmtp, /usr/sbin/rmail,
31 /usr/sbin/ssmtp, /usr/lib/sendmail, /usr/bin/esmtp-wrapper,
32 /var/qmail/bin/sendmail, /usr/sbin/sendmail.postfix
33
35 SELinux defines process types (domains) for each process running on the
36 system
37
38 You can see the context of a process using the -Z option to ps
39
40 Policy governs the access confined processes have to files. SELinux
41 sendmail policy is very flexible allowing users to setup their sendmail
42 processes in as secure a method as possible.
43
44 The following process types are defined for sendmail:
45
46 sendmail_t
47
48 Note: semanage permissive -a sendmail_t can be used to make the process
49 type sendmail_t permissive. SELinux does not deny access to permissive
50 process types, but the AVC (SELinux denials) messages are still gener‐
51 ated.
52
53
55 SELinux policy is customizable based on least access required. send‐
56 mail policy is extremely flexible and has several booleans that allow
57 you to manipulate the policy and run sendmail with the tightest access
58 possible.
59
60
61
62 If you want to allow users to resolve user passwd entries directly from
63 ldap rather then using a sssd server, you must turn on the authlo‐
64 gin_nsswitch_use_ldap boolean. Disabled by default.
65
66 setsebool -P authlogin_nsswitch_use_ldap 1
67
68
69
70 If you want to allow all domains to execute in fips_mode, you must turn
71 on the fips_mode boolean. Enabled by default.
72
73 setsebool -P fips_mode 1
74
75
76
77 If you want to allow confined applications to run with kerberos, you
78 must turn on the kerberos_enabled boolean. Enabled by default.
79
80 setsebool -P kerberos_enabled 1
81
82
83
84 If you want to allow system to run with NIS, you must turn on the
85 nis_enabled boolean. Disabled by default.
86
87 setsebool -P nis_enabled 1
88
89
90
91 If you want to allow confined applications to use nscd shared memory,
92 you must turn on the nscd_use_shm boolean. Enabled by default.
93
94 setsebool -P nscd_use_shm 1
95
96
97
98 If you want to allow Redis to run redis-sentinal notification scripts,
99 you must turn on the redis_enable_notify boolean. Disabled by default.
100
101 setsebool -P redis_enable_notify 1
102
103
104
106 The SELinux process type sendmail_t can manage files labeled with the
107 following file types. The paths listed are the default paths for these
108 file types. Note the processes UID still need to have DAC permissions.
109
110 anon_inodefs_t
111
112
113 cifs_t
114
115
116 dovecot_spool_t
117
118 /var/spool/dovecot(/.*)?
119
120 ecryptfs_t
121
122 /home/[^/]+/.Private(/.*)?
123 /home/[^/]+/.ecryptfs(/.*)?
124
125 etc_aliases_t
126
127 /etc/mail/.*.db
128 /etc/mail/aliases.*
129 /etc/postfix/aliases.*
130 /etc/aliases
131 /etc/aliases.db
132
133 exim_spool_t
134
135 /var/spool/exim[0-9]?(/.*)?
136
137 fusefs_t
138
139 /var/run/user/[^/]*/gvfs
140
141 initrc_tmp_t
142
143
144 mail_home_rw_t
145
146 /root/Maildir(/.*)?
147 /root/.esmtp_queue(/.*)?
148 /home/[^/]+/.maildir(/.*)?
149 /home/[^/]+/Maildir(/.*)?
150 /home/[^/]+/.esmtp_queue(/.*)?
151
152 mail_spool_t
153
154 /var/mail(/.*)?
155 /var/spool/imap(/.*)?
156 /var/spool/mail(/.*)?
157 /var/spool/smtpd(/.*)?
158
159 mailman_data_t
160
161 /etc/mailman.*
162 /var/lib/mailman(/.*)?
163 /var/spool/mailman.*
164
165 mqueue_spool_t
166
167 /var/spool/(client)?mqueue(/.*)?
168 /var/spool/mqueue.in(/.*)?
169
170 nfs_t
171
172
173 procmail_tmp_t
174
175
176 sendmail_log_t
177
178 /var/log/mail(/.*)?
179 /var/log/sendmail.st.*
180
181 sendmail_tmp_t
182
183
184 sendmail_var_run_t
185
186 /var/run/sendmail.pid
187 /var/run/sm-client.pid
188
189 user_home_t
190
191 /home/[^/]+/.+
192
193
195 SELinux requires files to have an extended attribute to define the file
196 type.
197
198 You can see the context of a file using the -Z option to ls
199
200 Policy governs the access confined processes have to these files.
201 SELinux sendmail policy is very flexible allowing users to setup their
202 sendmail processes in as secure a method as possible.
203
204 STANDARD FILE CONTEXT
205
206 SELinux defines the file context types for the sendmail, if you wanted
207 to store files with these types in a diffent paths, you need to execute
208 the semanage command to sepecify alternate labeling and then use
209 restorecon to put the labels on disk.
210
211 semanage fcontext -a -t sendmail_var_run_t '/srv/mysendmail_con‐
212 tent(/.*)?'
213 restorecon -R -v /srv/mysendmail_content
214
215 Note: SELinux often uses regular expressions to specify labels that
216 match multiple files.
217
218 The following file types are defined for sendmail:
219
220
221
222 sendmail_exec_t
223
224 - Set files with the sendmail_exec_t type, if you want to transition an
225 executable to the sendmail_t domain.
226
227
228 Paths:
229 /usr/sbin/sendmail(.sendmail)?, /usr/bin/esmtp, /usr/sbin/rmail,
230 /usr/sbin/ssmtp, /usr/lib/sendmail, /usr/bin/esmtp-wrapper,
231 /var/qmail/bin/sendmail, /usr/sbin/sendmail.postfix
232
233
234 sendmail_initrc_exec_t
235
236 - Set files with the sendmail_initrc_exec_t type, if you want to tran‐
237 sition an executable to the sendmail_initrc_t domain.
238
239
240
241 sendmail_keytab_t
242
243 - Set files with the sendmail_keytab_t type, if you want to treat the
244 files as kerberos keytab files.
245
246
247
248 sendmail_log_t
249
250 - Set files with the sendmail_log_t type, if you want to treat the data
251 as sendmail log data, usually stored under the /var/log directory.
252
253
254 Paths:
255 /var/log/mail(/.*)?, /var/log/sendmail.st.*
256
257
258 sendmail_tmp_t
259
260 - Set files with the sendmail_tmp_t type, if you want to store sendmail
261 temporary files in the /tmp directories.
262
263
264
265 sendmail_var_run_t
266
267 - Set files with the sendmail_var_run_t type, if you want to store the
268 sendmail files under the /run or /var/run directory.
269
270
271 Paths:
272 /var/run/sendmail.pid, /var/run/sm-client.pid
273
274
275 Note: File context can be temporarily modified with the chcon command.
276 If you want to permanently change the file context you need to use the
277 semanage fcontext command. This will modify the SELinux labeling data‐
278 base. You will need to use restorecon to apply the labels.
279
280
282 semanage fcontext can also be used to manipulate default file context
283 mappings.
284
285 semanage permissive can also be used to manipulate whether or not a
286 process type is permissive.
287
288 semanage module can also be used to enable/disable/install/remove pol‐
289 icy modules.
290
291 semanage boolean can also be used to manipulate the booleans
292
293
294 system-config-selinux is a GUI tool available to customize SELinux pol‐
295 icy settings.
296
297
299 This manual page was auto-generated using sepolicy manpage .
300
301
303 selinux(8), sendmail(8), semanage(8), restorecon(8), chcon(1), sepol‐
304 icy(8), setsebool(8)
305
306
307
308sendmail 19-10-08 sendmail_selinux(8)