Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Nov 1997 11:30:02 -0800 (PST)
From:      Kevin Day <toasty@home.dragondata.com>
To:        freebsd-bugs
Subject:   Re: bin/4925: sendmail ignores user quotas
Message-ID:  <199711091930.LAA29841@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/4925; it has been noted by GNATS.

From: Kevin Day <toasty@home.dragondata.com>
To: vasim@diaspro.com (Vasim Valejev)
Cc: toasty@dragondata.com, freebsd-gnats-submit@FreeBSD.ORG, gnats@FreeBSD.ORG,
        freebsd-bugs@hub.freebsd.org
Subject: Re: bin/4925: sendmail ignores user quotas
Date: Sun, 9 Nov 1997 13:23:37 -0600 (CST)

 > Hi !
 > 
 > On Sun, 2 Nov 1997 toasty@dragondata.com wrote:
 > > >Description:
 > > Users can receive mail well over their hard space limit. I'd like to be able to stop this from happening. /var/spool/mail is on it's own partition, so I thought I could apply a quota to prevent users from getting mailbombed, and also from just saving  too much mail on the server.
 > > 
 > > repquota shows the correct amount used, and will even show them going over the hard limit, but sendmail still dumps more data in their mail file.
 > > 
 > > Is this a bug? Probably not, but it's not really consistant behavior, as nearly every other service will stop when their limit is reached.
 > > 
 > 
 > It's problem in /usr/libexec/mail.local . This program open and write in
 >  user's mailboxes under root .
 > 
 > > >How-To-Repeat:
 > > Enable quotas, and send a ton of mail to a user with very little space left.
 > > >Fix:
 > 
 > Possible fix (not tested) for /usr/src/libexec/mail.local/mail.local.c :
 > 
 > *** mail.local.c.orig	Sat Oct 25 14:09:39 1997
 > --- mail.local.c	Mon Nov  3 13:24:53 1997
 > ***************
 > *** 266,271 ****
 > --- 266,287 ----
 >   		}
 >   	}
 >   
 > + 	if (mbfd == -1) {
 > + 		e_to_sys(errno);
 > + 		warn("%s: %s", path, strerror(errno));
 > + 		return;
 > + 	}
 > + 
 > + 	close(mbfd);
 > + 
 > + 	if (setuid(pw->pw_uid) < 0)
 > + 	{
 > + 		e_to_sys(errno);
 > + 		warn("%d: %s", pw->pw_uid, strerror(errno));
 > + 		return;
 > + 	}
 > + 	
 > + 	mbfd = open(path, O_APPEND|O_WRONLY, 0);
 >   	if (mbfd == -1) {
 >   		e_to_sys(errno);
 >   		warn("%s: %s", path, strerror(errno));
 > 
 
 I'm not sure if this is related or not, but when a user over their quota got
 another message, there suddenly were thousands of 'mail.local' processes
 running, all trying to send mail to that user...
 
 It had otherwise worked perfectly before.
 
 
 Kevin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711091930.LAA29841>