Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to disable scripts in /etc/cron.d to send mail to postmaster?


    i found out that scripts i have in /etc/cron.d sents alot of emails to postmaster local server mailbox but that account dont exist or is disabled i think

    the message:

    Return-Path: <>
    Received: (qmail 20156 invoked by alias); 4 Apr 2014 14:43:32 -0000
    Received: (qmail 20143 invoked by uid 0); 4 Apr 2014 14:43:32 -0000
    Date: 4 Apr 2014 14:43:06 -0000
    Message-ID: <>
    From: (Cron Daemon)
    Subject: Cron <root@vps> run-parts /etc/cron.hourly
    Content-Type: text/plain; charset=ANSI_X3.4-1968
    Auto-Submitted: auto-generated
    X-Cron-Env: <SHELL=/bin/bash>
    X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
    X-Cron-Env: <MAILTO=root>
    X-Cron-Env: <HOME=/>
    X-Cron-Env: <LOGNAME=root>
    X-Cron-Env: <USER=root>

    So i want to ask its linux cron default thing to send mail to this mailbox when an script in cron.d is run?

    How i can disable it and sent mail example on error or not at all? thx

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Tucson AZ
    Simple explanation at the link below:

  3. #3
    No that dont works for me, i already tried to set MAILTO, but dont send anything, question remains.

  4. $spacer_open
  5. #4
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Woodshed, CA
    When cron starts a process, it captures any output that reaches stdout and stderr, and sends that in an email. To prevent these emails, you can re-direct the stdout and stderr, either to a logfile that you monitor, or /dev/null, if you don't care.

    17 * * * * root cd / && run-parts --report /etc/cron.hourly 2>&1 > /dev/null
    A lion does not lose sleep, over the opinion of sheep.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts