Bug 1179574 - move /var/spool/mail/ to separate package
Summary: move /var/spool/mail/ to separate package
Status: IN_PROGRESS
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Ludwig Nussel
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1165830
  Show dependency treegraph
 
Reported: 2020-12-03 16:48 UTC by Ludwig Nussel
Modified: 2024-07-15 17:05 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludwig Nussel 2020-12-03 16:48:24 UTC
/var/spool/mail/ is like /tmp 1777 so yet another location where users can write any file. It's only used by MUAs that are not installed by default anymore nowadays, so should be moved to separate package and required by MUAs. Also, the default of the  CREATE_MAIL_SPOOL variable should be set to "no".
Comment 1 Thorsten Kukuk 2020-12-03 17:13:20 UTC
I would put that directory in the MUA packages (sendmail, postfix, ...).
They are already mutual exclusive, and the permissions will not change. Avoids the overhead of another package and all the dependencies.
Comment 2 Ludwig Nussel 2020-12-04 08:17:33 UTC
We have the following packages that provide smtp_daemon:

- sendmail
- postfix
- exim
- busybox-links
- msmtp-mta

One way or another the overhead is modifying those packages. I don't mind though, we could also include the dir in those individually. Permissions are enforced by the permissions package.
Comment 3 Ludwig Nussel 2020-12-04 08:37:21 UTC
it's also the /var/mail symlink and the shadow package uses that for detecting whether to create mail spools on useradd. If we want to retain that feature we probably don't want shadow to pull in either of the smtp daemons in ring0.
Comment 4 Ludwig Nussel 2020-12-04 08:47:28 UTC
for shadow it's actually not that bad. We use login from util-linux which has the location hardcoded. For useradd an admin can still set MAIL_DIR if needed.
Comment 5 Thorsten Kukuk 2020-12-04 11:12:56 UTC
(In reply to Ludwig Nussel from comment #2)
> We have the following packages that provide smtp_daemon:
> 
> - sendmail
> - postfix
> - exim
> - busybox-links
> - msmtp-mta
> 
> One way or another the overhead is modifying those packages. I don't mind
> though, we could also include the dir in those individually. Permissions are
> enforced by the permissions package.

Adding the requires to all packages and create a new package vs adding the directory to all packages, I still think the later one is less effort.
But in the end I don't care, it was only a suggestion how I would make it.
If there are problems because /var/mail is missing: this symlink is only optional, if something is failing we should fix it, and I doubt that much people are really using /var/mail or /var/spool/mail today, as everything is web or imap.
Comment 6 Ludwig Nussel 2020-12-04 11:45:11 UTC
shadow has /var/mail hardcoded for a start :)
Comment 7 Ludwig Nussel 2022-09-13 08:27:24 UTC
CC security-team. FYI https://github.com/rpm-software-management/rpmlint/pull/929
Comment 8 OBSbugzilla Bot 2022-09-14 09:35:03 UTC
This is an autogenerated message for OBS integration:
This bug (1179574) was mentioned in
https://build.opensuse.org/request/show/1003484 Factory / rpmlint
Comment 9 OBSbugzilla Bot 2022-09-16 15:15:03 UTC
This is an autogenerated message for OBS integration:
This bug (1179574) was mentioned in
https://build.opensuse.org/request/show/1004144 Factory / rpmlint
Comment 10 OBSbugzilla Bot 2022-09-29 14:45:02 UTC
This is an autogenerated message for OBS integration:
This bug (1179574) was mentioned in
https://build.opensuse.org/request/show/1006967 Factory / exim
Comment 11 OBSbugzilla Bot 2022-10-05 11:55:03 UTC
This is an autogenerated message for OBS integration:
This bug (1179574) was mentioned in
https://build.opensuse.org/request/show/1008186 Factory / sendmail
Comment 12 OBSbugzilla Bot 2022-10-14 09:45:02 UTC
This is an autogenerated message for OBS integration:
This bug (1179574) was mentioned in
https://build.opensuse.org/request/show/1010635 Factory / rpmlint
Comment 14 Dr. Werner Fink 2023-10-09 07:33:05 UTC
Solving this bug with that way has broken mutt build see bug boo#1216035
Comment 15 OBSbugzilla Bot 2024-07-15 17:05:16 UTC
This is an autogenerated message for OBS integration:
This bug (1179574) was mentioned in
https://build.opensuse.org/request/show/1187597 Backports:SLE-15-SP6 / exim