From owner-freebsd-questions@freebsd.org Sun Aug 30 12:29:27 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 134749C62AB for ; Sun, 30 Aug 2015 12:29:27 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF6F1AF7 for ; Sun, 30 Aug 2015 12:29:26 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: by igboj15 with SMTP id oj15so6884657igb.1 for ; Sun, 30 Aug 2015 05:29:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ktlhhJ3zyY1eXCuyJq+qaUjFlOOxilumVNOd38GEH7s=; b=hGe+ywdTbQ6KTQpZSmJde5Y+gc53zFMvhDvW8+TyOOoaREB5G+iVhD6N7vfp4TtldP PzUmQJgNOMpVc8y06a4c3RDuqgNNsKt93rOQ56RO9n7kp4/CBBB52JOHkt7LjviK3nQG jSLVpZlaK9ytoWcpX8tcxLuJ6a8WPkVwtYPdjM11Bfasi3Z4/oPypqOquybI9krBWAQM cBjQtL7R9D6BGbg10bkeDn3oxFnCCOM977oucnp4tzrPJNPZ4oxMFKk4pxQMVoHmhXcO 6J/8Wh/T4yuUwwzV1yUDtz3fm3oJybmtDuHjIdutfTB+Mm5UIy5PvkBEXHjr2m+6mI8T izIw== X-Received: by 10.50.61.34 with SMTP id m2mr9774958igr.27.1440937766195; Sun, 30 Aug 2015 05:29:26 -0700 (PDT) Received: from [10.0.10.5] (cpe-76-190-244-6.neo.res.rr.com. [76.190.244.6]) by smtp.googlemail.com with ESMTPSA id b78sm10430644ioe.2.2015.08.30.05.29.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Aug 2015 05:29:25 -0700 (PDT) Message-ID: <55E2F727.2040804@gmail.com> Date: Sun, 30 Aug 2015 08:29:27 -0400 From: Ernie Luzar User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: =?UTF-8?B?0KDRg9GB0LvQsNC9INCR0YPRgNGF0LDQvdC+0LI=?= CC: freebsd-questions Subject: Re: how to change daily cron emails to go to user account instead of root References: <55DF057F.6040205@gmail.com> <55DF0C75.5000907@qeng-ho.org> <55DF0DB3.3040400@qeng-ho.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: Sun, 30 Aug 2015 12:29:27 -0000 Руслан Бурханов wrote: > man cron > > -m mailto > Overrides the default recipient for cron mail. Each > crontab(5) > without MAILTO explicitly set will send mail to the > mailto mail‐ > box. Sending mail will be disabled by default if mailto > set to a > null string, usually specified in a shell as '' or "". > > So you just can add this option on cron flags from rc.conf, like: > > cron_flags="-m 'root@mymail.com '" > > and restart cron daemon. > snip This method seemed the simplest so I gave it a try. The host has a user account called bob. I want all cron email to go to bob and not root. I use postfix and sendmail is disabled. I put cron_flags="-m bob" in /etc/rc.conf and rebooted the host. Next morning the daily cron email still went to root. 1. Is there a way to scan rc.conf to verify all the included options are valid and accepted? 2. Since root and bob are on the same host is @mydomain really required? 3. Any ideas why it did not work and no errors were generated?