I have several RHEL 6 servers that I have configured yum-cron to run on. I have configured them to send email output to my address. The problem is that all but one of the servers are still delivering mail to root. I'm certain I have missed something simple, but for the life of me figure out what. Any suggestions?
In the configs and logs below, ServerOne is delivering messages to the correct address and ServerTwo is not.
Here is the maillog from ServerOne:
May 11 04:51:43 ServerOne postfix/pickup[31719]: 8093C29EBD5: uid=0 from=<root>
May 11 04:51:43 ServerOne postfix/cleanup[53080]: 8093C29EBD5: message-id=<20160511095143.8093C29EBD5@serverone.something.com>
May 11 04:51:43 ServerOne postfix/qmgr[6134]: 8093C29EBD5: from=<ServerOne@something.com>, size=29582, nrcpt=1 (queue active)
May 11 04:51:44 ServerOne postfix/smtp[53089]: 8093C29EBD5: to=<me@somethingelse.com>, relay=10.1.0.7[10.1.0.7]:25, delay=1.2, delays=0.29/0.01/0.01/0.9, dsn=2.6.0, status=sent (250 2.6.0 <20160511095143.8093C29EBD5@serverone.something.com> [InternalId=6452520] Queued mail for delivery)
May 11 04:51:44 ServerOne postfix/qmgr[6134]: 8093C29EBD5: removed
Note the recipient address of me@somethingelse.com. Now, here is the maillog from ServerTwo:
May 10 03:55:13 ServerTwo postfix/pickup[27828]: 0A93C29F4AA: uid=0 from=<root>
May 10 03:55:13 ServerTwo postfix/cleanup[36376]: 0A93C29F4AA: message-id=<20160510085513.0A93C29F4AA@servertwo.something.com>
May 10 03:55:13 ServerTwo postfix/qmgr[5934]: 0A93C29F4AA: from=<ServerTwo@something.com>, size=15519, nrcpt=1 (queue active)
May 10 03:55:13 ServerTwo postfix/cleanup[36376]: 2EBA629F07B: message-id=<20160510085513.0A93C29F4AA@servertwo.something.com>
May 10 03:55:13 ServerTwo postfix/qmgr[5934]: 2EBA629F07B: from=<ServerTwo@something.com>, size=15685, nrcpt=1 (queue active)
May 10 03:55:13 ServerTwo postfix/local[36378]: 0A93C29F4AA: to=<root@servertwo.something.com>, orig_to=<root>, relay=local, delay=0.27, delays=0.19/0.06/0/0.02, dsn=2.0.0, status=sent (forwarded as 2EBA629F07B)
May 10 03:55:13 ServerTwo postfix/qmgr[5934]: 0A93C29F4AA: removed
May 10 03:55:13 ServerTwo postfix/smtp[36379]: 2EBA629F07B: to=<ServerTwo@something.com>, orig_to=<root>, relay=10.1.0.7[10.1.0.7]:25, delay=0.27, delays=0.02/0.06/0.01/0.18, dsn=2.6.0, status=sent (250 2.6.0 <20160510085513.0A93C29F4AA@servertwo.something.com> [InternalId=6432387] Queued mail for delivery)
and note the recipient address of root@servertwo.something.com.
So here is my yum-cron file for ServerOne:
YUM_PARAMETER="--security"
CHECK_ONLY=no
CHECK_FIRST=no
DOWNLOAD_ONLY=no
ERROR_LEVEL=1
DEBUG_LEVEL=1
RANDOMWAIT="1"
MAILTO="me@somethingelse.com"
SYSTEMNAME="Server One"
CLEANDAY="0"
SERVICE_WAITS=yes
SERVICE_WAIT_TIME=300
and here is the yum-cron for ServerTwo:
YUM_PARAMETER="--security"
CHECK_ONLY=no
CHECK_FIRST=no
DOWNLOAD_ONLY=no
ERROR_LEVEL=1
DEBUG_LEVEL=1
RANDOMWAIT="1"
MAILTO="me@somethingelse.com"
SYSTEMNAME="Server Two"
CLEANDAY="0"
SERVICE_WAITS=yes
SERVICE_WAIT_TIME=300
Here is the postfix main.cf file for ServerOne:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = serverone.something.com
mydomain = something.com
inet_interfaces = localhost
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
relayhost = 10.1.0.7
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sender_canonical_maps = hash:/etc/postfix/canonical
And here is the main.cf for ServerTwo:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = servertwo.something.com
mydomain = something.com
inet_interfaces = localhost
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
relayhost = 10.1.0.7
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sender_canonical_maps = hash:/etc/postfix/canonical
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
Finally, the postfix canonical file from ServerOne:
root@something.com ServerOne@something.com
@something.com ServerOne@something.com
root@serverone.something.com ServerOne@something.com
and postfix/canonical from ServerTwo:
root@something.com ServerTwo@something.com
@something.com ServerTwo@something.com
root@servertwo.something.com ServerTwo@something.com