qmail_local_selinux(8)

πŸ“¦
version 20250627+git412.dbf877ab7 Β· 7 versions
, in opensuse-leap 16.0

πŸ’– qmail_local_selinux β€” the manual page, but make it make sense ✨

okay so bestie, this is qmail_local_selinux(8) from the qmail_local SELinux Policy section. yes it's a mouthful, no you're not gonna need to say it out loud. let's get into it 🫢


🌸 NAME 🌸

qmail_local_selinux β€” literally the Security Enhanced Linux Policy for the qmail_local processes. that's it. that's the whole name section. iconic brevity honestly πŸ‘‘


✨ DESCRIPTION ✨

Security-Enhanced Linux secures the qmail_local processes via flexible mandatory access control. no cap, that's the whole vibe β€” SELinux is out here flexing mandatory access control on your qmail_local processes πŸ’…

The qmail_local processes execute with the qmail_local_t SELinux type. wanna check if you've got these processes running? just run the ps command with the -Z qualifier. easy.

For example:

ps -eZ | grep qmail_local_t

that's literally it, go off πŸ”₯


πŸ¦‹ ENTRYPOINTS πŸ¦‹

The qmail_local_t SELinux type can be entered via the qmail_local_exec_t file type. that's the door, bestie πŸšͺ

The default entrypoint paths for the qmail_local_t domain are the following:

/var/qmail/bin/qmail-local

one singular path. she's exclusive. πŸ’…


πŸŽ€ PROCESS TYPES πŸŽ€

SELinux defines process types (domains) for each process running on the system. every process gets a lil label, it's giving name tags at a party 🏷️

You can see the context of a process using the -Z option to ps.

Policy governs the access confined processes have to files. SELinux qmail_local policy is very flexible, allowing users to setup their qmail_local processes in as secure a method as possible. highkey the most accommodating policy out here 🫢

The following process types are defined for qmail_local:

  • qmail_local_t
Note: semanage permissive -a qmail_local_t can be used to make the process type qmail_local_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it lets stuff through but still talks about it behind your back πŸ’€

🌈 BOOLEANS 🌈

SELinux policy is customizable based on least access required. qmail_local policy is extremely flexible and has several booleans that allow you to manipulate the policy and run qmail_local with the tightest access possible. tightest access possible = main character energy, we love a locked-down queen πŸ‘‘

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

two booleans, both absolute icons, both one command away πŸ’–


🌸 MANAGED FILES 🌸

The SELinux process type qmail_local_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. and listen β€” the processes UID still need to have DAC permissions. SELinux isn't out here overriding DAC, they're coworkers not rivals, periodt.

  • cifs_t β€” no default paths listed, she's mysterious πŸ•΅οΈ
  • dovecot_spool_t
    • /var/spool/dovecot(/.*)?
  • ecryptfs_t
    • /home/[^/]+/.Private(/.*)?
    • /home/[^/]+/.ecryptfs(/.*)?
  • 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(/.*)?
  • nfs_t β€” also no default paths listed, also mysterious ✨
  • qmail_alias_home_t
    • /var/qmail/alias(/.*)?
    • /var/qmail/alias
  • user_home_t
    • /home/[^/]+/.+

look at all those regexes, she said "match multiple files" and meant it 😭


πŸ’œ FILE CONTEXTS πŸ’œ

SELinux requires files to have an extended attribute to define the file type. yes, every file's gotta carry its lil extended attribute like an ID card πŸͺͺ

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 qmail_local policy is very flexible, allowing users to setup their qmail_local processes in as secure a method as possible. (yes it says this twice in the original, so it says it twice here too, consistency slay πŸ’…)

⭐ STANDARD FILE CONTEXT ⭐

SELinux defines the file context types for the qmail_local, 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. relabeling era πŸ”

semanage fcontext -a -t qmail_local_exec_t
'/srv/qmail_local/content(/.*)?'
restorecon -R -v /srv/myqmail_local_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise 🌸

The following file types are defined for qmail_local:

qmail_local_exec_t

  • Set files with the qmail_local_exec_t type, if you want to transition an executable to the qmail_local_t domain.
Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels. temporary fix vs. permanent fix, know the difference bestie β€” chcon is a situationship, semanage fcontext is the committed relationship 🫢

πŸ”₯ COMMANDS πŸ”₯

  • semanage fcontext can also be used to manipulate default file context mappings.
  • semanage permissive can also be used to manipulate whether or not a process type is permissive.
  • semanage module can also be used to enable/disable/install/remove policy modules.
  • semanage boolean can also be used to manipulate the booleans.
  • system-config-selinux is a GUI tool available to customize SELinux policy settings. GUI girlies, this one's for you πŸ–±οΈβœ¨

🧚 AUTHOR 🧚

This manual page was auto-generated using sepolicy manpage. the robot wrote it, I just gave it a personality πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

selinux(8), qmail_local(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)

the whole friend group, all linked, all iconic 🌈


and that's the page bestie!! ✨ source + version + date for the record: qmail_local, dated 26-10-06, and this is the qmail_local_selinux(8) manual page. mwah, go forth and label responsibly πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from