By default scheduled reports are sent from email@example.com. In some cases this might cause problems with e-mail delivery. There are two approaches to change the sender address: Change it in reports.php or rewrite the sender address with Postfix.
Option 1 (reports.php)
Open /opt/monitor/op5/ninja/application/config/reports.php in an editor and change this:
$config['from_email'] = '';
$config['from_email'] = 'firstname.lastname@example.org';
Now your reports should have "email@example.com" as sender address. You don't need to restart anything afterwards.
Note that this file might be overwritten during updates.
Option 2 (rewrite with Postfix)
Open /etc/postfix/main.cf in an editor and add this at the bottom of the file:
smtp_generic_maps = hash:/etc/postfix/generic
Make sure to set mydomain and myorigin as follows (change the domainname):
mydomain = op5.com
myorigin = $mydomain
Edit /etc/postfix/generic and add this at the bottom (replace the e-mail address):
Hash the file:
# postmap /etc/postfix/generic
# service postfix restart # EL6
# systemctl restart postfix # EL7
# mon restart
Note that this will not change the message content saying "Scheduled report sent from..."
Please sign in to leave a comment.