Rev 12 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
---
outpath: /path/to/unprocessed/email
logFile: /path/to/log/file/errors.log
datapath: /path/to/root/of/reports
unprocessed_path: unprocessed
getMailScript: getSysinfoMail.php
processMailScript: parse_sysinfo.php
reportScript: sendReport.pl
servers:
- servername: smtp.server.or.ip
port: 143
ssl: false
mailbox: mailbox.name
username: username
password: password
deleteProcessed: false
enabled: false
- servername: smtp.server.or.ip
port: 143
ssl: false
mailbox: mailbox.name
username: username
password: password
deleteProcessed: false
enabled: false
database:
databaseServer: localhost
databaseUsername: dbuser
databasePassword: dbpass
database: dbname
sendReport:
emailScript: /opt/sendEmail/sendEmail.pl
mailTo: who@gets.mail
mailServer: smtp.server.com:587
mailSubject: Sysinfo Report
mailFrom: sysinfo@mydomain.org
logFile: /tmp/mail.log
tls: '''auto'''
smtpUser: smtp@user.com
smtpPass: password
bodyContents:
xml:
startTag: \<sysinfo
endTag: \<\/sysinfo[^>]*\>
eval: return(json_decode(json_encode((array)simplexml_load_string($body)),1));
yaml:
startTag: \-\-\-
endTag: \.\.\.
eval: return( yaml_parse( $body, 0 ) );
ini:
startTag: \[sysinfo version\]
endTag: ""
eval: |-
$data = array();
preg_match( '/\[report date\](.*)[\r\n]/', $body, $_date );
preg_match( '/\[client name\](.*)[\r\n]/', $body, $_client );
preg_match( '/\[hostname\](.*)[\r\n]/', $body, $_host );
$data['report']['date'] = str_replace(array("\n", "\r"), '', $_date[1]);
$data['report']['client'] = str_replace(array("\n", "\r"), '', $_client[1]);
$data['system']['hostname'] = str_replace(array("\n", "\r"), '', $_host[1]);
return $data;
...