From owner-freebsd-questions@freebsd.org Fri Aug 28 06:22:46 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 794439C4B33 for ; Fri, 28 Aug 2015 06:22:46 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [150.101.137.145]) by mx1.freebsd.org (Postfix) with ESMTP id 1664A265 for ; Fri, 28 Aug 2015 06:22:45 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ppp118-210-169-30.lns20.adl6.internode.on.net (HELO leader.local) ([118.210.169.30]) by ipmail06.adl6.internode.on.net with ESMTP; 28 Aug 2015 15:52:45 +0930 Message-ID: <55DFFE32.3020508@ShaneWare.Biz> Date: Fri, 28 Aug 2015 15:52:42 +0930 From: Shane Ambler User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Alexander Moisseev , freebsd-questions@freebsd.org Subject: Re: how to change daily cron emails to go to user account instead of root References: <55DF057F.6040205@gmail.com> <55DF082D.8040001@mezonplus.ru> In-Reply-To: <55DF082D.8040001@mezonplus.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2015 06:22:46 -0000 On 27/08/2015 22:23, Alexander Moisseev wrote: > On 27.08.2015 15:41, Ernie Luzar wrote: >> The part that is not clear is where do I place this MAILTO environment >> variable? > > Have you seen the EXAMPLE CRON FILE section of the man 5 crontab? > > EXAMPLE CRON FILE > # use /bin/sh to run commands, overriding the default set by cron > SHELL=/bin/sh > # mail any output to `paul', no matter whose crontab this is > MAILTO=paul > # > # run five minutes after midnight, every day > 5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1 Another option is to use the .forward file. echo "\paul" >> /root/.forward see man forward -- FreeBSD - the place to B...Software Developing Shane Ambler