From owner-freebsd-questions Fri Mar 8 1:40:18 2002 Delivered-To: freebsd-questions@freebsd.org Received: from pc1-dale5-0-cust136.not.cable.ntl.com (pc2-dale5-0-cust139.not.cable.ntl.com [80.1.77.139]) by hub.freebsd.org (Postfix) with SMTP id 7D91837B402 for ; Fri, 8 Mar 2002 01:40:10 -0800 (PST) Received: (qmail 1457 invoked from network); 8 Mar 2002 09:12:25 -0000 Received: from localhost (HELO matt.thebigchoice.com) (127.0.0.1) by localhost with SMTP; 8 Mar 2002 09:12:25 -0000 Date: Fri, 8 Mar 2002 09:12:24 +0000 From: Matt H To: "Mark Drayton" Cc: ntaflos.andreas@gmx.net, freebsd-questions@FreeBSD.ORG Subject: Re: Starting daemon only for user; gotta be simple? Message-Id: <20020308091224.7874c76b.matt@proweb.co.uk> In-Reply-To: <20020308091847.B29331@drex.staff.izr.com> References: <20020307181919.A94491@Deadcell.ant> <20020308091847.B29331@drex.staff.izr.com> X-Mailer: Sylpheed version 0.7.2 (GTK+ 1.2.10; i386-portbld-freebsd4.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > I want to have fetchmail running in daemon mode, so I put the > > according entry into my .fetchmailrc: set daemon 900 for example. > > But the daemon gets started only when I run fetchmail once manually > > on the command line. > > > > I am looking for a way to have this task automated. A script in > > /usr/local/etc/rc.d comes into mind, but this would start polling > > for mail only for root wouldn't it? fetchmail doesn't care what username it runs under, it delivers using your local MTA to the user. fetchmailrc determines which users the mail goes to. just put your .fetchmailrc in /root so no-one can peek at it %ls -la /root/.fetchmail -rwx--x--- 1 root wheel 353 Feb 8 13:34 .fetchmailrc I run mine under my own username so that I can type fetchmmail at the prompt to manually invoke mail retreival when necessary but it will still deliver to anyone %cat /usr/local/etc/rc.d/fetchmail.sh #!/bin/sh /usr/bin/su matt -c "/usr/local/bin/fetchmail -d 300 & To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message