describing my specific case; on our centOS 6.6 final servers , I've installed yum-cron, in order to schedule a check every night if there are updates from the active repositories. I preferred to avoid the auto-installation, also following is the snippet of config file : /etc/sysconfig/yum-cron :# Pass any given paramter to yum, as run in all the scripts invoked# by this package.  Be aware that this is global, and yum is invoked in# several modes by these scripts for which your own parameter might not# be appropriateYUM_PARAMETER=# Don't install, just check (valid: yes|no)CHECK_ONLY=yes# Check to see if you can reach the repos before updating (valid: yes|no)CHECK_FIRST=noAt the beginning I've configured also the MAILTO parameter, in order to receive the notification email externally (eg.: phil@gmail.com), but some week later I've started thinking it was not a really good practice to send out via email information about installed packages, also I modified MAILTO parameter in order to keep these info inside the server, like this: # by default MAILTO is unset, so crond mails the output by itself# example:  MAILTO=rootMAILTO=rootThe only remaining problem, is that it is not very handy to go check internal email everytime, without know if there are updates. For this reason I was thinking if it somebody knows a way to send an external notification to phil@gmail.com (eg: user root @ server A received an internal email) without saying any other informationThanks in advance for any suggestion
Postfix - external email notification when an internal email is received
email;postfix
Check if the mailbox file for root (possibly /var/mail/root) is more recent than that of a file touched by the previous check. If so, generate a mail. Regardless, touch the last-checked file. Run this script from cron.#!/bin/shFILE_TO_CHECK=/var/mail/rootLAST_RUN_FILE=/root/.mailboxcheckif [ $FILE_TO_CHECK -nt $LAST_RUN_FILE ]; then  echo file is newer, hoorayfitouch $LAST_RUN_FILEAnother option would be to collect the mail spools somewhere (e.g. via rsync) and then have a webpage or some other sort of dashboard showing that collected information.