[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Support for $HOME mailboxes



In article <[🔎] 199709220411.WAA21911@galileo.mostlylinux.ab.ca>,
Scott Barker <scott@mostlylinux.ab.ca> wrote:
>Dave Cinege said:
>> On Sun, 21 Sep 1997 17:58:38 -0600 (MDT), Scott Barker wrote:
>> >Are there any plans to support home directory mailboxes under debian in the
>> >near future?
>> 
>> qmail already works like this.
>
>I was thinking more along the lines of global support. I know qmail supports
>it, but procmail, qpopper, etc. do not. They have options to support it if
>they are recompiled, but they don't have any command line or config file
>options to support it. For now, I've just been rebuilding them from the debian
>source after changing the necessary config options, and installing my modified
>package. It would be nice if there were run-time options, or even two
>different packages (for example qpopper_spool and qpopper_home).

Perhaps it would be the best idea to create a config file for this, and
a library (well one or two functions) that can read the config file ?

Something like:

# /etc/mail/mailboxdefs
MAILBOXPATH=/var/spool/mail/$USER
#MAILBOXPATH=$HOME/Mail/$USER
#MAILBOXPATH=$HOME/Mail/inbox
MAILBOXTYPE=Unix
#MAILBOXTYPE=MMDF
#MAILBOXTYPE=Files

MAILBOXTYPE would default to Unix, and MAILBOXPATH would default to
/var/spool/mail/$USER. The functions would be something like:

char *mailbox_path(char *user)
char *mailbox_dir(void)
char *mailbox_type(void)

I think a global config file is fine, or should the user be able to override
this? Probably not - think of setuid and/or setgid programs. Would be
pretty insecure. Hmm, most programs can drop setgid with this scheme ofcourse.

$HOME and $USER should not be gotten from the environment, by from getpwnam()

Replacing _PATH_MAILDIR/username with mailbox_path() should be trivial in
most programs.

Just an idea.. I'd love to place the user mailboxes in their home directories.

Mike.
-- 
| Miquel van Smoorenburg |                                                    |
| miquels@cistron.nl     | Owners of digital watches, your days are numbered. |
|     PGP fingerprint: FE 66 52 4F CD 59 A5 36  7F 39 8B 20 F1 D6 74 02       |


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: