qmail_send_selinux(8)

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

πŸ’… qmail_send_selinux β€” bestie's guide to the SELinux policy for qmail_send πŸ’–

okay so this is qmail_send_selinux(8) from the SELinux Policy qmail_send manual, and honestly? it's giving "niche but iconic." let's get into it ✨


🌸 NAME 🌸

qmail_send_selinux β€” the Security Enhanced Linux Policy for the qmail_send processes. that's it, that's the whole name, and she ate πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

Security-Enhanced Linux secures the qmail_send processes via flexible mandatory access control. yes bestie, mandatory β€” not like, optional homework mandatory, like the-system-will-say-no mandatory πŸ’…

the qmail_send processes execute with the qmail_send_t SELinux type, and you can absolutely check if you've got these bad boys running by executing the ps command with the -Z qualifier. vibe check for your processes, basically πŸ”

for example:

ps -eZ | grep qmail_send_t

run that and see who's out there living their qmail_send_t truth 🌈


πŸŽ€ ENTRYPOINTS πŸŽ€

the qmail_send_t SELinux type can be entered via the qmail_send_exec_t file type β€” that's the doorway, the main character entrance, the "you shall not pass unless you're labeled right" moment πŸšͺ✨

the default entrypoint paths for the qmail_send_t domain are the following:

/var/qmail/bin/qmail-send

one path. that's the whole VIP list. iconic behavior honestly πŸ‘‘


🧚 PROCESS TYPES 🧚

SELinux defines process types (domains) for each process running on the system β€” think of it like every process gets its own little labeled room 🏠

you can see the context of a process using the -Z option to ps πŸ”

policy governs the access confined processes have to files. the SELinux qmail_send policy is very flexible, allowing users to setup their qmail_send processes in as secure a method as possible. flexible and secure? we love a multitasker πŸ’–

the following process types are defined for qmail_send:

  • qmail_send_t
Note: semanage permissive -a qmail_send_t can be used to make the process type qmail_send_t permissive. 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's still watching and taking notes πŸ‘€πŸ“

✨ BOOLEANS ✨

SELinux policy is customizable based on least access required β€” the "you get exactly what you need and not a crumb more" philosophy πŸͺ

qmail_send policy is extremely flexible and has several booleans that allow you to manipulate the policy and run qmail_send with the tightest access possible. tightest access possible, 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

that -P is doing the heavy lifting so it actually persists, periodt πŸ’…


πŸ“ MANAGED FILES πŸ“

the SELinux process type qmail_send_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 β€” SELinux isn't out here overriding your regular permissions, she's just adding a whole extra layer of judgment, bestie 😭

qmail_spool_t

/var/qmail/queue(/.*)?

that regex? she's matching everything under /var/qmail/queue, and she's slaying while doing it πŸ¦‹


πŸ’œ FILE CONTEXTS πŸ’œ

SELinux requires files to have an extended attribute to define the file type β€” yes, every file has a little vibe tag attached, that's just how it is here 🏷️

you can see the context of a file using the -Z option to ls πŸ”

policy governs the access confined processes have to these files. the SELinux qmail_send policy is very flexible, allowing users to setup their qmail_send processes in as secure a method as possible ✨

🌈 STANDARD FILE CONTEXT 🌈

SELinux defines the file context types for the qmail_send, and 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. relocating your files but keeping the labels? main character energy πŸššπŸ‘‘

semanage fcontext -a -t qmail_send_exec_t
'/srv/qmail_send/content(/.*)?'
restorecon -R -v /srv/myqmail_send_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_send:

qmail_send_exec_t

  • Set files with the qmail_send_exec_t type, if you want to transition an executable to the qmail_send_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. ngl this is the part people mess up the most β€” temporary vs permanent, know the difference fr fr πŸ’€

πŸ› οΈ 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. πŸ–₯️✨ (a GUI! for the clicky girlies!)

πŸ‘‘ AUTHOR πŸ‘‘

This manual page was auto-generated using sepolicy manpage . β€” so like, nobody hand-wrote this, the machine did it, and honestly? she understood the assignment πŸ€–πŸ’…


πŸ”— SEE ALSO πŸ”—

selinux(8), qmail_send(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8) β€” go read those too, they're all in the same friend group 🫢


and that's the whole page, bestie! this one's page qmail_send, last touched 26-10-06, and you can find it filed under qmail_send_selinux(8). go forth and label responsibly πŸŒΈβœ¨πŸ’–

πŸ“¦ where this page comes from