From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-user+bounces-195662-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 7CC231382C5
	for <garchives@archives.gentoo.org>; Tue,  6 Apr 2021 23:52:11 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id BAEEDE096F;
	Tue,  6 Apr 2021 23:52:01 +0000 (UTC)
Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 8511BE08F4
	for <gentoo-user@lists.gentoo.org>; Tue,  6 Apr 2021 23:52:00 +0000 (UTC)
Received: by mail-oi1-x236.google.com with SMTP id n8so16919616oie.10
        for <gentoo-user@lists.gentoo.org>; Tue, 06 Apr 2021 16:51:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=subject:to:references:from:openpgp:autocrypt:message-id:date
         :user-agent:mime-version:in-reply-to:content-transfer-encoding;
        bh=3RvcCbtjwv3rgvKF7e0DDJ64cSqJ6GjTSAYbxlJFFtA=;
        b=dBUlTeA+H/OKZdpBoB1QzfgaxB9RGv6fjefDTwew1acHK1NK1ydJh1ZQG1N6mODWEE
         yJE+ixMlwPIT0WqwkUcjTHeqDXitgSB6iyTFEf+dG90zF/wZXIdx3nZjmu4T1A2xABe2
         B06onnzS0Bxuws4yevR43zqHrlJdl59B3jkv4OCbfCYELJLF5wuHaMP316u9S49mn6zS
         kNQGvIVPNIM/buxhg+iTKjmCfef7BdYJmzjGF1kqLC/Y8yzu2YpyGV1OKsyL0IcW/eLo
         w5WEEer/WSVmzqcp1vlxkZBu0K4qCZdiZUxHeZ6NNClhxGAv2mwwZ78rHOwQPJN8km3F
         fwog==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt
         :message-id:date:user-agent:mime-version:in-reply-to
         :content-transfer-encoding;
        bh=3RvcCbtjwv3rgvKF7e0DDJ64cSqJ6GjTSAYbxlJFFtA=;
        b=oSINtmqzWiROZiBRDtYBtjGu8E+ecpBpmM2s7FbYBJjOaot2ydEWmIOGmIPAmh40+k
         8RfiauhpLcVS3TYtagNt7bSkTM/kA+76yJ1RaDB/UFFbvmD94HN6SyF9eOoSky53JY/p
         OrEJdJq/Nra0zYCJmmsAkt91V3CD5aKDYy1dLskG3YgZfX451/ejWNaj40CAA8ug8bea
         B7tku7IS+J87ac2a62J1fr6mTcS/w5W8W+o5GGJcYmlhRMv/k6gIo6fD6aamdMQkx1Xg
         NuQade32t0zB7E21R2oa8xNJh4gPmJJpqyLBjjr0d9ISFESUEvHagR3A4vTdWdAfPmaJ
         SNbA==
X-Gm-Message-State: AOAM530MERz6xxFXiRzcD5iI5lV+V3Svje9tAGYDI12ynRstshmQaBRT
	WJjYMg1WWO+edOECZqcpzBE=
X-Google-Smtp-Source: ABdhPJyEWcK3+W6zrt9+ySBP74aRlVs5TxjJlqDBCC8y4/GJbSD9dwvsq93BFLmm0EqEvTtZlBICUw==
X-Received: by 2002:aca:dcc6:: with SMTP id t189mr262220oig.9.1617753118768;
        Tue, 06 Apr 2021 16:51:58 -0700 (PDT)
Received: from [192.168.0.100] (adsl-074-188-247-202.sip.asm.bellsouth.net. [74.188.247.202])
        by smtp.gmail.com with ESMTPSA id m16sm4913735otj.11.2021.04.06.16.51.57
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Tue, 06 Apr 2021 16:51:58 -0700 (PDT)
Subject: Re: [gentoo-user] Cron and disabling emails for one script only
To: gentoo-user@lists.gentoo.org
References: <0c318816-b4ad-3e3f-cbed-057b142a37bd@gmail.com>
 <m3lf9vb2xz.wl-covici@ccs.covici.com>
From: Dale <rdalek1967@gmail.com>
Openpgp: preference=signencrypt
Autocrypt: addr=rdalek1967@gmail.com; prefer-encrypt=mutual; keydata=
 mQINBFxc7MgBEAC+zrgEdqJJiDe/UDAB+ScmferXWfJTVjbVT2T4DQ7jiLrgP9aNUo1HioNF
 mrU3JPOCR32gvZyTbY1+niO5+VSo/+pSqQ785h6ZDj1klMkrg6tEzGnf2MNBpBj4houZwxQ+
 WDKKTg2M9F+lv8wTIdR/JQn+hSviktLMtrghQlyLhpapsLXWLA6gMFebpQYwxUwemvan8ddX
 lQvJe9FGyFYvBi0dp1gl10F2O+DVZJxvX8xkX+yImVlhVJiC31gXHRcj+Qlo7gprlU7TIieF
 Uow6/ZvYKJ26pztVdFCg5w0rMJkF/x8Zd4A6wnuptiAPmWaQ1+YKgYDonbDUgwqFSx5/lN5z
 DGZ4LlioxeUTTPVvZsqBIeDz6jNFA583OYbo1/S26dqrvTFf2DKlsvoDpVfAhNlwJPjoixs0
 X3FNqPv+M10n4kq5Iz7Q9E3O4s/nfFIYGocEslVka7zZPkXSaHbsn+KJlY8XV6qxtCEdh0/V
 XX1+1aU2J74M0JikWhpwxTZ1dP5aOyWSPPEgFFIRW6xwwC02SoRH9a7mggfGYp/YjPlONNaT
 SCL8sgRfvmq3D0XTbLyTjSbExxkfKDmbePQagawDE3TlI/oivHf1JaAcbwMb3LZuU4TGcOIl
 5D+x7q0MUIeCop0ZFOwAnqW3AVVNvsBkv2KN+IHJryWAf0/iMQARAQABtBtEYWxlIDxyZGFs
 ZWsxOTY3QGdtYWlsLmNvbT6JAk4EEwEIADgWIQTZ7suruPBaS60bCYXvEM/XWu+ZnAUCXFzs
 yAIbIwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRDvEM/XWu+Z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1PowUm1z9DK5/O0
 Yg+gpDnEOOFI7WM5u7a7FSM2Z/LXGVwel/0eWvLk9tN6
Message-ID: <dc3f0498-a2dd-0b57-73cf-6939439267f2@gmail.com>
Date: Tue, 6 Apr 2021 18:51:56 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Firefox/60.0 SeaMonkey/2.53.7
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
In-Reply-To: <m3lf9vb2xz.wl-covici@ccs.covici.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Archives-Salt: cbc4571c-bad7-461d-a8db-47268db17b54
X-Archives-Hash: 80d91d47f77ca22d5a46a757feddf3b3

John Covici wrote:
> On Tue, 06 Apr 2021 13:43:31 -0400,
> Dale wrote:
>> Howdy,
>>
>> I set up a hard drive to backup my emails, world file, /etc and a couple
>> other things.  I been doing it manually but finally set up a cron job to
>> run it automatically.  I call it a script but some may laugh at me
>> calling it that.  Anyway, I got cron to run it just fine.  It runs and
>> copies it over just like it should.  I set it to do that each hour. 
>> Thing is, it sends a email every time it does it.  I don't mind a email
>> if there is a error but don't want one if it runs successfully.  This is
>> the cron file I set up.  It's placed in the hourly directory.
>>
>>
>> #!/bin/bash
>> /root/mail-backup > /dev/null 2>&1 || true
>> # >/dev/null 2>&1
>>
>>
>> I got a lot of hits doing a google search and the only thing I see is to
>> direct it to /dev/null.  From examples I've seen, this should work.  I
>> then ran across the one currently up there with true in it.  I don't
>> understand that but tried it anyway.  It still sends emails.  I also
>> tried the one commented out below that as well.  Still emails. 
>>
>> Keep in mind, I do not want to disable ALL emails, just this one
>> script.  How does one disable emails for this one cron job?  Do I have a
>> typo or putting it in wrong place maybe?  Everything I found shows this
>> should work but obviously I'm doing something wrong.  Again, error
>> emails are fine.  I don't want successful runs tho. 
>>
>> Thanks much.
> I think you have to do it in your actual backup script or put the
> whole thing in the hourly directory putting >/dev/null at the end of
> each rsync command, but leaving off the 2>&1, so you will get error
> messages.
>


This seems to be working.  Since I added the null bit to the script
itself, it hasn't sent a email.  I don't know if it will if it fails but
I still have weekly backups as well. 

It seems I had the right option, just put it in the wrong place.  I
figured it would be something like that. 

Thanks to all.

Dale

:-)  :-)