Please see below. I've replaced the sensitive data with xxxx. I had the following in my ossec.conf prior to this upgrade. I was running the 2.8 install that was released not along ago.
Here are the entries I had for email prior to the failed 2.8.1 sed line below. It might related to how I commented out the "email no", and then created the other global block below it. Just wanted to ensure that I receive any new entries in ossec.conf before I re-edit.
xxxx@xxxx:~/togit$ dpkg -l | grep ossec
iF ossec-hids-server 2.8.1-ubuntu10securityonion8 Open Source Security, Host-Based Intrusion Detection System
ii securityonion-ossec-rules 20120726-0ubuntu0securityonion3 This package installs the Security Onion rules for OSSEC.
ii securityonion-sguil-agent-ossec
<ossec_config>
<global>
<!-- <email_notification>no</email_notification> -->
<logall>yes</logall>
</global>
<global>
<email_notification>yes</email_notification>
<smtp_server>XXX.XXX.XXX.XXX</smtp_server>
<email_to>xx...@xxxx.com</email_to>
<email_from>xx...@xxxx.com</email_from>
<email_maxperhour>50</email_maxperhour>
</global>
<email_alerts>
<rule_id>100109</rule_id>
<email_to>xx...@xxxx.com</email_to>
</email_alerts>
<email_alerts>
<rule_id>18222</rule_id>
<email_to>xx...@xxxx.com</email_to>
</email_alerts>
<email_alerts>
<rule_id>18222</rule_id>
<email_to>xx...@xxxx.com</email_to>
</email_alerts>
Setting up ossec-hids-server (2.8.1-ubuntu10securityonion8) ...
Installing new version of config file /etc/ossec-init.conf ...
It appears you had enabled email notification in OSSEC.
Enabing email notification and importing email settings.
smtp_server: XXX.XXX.XXX.XXX
email_from: x...@xxxx.com
email_to: xx...@xxxxx.com
xx...@xxxxx.com
xx...@xxxxx.com
xx...@xxxxx.com
sed: -e expression #1, char 63: unterminated `s' command
dpkg: error processing ossec-hids-server (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up libmagic1 (5.09-2ubuntu0.5) ...
Setting up file (5.09-2ubuntu0.5) ...
Setting up openssl (1.0.1-4ubuntu5.18) ...
Setting up python-greenlet (0.3.1-1ubuntu5.1) ...
Setting up python-gevent (0.13.6-1ubuntu1) ...
Setting up securityonion-bro-scripts (20121004-0ubuntu0securityonion38) ...
Setting up securityonion-onionsalt (20140917-0ubuntu0securityonion17) ...
Setting up securityonion-setup (20120912-0ubuntu0securityonion122) ...
Checking to see if /etc/nsm/pulledpork/pulledpork.conf exists.
Checking /etc/nsm/pulledpork/pulledpork.conf to see if Snort VRT ruleset is enabled.
Snort VRT ruleset is NOT enabled in /etc/nsm/pulledpork/pulledpork.conf, so no changes necessary.
Setting up securityonion-sostat (20120722-0ubuntu0securityonion31) ...
Setting up securityonion-suricata (2.0.4-0ubuntu0securityonion1) ...
Setting up securityonion-web-page (20120722-0ubuntu0securityonion25) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for python-support ...
Errors were encountered while processing:
ossec-hids-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Thanks!
Scott F.