sendmail_selinux(8)
π sendmail_selinux(8) β like, the whole SELinux tea for sendmail, bestie
okay so this is sendmail_selinux(8), the section 8 manual page all about the SELinux policy for sendmail. yes that sendmail. the mail one. grab a strawberry drink π and let's get into it.
β¨ NAME β¨
sendmail_selinux β Security Enhanced Linux Policy for the sendmail processes π
πΈ DESCRIPTION πΈ
Security-Enhanced Linux secures the sendmail processes via flexible mandatory access control. like, it's giving bodyguard energy but for processes π«Ά
The sendmail processes execute with the sendmail_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier.
For example:
ps -eZ | grep sendmail_t
that's literally it. run it. see what's up π
π¦ ENTRYPOINTS π¦
The sendmail_t SELinux type can be entered via the mta_exec_type file type.
The default entrypoint paths for the sendmail_t domain are the following:
bestie. there is genuinely nothing listed here in the original. the list is empty. i'm not hiding it from you, it's just a vibe with no paths π
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system.
You can see the context of a process using the -Z option to ps.
Policy governs the access confined processes have to files. SELinux sendmail policy is very flexible, allowing users to set up their sendmail processes in as secure a method as possible. flexible AND secure, she contains multitudes β¨
The following process types are defined for sendmail:
sendmail_t
Note:semanage permissive -a sendmail_tcan be used to make the process typesendmail_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, she's not blocking you anymore, but she IS still taking notes π
π BOOLEANS π
SELinux policy is customizable based on least access required. sendmail policy is extremely flexible and has several booleans that allow you to manipulate the policy and run sendmail with the tightest access possible. least privilege is the moment, no cap π
If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default.
setsebool -P fips_mode 1
If you want to allow system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default.
setsebool -P nis_enabled 1
π MANAGED FILES π
The SELinux process type sendmail_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions. yes, SELinux said yes but your UID still has to say yes too, it's a two-key situation π
cifs_t
(no paths listed for this one β she's pathless and mysterious π§)
dovecot_spool_t
/var/spool/dovecot(/.*)?
ecryptfs_t
/home/[^/]+/.Private(/.*)?
/home/[^/]+/.ecryptfs(/.*)?
etc_aliases_t
/etc/mail/.*.db
/etc/mail/aliases.*
/etc/postfix/aliases.*
/etc/aliases
/etc/aliases.db
/etc/aliases.lmdb
exim_spool_t
/var/spool/exim[0-9]?(/.*)?
fusefs_t
/run/user/[0-9]+/gvfs
krb5_host_rcache_t
/var/tmp/krb5_0.rcache2
/var/cache/krb5rcache(/.*)?
/var/tmp/nfs_0
/var/tmp/DNS_25
/var/tmp/host_0
/var/tmp/imap_0
/var/tmp/HTTP_23
/var/tmp/HTTP_48
/var/tmp/ldap_55
/var/tmp/ldap_487
/var/tmp/ldapmap1_0
mail_home_rw_t
/root/Maildir(/.*)?
/root/.esmtp_queue(/.*)?
/var/lib/arpwatch/.esmtp_queue(/.*)?
/var/cache/ddclient/.esmtp_queue(/.*)?
/home/[^/]+/.maildir(/.*)?
/home/[^/]+/Maildir(/.*)?
/home/[^/]+/.esmtp_queue(/.*)?
mailman_data_t
/etc/mailman.*
/var/lib/mailman(/.*)?
/var/spool/mailman.*
mqueue_spool_t
/var/spool/(client)?mqueue(/.*)?
/var/spool/mqueue.in(/.*)?
nfs_t
(also no paths here, she's elusive π¦)
sendmail_log_t
/var/log/mail(/.*)?
/var/log/sendmail.st.*
sendmail_var_lib_t
/var/lib/sendmail(/.*)?
sendmail_var_run_t
/run/sendmail(/.*)?
/run/smtpd.sock
/run/sm-client.pid
/var/spool/clientmqueue/sm-client.pid
user_home_t
/home/[^/]+/.+
π§ FILE CONTEXTS π§
SELinux requires files to have an extended attribute to define the file type.
You can see the context of a file using the -Z option to ls.
Policy governs the access confined processes have to these files. SELinux sendmail policy is very flexible, allowing users to set up their sendmail processes in as secure a method as possible.
β STANDARD FILE CONTEXT β
SELinux defines the file context types for the sendmail. If you wanted to store files with these types in a different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk. two-step glow-up: tell the database, then actually apply it π
semanage fcontext -a -t sendmail_exec_t '/srv/sendmail/content(/.*)?'
restorecon -R -v /srv/mysendmail_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise π
The following file types are defined for sendmail:
sendmail_exec_tβ Set files with thesendmail_exec_ttype, if you want to transition an executable to thesendmail_tdomain.
Paths:
/usr/bin/sendmail(.sendmail)?, /usr/bin/esmtp, /usr/bin/msmtp,
/usr/bin/rmail, /usr/bin/smtpd, /usr/bin/ssmtp, /usr/bin/msmtpd,
/usr/lib/sendmail, /usr/bin/esmtp-wrapper, /var/qmail/bin/sendmail,
/usr/bin/sendmail.postfix
sendmail_initrc_exec_tβ Set files with thesendmail_initrc_exec_ttype, if you want to transition an executable to thesendmail_initrc_tdomain.
Paths:
/etc/mail/system/sm-client.pre, /etc/rc.d/init.d/sendmail
sendmail_keytab_tβ Set files with thesendmail_keytab_ttype, if you want to treat the files as kerberos keytab files. πsendmail_log_tβ Set files with thesendmail_log_ttype, if you want to treat the data as sendmail log data, usually stored under the/var/logdirectory.
Paths:
/var/log/mail(/.*)?, /var/log/sendmail.st.*
sendmail_tmp_tβ Set files with thesendmail_tmp_ttype, if you want to store sendmail temporary files in the/tmpdirectories.sendmail_var_lib_tβ Set files with thesendmail_var_lib_ttype, if you want to store the sendmail files under the/var/libdirectory.sendmail_var_run_tβ Set files with thesendmail_var_run_ttype, if you want to store the sendmail files under the/runor/var/rundirectory.
Paths:
/run/sendmail(/.*)?, /run/smtpd.sock, /run/sm-client.pid,
/var/spool/clientmqueue/sm-client.pid
Note: File context can be temporarily modified with thechconcommand. If you want to permanently change the file context you need to use thesemanage fcontextcommand. This will modify the SELinux labeling database. You will need to userestoreconto apply the labels. chcon is a temporary vibe, semanage fcontext + restorecon is forever. periodt. π
π₯ COMMANDS π₯
semanage fcontextcan also be used to manipulate default file context mappings.semanage permissivecan also be used to manipulate whether or not a process type is permissive.semanage modulecan also be used to enable/disable/install/remove policy modules.semanage booleancan also be used to manipulate the booleans.system-config-selinuxis a GUI tool available to customize SELinux policy settings. yes bestie, a GUI, for when the terminal needs a little break β¨
π AUTHOR π
This manual page was auto-generated using sepolicy manpage. a bot wrote this, and honestly? she ate π€π
π SEE ALSO π
selinux(8), sendmail(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
and that's the whole page, bestie!! mwah π
this cutie was brought to you by sendmail on 26-10-06, page sendmail_selinux(8) β go forth and label responsibly ππ¦πΈ
π¦ where this page comes from
- opensuse-leap 16.0: selinux-policy-doc 20250627+git412.dbf877ab7-160000.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms