procmail
[Top] [All Lists]

Re: misc.c and permissions

1999-05-06 14:56:31

Harry Palmer <hpalmer(_at_)ns1(_dot_)jerky(_dot_)net> writes:
The default behavior for procmail is to enforce strict permissions
(00660 I believe) on mail spool files.  Due to a unique situation on my
mail server I require the files to be 00666.  In misc.c I foudn the
following code:

Can we ask why you would want to do that?  Do you trust everyone who
can run processes on that machine?



Its a very unique case.  Needless to say the only person that can
actually access the box and run processes is myself.  And if someone
else is able to run code then I've got more serious problems than
procmail ;)  The possiblilty for spool file DOS attacks, and mail
reading is a non-issue in my particular case.

...
This seems to accomplish what I was looking for.  Does anyone know if
this will break any other functions of procmail?  Or is there a better
way to accomplish this?

If any of the following mode bits are set on a mailspool, procmail will
not change the permission on it:

      user execute
      sticky

So, pre-creating the mailboxes with permissions 766 or 1666 should
work.

Ya I noticed that.  The only problem with that is that it is not
uncommon for me to have a large number of user accounts that are
essentially idle.  I naturally don't want wasted space and inodes for a
user that isn't getting any email.  This may seem like an insignificant
matter but when you talk about a system with tens of thousands of users
your spool directory gets a tad silly.  I'd much rather prefer playing
about with 5000 active spools than 5000 active, and 15,000 empty
(useless) files.

Besides the security concern, do you forsee any problems with the
solution I proposed?  My main concern is whether it will break any
functionality of procmail.  

Thanks

<Prev in Thread] Current Thread [Next in Thread>