Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Oct 1998 13:50:54 -0400 (EDT)
From:      James Egelhof <jegelhof@cloud9.net>
To:        Studded <Studded@dal.net>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Delivering mail to user's home directory
Message-ID:  <Pine.BSF.4.02A.9810041344320.8042-100000@earl-grey.cloud9.net>
In-Reply-To: <361703E1.894FA14A@dal.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 3 Oct 1998, Studded wrote:

> I know that this thread comes up periodically, and I searched the
> archives but didn't find an answer that I liked. I want to deliver mail
> directly to each user's home directory in such a way that I could enable
> quotas at some time down the road and have the mail delivery agent
> respect the quotas. 

A better way to do this is to have quotas on /var/mail.
This saves you the agony of maintining lots of links.
It also saves you from having to disable security checks in mail programs
that make sure they are are not using symlinked mailfiles.

> 	The solutions from the archives:
> 
> 1. Symlink /var/mail/username to /home/username/.mail
> The problem with this is that sendmail runs as root, so it won't respect
> quotas.
> 
> 3. Use procmail with sendmail to deliver the mail
> I'd like to avoid dependency on another utility (thus avoiding another
> potential security hole). 

sendmail does not put mail into mailfiles.  It uses an external utility.
By default this is mail.local.  This runs as root and does not respect
quotas.

You can use procmail as a drop-in replacement for mail.local.  procmail
has more features and is (allegedly) faster.  Procmail switches over to
the uid of the user it is delivering mail to, so it does respect quotas.
This may in fact be more secure than mail.local.

There is no way I know of to make any form of quotas work for mail
delivery without using a utility other than mail.local.

-james

---

James Egelhof                                            jegelhof@cloud9.net
Cloud 9 Consulting, Inc.                                   +1 (914) 696-4000
White Plains, New York                                 http://www.cloud9.net


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02A.9810041344320.8042-100000>