From owner-freebsd-isp@FreeBSD.ORG Mon Oct 25 12:42:48 2004 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 445A016A4CF for ; Mon, 25 Oct 2004 12:42:48 +0000 (GMT) Received: from mail.act.co.za (mail.act.co.za [196.15.213.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2184543D39 for ; Mon, 25 Oct 2004 12:42:45 +0000 (GMT) (envelope-from spidey@act.co.za) Received: from localhost.act.co.za ([127.0.0.1] helo=localhost) by mail.act.co.za with esmtp (Exim 4.24; FreeBSD 5.0) id 1CM4I4-00098q-Nk for FreeBSD-isp@freebsd.org; Mon, 25 Oct 2004 14:49:36 +0200 Received: from mail.act.co.za ([127.0.0.1]) by localhost (mail.act.co.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 34503-08 for ; Mon, 25 Oct 2004 14:49:35 +0200 (SAST) Received: from [10.0.1.11] (helo=SPIDEY) by mail.act.co.za with esmtp (Exim 4.24; FreeBSD 5.0) id 1CM4FI-00093A-3T for FreeBSD-isp@freebsd.org; Mon, 25 Oct 2004 14:46:44 +0200 From: "Spidey Knepscheld" To: Date: Mon, 25 Oct 2004 14:39:41 +0200 Organization: ACT Computers Message-ID: <006001c4ba8f$b31bcdd0$0b01000a@SPIDEY> MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Virus-Scanned: by amavisd-new at act.co.za Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Check for large mailboxes in Exim X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: spidey@act.co.za List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2004 12:42:48 -0000 Hi Guys On my mail server how can I check the sizes of the mail boxes or the mailboxes larger than 1 mb Thank you Spidey From owner-freebsd-isp@FreeBSD.ORG Mon Oct 25 13:04:07 2004 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5789616A4CE for ; Mon, 25 Oct 2004 13:04:07 +0000 (GMT) Received: from f32.mail.ru (f32.mail.ru [194.67.57.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id E47E343D3F for ; Mon, 25 Oct 2004 13:04:06 +0000 (GMT) (envelope-from _pppp@mail.ru) Received: from mail by f32.mail.ru with local id 1CM4W5-0002zD-00; Mon, 25 Oct 2004 17:04:05 +0400 Received: from [81.200.13.122] by win.mail.ru with HTTP; Mon, 25 Oct 2004 17:04:05 +0400 From: dima <_pppp@mail.ru> To: spidey@act.co.za Mime-Version: 1.0 X-Mailer: mPOP Web-Mail 2.19 X-Originating-IP: [81.200.13.122] Date: Mon, 25 Oct 2004 17:04:05 +0400 In-Reply-To: <006001c4ba8f$b31bcdd0$0b01000a@SPIDEY> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Message-Id: cc: FreeBSD-isp@freebsd.org Subject: Re: Check for large mailboxes in Exim X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: dima <_pppp@mail.ru> List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2004 13:04:07 -0000 > On my mail server how can I check the sizes of the mail boxes or the > mailboxes larger than 1 mb You should mention the mailbox format used. Let's consider you use the same format as I do (Mailbox). My boxes are under the /var/spool/vmail/ directory. The directory structure is like the following: /var/spool/vmail// So I type: # du -k -d 1 /var/spool/vmail/* & get the strings like: 33900 /var/spool/vmail/ 210 /var/spool/vmail// 2082 /var/spool/vmail// .... The sizes are in kilobytes by default. You can easily parse the stuff with text utils for your application. From owner-freebsd-isp@FreeBSD.ORG Thu Oct 28 19:51:09 2004 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AD9416A4CE for ; Thu, 28 Oct 2004 19:51:09 +0000 (GMT) Received: from vineyard.net (k1.vineyard.net [204.17.195.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08F8843D39 for ; Thu, 28 Oct 2004 19:51:09 +0000 (GMT) (envelope-from ericx_lists@vineyard.net) Received: from localhost (loopback [127.0.0.1]) by vineyard.net (Postfix) with ESMTP id 35D9C915E0 for ; Thu, 28 Oct 2004 15:51:08 -0400 (EDT) Received: from vineyard.net ([127.0.0.1]) by localhost (king1.vineyard.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 64180-01-40 for ; Thu, 28 Oct 2004 15:51:08 -0400 (EDT) Received: from vineyard.net (cheesenip.vineyard.net [204.17.195.113]) by vineyard.net (Postfix) with ESMTP id BB96F915D7 for ; Thu, 28 Oct 2004 15:51:07 -0400 (EDT) Message-ID: <41814DAA.80206@vineyard.net> Date: Thu, 28 Oct 2004 15:51:06 -0400 From: "Eric W. Bates" User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-isp@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS-king1 at Vineyard.NET Subject: Problems with rc.subr and suid script X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2004 19:51:09 -0000 I've written a CGI which is calling /usr/local/rc.d/squid.sh in an attempt to start/stop the proxy. Stopping works fine; however, whenever I try to start it I'm having permissions problems. It seems as tho rc.subr is using RUID instead of EUID. The CGI is written in perl. Thanks. -- Eric Bates From owner-freebsd-isp@FreeBSD.ORG Fri Oct 29 04:00:10 2004 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BFD316A4CE for ; Fri, 29 Oct 2004 04:00:10 +0000 (GMT) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F35143D39 for ; Fri, 29 Oct 2004 04:00:10 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from [192.168.1.3] (pool-68-160-246-51.ny325.east.verizon.net [68.160.246.51]) by pi.codefab.com (8.12.11/8.12.11) with ESMTP id i9T403X4083719 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 Oct 2004 00:00:06 -0400 (EDT) Message-ID: <4181C040.3090606@mac.com> Date: Fri, 29 Oct 2004 00:00:00 -0400 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Eric W. Bates" References: <41814DAA.80206@vineyard.net> In-Reply-To: <41814DAA.80206@vineyard.net> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-3.7 required=5.5 tests=AWL,BAYES_00 autolearn=ham version=2.64 X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on pi.codefab.com cc: freebsd-isp@freebsd.org Subject: Re: Problems with rc.subr and suid script X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2004 04:00:10 -0000 Eric W. Bates wrote: > I've written a CGI which is calling /usr/local/rc.d/squid.sh in an > attempt to start/stop the proxy. Stopping works fine; however, whenever > I try to start it I'm having permissions problems. > > It seems as tho rc.subr is using RUID instead of EUID. > > The CGI is written in perl. Perl may be disregarding the setuid bit of the script in order to avoid the security risks. Consider changing your script to work via sudo. -- -Chuck From owner-freebsd-isp@FreeBSD.ORG Fri Oct 29 07:31:39 2004 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A233616A4CE for ; Fri, 29 Oct 2004 07:31:39 +0000 (GMT) Received: from smtp1.powertech.no (smtp1.powertech.no [195.159.0.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id C305043D48 for ; Fri, 29 Oct 2004 07:31:38 +0000 (GMT) (envelope-from frode@nordahl.net) Received: from [195.159.6.24] (ws24.ns5.powertech.no [195.159.6.24]) by smtp1.powertech.no (Postfix) with ESMTP id 2935080DE; Fri, 29 Oct 2004 09:31:37 +0200 (CEST) In-Reply-To: <41814DAA.80206@vineyard.net> References: <41814DAA.80206@vineyard.net> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <91ADB2F2-297C-11D9-A7DA-000A95A9A574@nordahl.net> Content-Transfer-Encoding: 7bit From: Frode Nordahl Date: Fri, 29 Oct 2004 09:31:38 +0200 To: "Eric W. Bates" X-Mailer: Apple Mail (2.619) cc: freebsd-isp@freebsd.org Subject: Re: Problems with rc.subr and suid script X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2004 07:31:39 -0000 On Oct 28, 2004, at 21:51, Eric W. Bates wrote: > I've written a CGI which is calling /usr/local/rc.d/squid.sh in an > attempt to start/stop the proxy. Stopping works fine; however, > whenever I try to start it I'm having permissions problems. > > It seems as tho rc.subr is using RUID instead of EUID. > > The CGI is written in perl. Try to set the real uid then: $< = $>; or $UID = $EUID; or $REAL_USER_ID = $EFFECTIVE_USER_ID; (ref perlvar manpage) shesh. Perl is crazy :-D Also, suidperl is paranoid about environment etc, so make sure you set up a safe $ENV{PATH} etc. And of course, try to run the script from commandline as an unprivileged user and look for errors and warnings. Mvh, Frode > Thanks. > > -- > Eric Bates > _______________________________________________ > freebsd-isp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-isp > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org"