You may want to double-check that you see the alias in /etc/aliases.
Also, it wouldn’t hurt to take a peek at /var/log/maillog or /var/log/mail.log when the emails are being sent, as you can use those logs to track down where the emails are going.
The formatting of those lines above looks correct.
You may want to run the command “newaliases”, just to be certain the aliases database is up to date.
However, if you don’t see any attempts to send that user an email, you may need to start reviewing whether your cron job is running, and whether it’s generating the output you’re expecting.
There was a postalias: warning: /etc/aliases, line 106: need name:value pair error which I removed and rerun newaliases, but still nothing.
Also, a separate issue, but I cleared out all lines from /var/log/maillog but now it seems to not be updating it (there are no new entries) I have restart postfix - do I need to restart anything else?
Thank Eric. I have restarted syslog and it’s updating the log again.
I’ve sent an email from root, got it, and replied to it and that is working fine. Just nothing from cron. When sending an email to root, this is in the mail log:
Aug 3 17:53:19 rock postfix/local[21394]: 0DBEA1C80791: to=, orig_to=, relay=local, delay=0.08, delays=0.04/0/0/0.04, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Aug 3 17:53:19 rock postfix/qmgr[7327]: 0DBEA1C80791: removed
When I am running the cron I am hitting ‘run now’ and the output shows in the web browser but nothing is emailed. Is there any way to test/check that cron jobs are getting emailed?
EDIT: Stop press - it’s working! Not sure why, but it seems to be working now. Thanks for all your help Eric!!
its a simple test cron with echo “hello”. from the scheduled cron it returns output. but in the mail log, not sent out. also the error_log(“test123”) in the php also not logged. this is a fresh webmin servers with virtualmin installed. however before i install virtualmin, i hv chosen to install the apache from official released. its centos 6. wonder it has something to do with rights or php handler (webmin default)