...
Email Reports (optional, requires reports to be configured)
NOTE: Emailing reports DOES NOT work with auth mode "apache". Authentication must run through opmantek code, all other auth methods work, eg: htpasswd, ldap, etc.
Install phantomjs
- Download it from http://phantomjs.org/
- Untar it, move it to /usr/local
- create a sym link to /usr/local/phantomjs, eg. ln -s phantomjs-1.9.2-linux-x86_64/ phantomjs
- Open /usr/local/opmantek/conf/opFlow.nmis, make sure this line 'phantomjs_executable' => '/usr/local/phantomjs/bin/phantomjs' is valid and points to the executable
- Ensure auth mode is not set to apache in nmis8/conf/Config.nmis, 'auth_method_1' => , also make sure auth is removed from apache config file 01opmantek.conf, and restart apache if necessary.
Configure the email section of conf/opFlow.nmis
Code Block #the email section needs to be made valid 'email' => { 'mail_from' => 'open-audit_enterprise@yourdomain.com', 'mail_password' => 'your_password', 'mail_server' => 'smtp.yourdomain.com', 'mail_server_port' => 25, 'mail_subject_prefix' => '[mymagictag]', 'mail_use_tls' => 'true', 'mail_user' => 'your_user_account@your_domain.com' }, # example Gmail configuration: 'email' => { 'mail_from' => 'user@gmail.com', 'mail_password' => 'gmailPassword', 'mail_server' => 'smtp.gmail.com', 'mail_server_port' => 587, 'mail_subject_prefix' => '[Report]', 'mail_use_tls' => 'true', 'mail_user' => 'user@gmail.com' },
[OPTIONAL] If you would like hourly reports to be emailed, configure the EmailReportsHourly.sh file, then enable it to be run from opFlowReports-hourly.sh
Code Block vi /usr/local/opmantek/conf/EmailReportsHourly.sh # set email addresses # set sites # copy/paste code blocks for each site if that is how you want them sent out # create code block for specific reports if you don't want them all sent every time # then uncomment the line to run the EmailReportsHourly.sh script vi /usr/local/opmantek/bin/opFlowReports-hourly.sh ## Uncomment the line below to enable emailing hourly reports ## Run Emails $OMK/conf/EmailReportsHourly.sh # <- this line
- [OPTIONAL] If you would like daily reports to be emailed, follow the same steps as #2 BUT edit EmailReportsDaily.sh and opFlowReports-daily.sh
...