<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cron messages in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180719#M9508</link>
    <description>Hi everybody!&lt;BR /&gt;&lt;BR /&gt;I want to disable mail messages on linux.. my archives on /var/spool/mail are too bigs. how can i do that?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Mon, 02 Feb 2004 18:01:17 GMT</pubDate>
    <dc:creator>Edwin Ruiz_2</dc:creator>
    <dc:date>2004-02-02T18:01:17Z</dc:date>
    <item>
      <title>Cron messages</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180719#M9508</link>
      <description>Hi everybody!&lt;BR /&gt;&lt;BR /&gt;I want to disable mail messages on linux.. my archives on /var/spool/mail are too bigs. how can i do that?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 02 Feb 2004 18:01:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180719#M9508</guid>
      <dc:creator>Edwin Ruiz_2</dc:creator>
      <dc:date>2004-02-02T18:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cron messages</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180720#M9509</link>
      <description>I don't believe there's a global parameter to do this.  crond mails ANY output from a job called from within cron to the OWNER of the crontab where the job is listed.&lt;BR /&gt;So if a job has an output (stout or sterror) and the job is called from root's crontab, then root will get a mail message.&lt;BR /&gt;&lt;BR /&gt;HOWEVER, you can bypass this by redirecting outputs and errors to /dev/null.&lt;BR /&gt;&lt;BR /&gt;For every entry in cron, end it with &lt;BR /&gt;&amp;gt; /dev/null 2&amp;gt;&amp;amp;1.&lt;BR /&gt;&lt;BR /&gt;the above means redirect stout to /dev/null and send errors to the same place as stout.&lt;BR /&gt;for example, I have a script called mon_ps.  I have an entry like&lt;BR /&gt;00,15,30,45 * * * * /home/admin/bin/mon_ps &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;complications arise if you're using /etc/cron.daily , /etc/cron.hourly etc.  If you do, the only solution I can think of would be to move these files to a different location and call them via crontab</description>
      <pubDate>Mon, 02 Feb 2004 20:58:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180720#M9509</guid>
      <dc:creator>Ian Kidd_1</dc:creator>
      <dc:date>2004-02-02T20:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cron messages</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180721#M9510</link>
      <description>Like Ian said there must not be any output from the scripts you run from cron. You have to take care of the logging/rolling. &lt;BR /&gt;&lt;BR /&gt;However, you will still get mail messages.  You can forward root's messages to your own box by creating a .forward file in root's home. &lt;BR /&gt;&lt;BR /&gt;If your box is running fine these mails shouldnt get unmanageable unless you have a large number of machines to admin which is another story...</description>
      <pubDate>Mon, 02 Feb 2004 22:20:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180721#M9510</guid>
      <dc:creator>Olivier Drouin</dc:creator>
      <dc:date>2004-02-02T22:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cron messages</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180722#M9511</link>
      <description>You could also add a new job in cron.daily that empties the mailbox &lt;BR /&gt;&lt;BR /&gt;echo "" &amp;gt; /var/spool/mail/username&lt;BR /&gt;&lt;BR /&gt;where username is the user who gets too much mail.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Or you could create a dummy account that does not get mail (redirect to /dev/null) and send the cron messages to that account (see cron man page and the MAILTO environment variable).&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Feb 2004 01:13:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180722#M9511</guid>
      <dc:creator>Cristian Draghici</dc:creator>
      <dc:date>2004-02-03T01:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cron messages</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180723#M9512</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can also tune main messages source, which could be a good idea, to set up warnings to a higher level, so that you still get important messages from your services, and not all the dummy things that are just normal activity informations.&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;&lt;BR /&gt;J</description>
      <pubDate>Tue, 03 Feb 2004 03:05:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180723#M9512</guid>
      <dc:creator>Jerome Henry</dc:creator>
      <dc:date>2004-02-03T03:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cron messages</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180724#M9513</link>
      <description>cron will post a mail if a command it runs generates output on stdout or stderror. So if you don't want the mail, redirect those to a file or /dev/null, depending on whether you're interested in the messages. I would suggest redirecting stdout to /dev/null and stderr to a logfile or to your mail, because if a command gives errors, it probably needs human intervention.&lt;BR /&gt;&lt;BR /&gt;To clean up your /var/spool/mail, remove the files or empty them. Redirecting the null command is enough:&lt;BR /&gt;&amp;gt; /var/spool/mail/&lt;USERNAME&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/USERNAME&gt;</description>
      <pubDate>Tue, 03 Feb 2004 03:46:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180724#M9513</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2004-02-03T03:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cron messages</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180725#M9514</link>
      <description>You can downgrade the logging level in sendmail.cf to 0 if you want.  There should be a loglevel param you can adjust&lt;BR /&gt;&lt;BR /&gt;What you are better off doing however is this:&lt;BR /&gt;&lt;BR /&gt;tar cvf /var/log/maillog /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;replace the last part with a tape device or a filesytem&lt;BR /&gt;&lt;BR /&gt;then&lt;BR /&gt;&lt;BR /&gt;&amp;gt; /var/log/maillog&lt;BR /&gt;&lt;BR /&gt;That will zero it out.&lt;BR /&gt;&lt;BR /&gt;Its bad to stop sendmail logging.&lt;BR /&gt;&lt;BR /&gt;If this server is on the public internet this log is a critical audit trail in case someone tries to relay spam off your server.&lt;BR /&gt;&lt;BR /&gt;I have recently had a security flaw exploited in which cgi scripts were used to relay mail. This was done to aol and with the help of the maillog I was able to shut it down.&lt;BR /&gt;&lt;BR /&gt;If I'd had no maillog my only clue would have been aol stopping my mail acceptance, which they did TWO weeks after I shut off the spigot.&lt;BR /&gt;&lt;BR /&gt;I was able to prove to aol that it was an aol customer doing the exploit, submitted my logs and got off the black list.&lt;BR /&gt;&lt;BR /&gt;The point is simple. You need to have a maillog. You need to write a few scripts to scan it for warning signs so you can look at it&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Feb 2004 05:21:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-messages/m-p/3180725#M9514</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-02-03T05:21:09Z</dc:date>
    </item>
  </channel>
</rss>

