Skip to content

Commit 136e726

Browse files
committed
Document OSSEC 4.1.0 SMTP TLS/auth and decoder field limits
Update the documentation on branch v4.1.0 to match ossec-hids 4.1.0 behavior: authenticated SMTP delivery, higher decoder order limits, and related release notes. - Add global ossec.conf options for SMTP auth/TLS (auth_smtp, secure_smtp, smtp_port, smtp_tls_verify, smtp_user, smtp_password, helo_server) and libcurl build requirements - Add manual page smtp-authenticated-email.rst with configuration examples; cross-link from existing email output guides - Document analysisd.decoder_order_size (default 256) and link from decoder.order - Document maild.max_workers; extend ossec-maild, install, and syscheck pages - Bump conf.py release to 4.1.0 and add changelog.rst 4.1.0 section - Add aes_encryption.rst to the manual notes toctree Signed-off-by: Scott R. Shinn <scott@atomicorp.com>
1 parent be8d98f commit 136e726

15 files changed

Lines changed: 333 additions & 14 deletions

changelog.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
Change Log
22
----------
33

4+
4.1.0 (2026/05/28 12:00 +00:00)
5+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6+
7+
- Stability and scalability release.
8+
- Added SMTP TLS and authentication support in ``ossec-maild`` and ``ossec-monitord`` (requires libcurl build).
9+
- Increased default decoder field limit (``analysisd.decoder_order_size``) to 256.
10+
- Increased maximum log message buffer (``OS_MAXSTR``) to 6144 to reduce truncation.
11+
- Improved IPv6 support in active-response whitelisting and ``install.sh``.
12+
- Added support for large files (>2GB) in file integrity monitoring and hash operations.
13+
- Added support for Rocky Linux 9.
14+
- Multiple bug fixes for ``analysisd``, ``logcollector``, FIM, and Windows agent stability.
15+
416
4.0.0 (2026/02/01 12:00 +00:00)
517
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
618

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
project = 'OSSEC'
1010
copyright = 'Atomicorp, Inc. 2025'
1111
author = 'Atomicorp'
12-
release = '4.0.0'
12+
release = '4.1.0'
1313

1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

docs/manual/installation/install-source-unattended.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ Example preloaded-vars.conf:
125125
# USER_EMAIL_SMTP defines the SMTP server to send the e-mails.
126126
#USER_EMAIL_SMTP="test.ossec.net"
127127

128+
# SMTP authentication and TLS (requires USE_CURL=yes at build; install.sh sets this automatically)
129+
#USER_SMTP_AUTH="y"
130+
#USER_SMTP_USER="user@example.com"
131+
#USER_SMTP_PASS="secret"
132+
#USER_SMTP_SECURE="n"
133+
#USER_SMTP_PORT="587"
134+
#USER_SMTP_TLS_VERIFY="y"
135+
128136

129137
# USER_ENABLE_SYSLOG enables or disables remote syslog.
130138
#USER_ENABLE_SYSLOG="y"
@@ -143,9 +151,9 @@ Example preloaded-vars.conf:
143151
#USER_PF_TABLE="ossec_fwtable"
144152

145153

146-
# USER_WHITE_LIST is a list of IPs or networks
147-
# that are going to be set to never be blocked.
148-
#USER_WHITE_LIST="192.168.2.1 192.168.1.0/24"
154+
# USER_WHITE_LIST is a list of IPs or networks (IPv4 or IPv6) that are never blocked
155+
# by active response.
156+
#USER_WHITE_LIST="192.168.2.1 192.168.1.0/24 2001:db8::1 2001:db8::/32"
149157

150158

151159
#### exit ? ###

docs/manual/installation/installation-requirements.rst

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,30 @@ libevent
6666
`libevent <http://libevent.org/>`_ was added for `ossec-agentd` and `ossec-maild`. A development package
6767
for this should be installed on the system.
6868

69+
libcurl
70+
-------
71+
72+
.. versionadded:: 4.1.0
73+
74+
`libcurl <https://curl.se/libcurl/>`_ is required to build SMTP authentication and TLS support in
75+
``ossec-maild`` and ``ossec-monitord``. Install the development package on the build host. The
76+
installer enables ``USE_CURL=yes`` automatically when SMTP auth, secure SMTP, a non-default port,
77+
or disabled TLS verification is selected.
78+
79+
If you compile manually and need authenticated or TLS SMTP, build with:
80+
81+
.. code-block:: console
82+
83+
make USE_CURL=yes
84+
6985
RedHat / Centos / Fedora / Amazon Linux
7086
---------------------------------------
7187

7288
Step 1) At a minimum, the following packages should be installed:
7389

7490
.. code-block:: console
7591
76-
yum install zlib-devel pcre2-devel make gcc sqlite-devel openssl-devel libevent-devel systemd-devel
92+
yum install zlib-devel pcre2-devel make gcc sqlite-devel openssl-devel libevent-devel libcurl-devel systemd-devel
7793
7894
Step 2) For optional database support add thepackage mysql-devel and/or postgresql-devel packages
7995

@@ -97,7 +113,7 @@ At a minimum, the following packages should be installed:
97113

98114
.. code-block:: console
99115
100-
apt-get install build-essential make zlib1g-dev libpcre2-dev libevent-dev libssl-dev libsystemd-dev
116+
apt-get install build-essential make zlib1g-dev libpcre2-dev libevent-dev libssl-dev libcurl4-openssl-dev libsystemd-dev
101117
102118
On Debian 10 Buster, `zlib` could be `libz`.
103119

docs/manual/notes/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Misc. Notes
55
.. toctree::
66
:maxdepth: 2
77

8+
aes_encryption
89
active_directory_failures
910
agentless_script
1011
checkpoint_configure

docs/manual/output/email-output.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ There are currently three types of email alerts:
1818

1919
.. toctree::
2020

21-
standard-email-output
21+
standard-email-output
22+
smtp-authenticated-email
2223
granular-email-output
23-
reports-email-output
24+
reports-email-output

docs/manual/output/granular-email-output.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ OSSEC allows very granular options for the e-mail alerting and its format (full
99
Note that there must be at least one <email_to> recipient mentioned in the <global>
1010
section of the configuration or no emails will be sent at all.
1111

12+
If your mail provider requires authentication or TLS, configure the ``<global>`` section as
13+
described in :ref:`manual-out-smtp-auth` before adding ``<email_alerts>`` entries.
1214

1315
.. include:: ../../examples/output/granular_email_examples.trst
1416

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
2+
.. _manual-out-smtp-auth:
3+
4+
SMTP authentication and TLS
5+
===========================
6+
7+
.. versionadded:: 4.1.0
8+
9+
Starting with OSSEC 4.1.0, ``ossec-maild`` and ``ossec-monitord`` can send email through SMTP servers
10+
that require authentication and TLS. This requires OSSEC to be built with libcurl (``USE_CURL=yes``).
11+
The installer sets this automatically when you enable SMTP authentication, secure SMTP, a custom port,
12+
or disable TLS certificate verification during ``install.sh``.
13+
14+
All options are configured in the ``<global>`` section of ``ossec.conf``. See :ref:`ossec_config.global`
15+
for the full syntax reference.
16+
17+
Build requirements
18+
------------------
19+
20+
Install libcurl development packages on the build host before compiling:
21+
22+
Red Hat family:
23+
24+
.. code-block:: console
25+
26+
yum install libcurl-devel
27+
28+
Debian / Ubuntu:
29+
30+
.. code-block:: console
31+
32+
apt-get install libcurl4-openssl-dev
33+
34+
If you build manually without ``install.sh``, pass ``USE_CURL=yes`` to ``make``:
35+
36+
.. code-block:: console
37+
38+
cd ossec-hids-*
39+
make USE_CURL=yes
40+
./install.sh
41+
42+
Submission port with STARTTLS (port 587)
43+
----------------------------------------
44+
45+
Typical configuration for providers that use authenticated submission with STARTTLS
46+
(``auth_smtp=yes``, ``secure_smtp=no``):
47+
48+
.. code-block:: xml
49+
50+
<ossec_config>
51+
<global>
52+
<email_notification>yes</email_notification>
53+
<email_to>alerts@example.com</email_to>
54+
<email_from>ossec@example.com</email_from>
55+
<smtp_server>smtp.example.com</smtp_server>
56+
<auth_smtp>yes</auth_smtp>
57+
<secure_smtp>no</secure_smtp>
58+
<smtp_port>587</smtp_port>
59+
<smtp_user>ossec@example.com</smtp_user>
60+
<smtp_password>your-secret-here</smtp_password>
61+
<smtp_tls_verify>yes</smtp_tls_verify>
62+
</global>
63+
<alerts>
64+
<email_alert_level>7</email_alert_level>
65+
</alerts>
66+
</ossec_config>
67+
68+
If ``smtp_port`` is omitted and ``auth_smtp`` is ``yes``, port **587** is used automatically.
69+
70+
SMTPS (implicit TLS, port 465)
71+
------------------------------
72+
73+
Use ``secure_smtp=yes`` when the server expects TLS from the first byte (SMTPS):
74+
75+
.. code-block:: xml
76+
77+
<ossec_config>
78+
<global>
79+
<email_notification>yes</email_notification>
80+
<email_to>alerts@example.com</email_to>
81+
<email_from>ossec@example.com</email_from>
82+
<smtp_server>smtp.example.com</smtp_server>
83+
<secure_smtp>yes</secure_smtp>
84+
<smtp_port>465</smtp_port>
85+
<smtp_user>ossec@example.com</smtp_user>
86+
<smtp_password>your-secret-here</smtp_password>
87+
</global>
88+
</ossec_config>
89+
90+
If ``smtp_port`` is omitted and ``secure_smtp`` is ``yes``, port **465** is used automatically.
91+
92+
Plain SMTP (port 25)
93+
--------------------
94+
95+
Legacy servers without authentication continue to work as before. Do not set ``auth_smtp`` or
96+
``secure_smtp`` unless the server requires them:
97+
98+
.. code-block:: xml
99+
100+
<ossec_config>
101+
<global>
102+
<email_notification>yes</email_notification>
103+
<email_to>alerts@example.com</email_to>
104+
<smtp_server>192.168.1.10</smtp_server>
105+
</global>
106+
</ossec_config>
107+
108+
Testing and restarting
109+
----------------------
110+
111+
Test the configuration without sending mail:
112+
113+
.. code-block:: console
114+
115+
# /var/ossec/bin/ossec-maild -t
116+
117+
Restart OSSEC after changing mail settings:
118+
119+
.. code-block:: console
120+
121+
# /var/ossec/bin/ossec-control restart
122+
123+
Unattended installation
124+
-----------------------
125+
126+
For unattended installs, set the following in ``etc/preloaded-vars.conf`` in addition to
127+
``USER_ENABLE_EMAIL``, ``USER_EMAIL_ADDRESS``, and ``USER_EMAIL_SMTP``:
128+
129+
.. code-block:: console
130+
131+
USER_SMTP_AUTH="y"
132+
USER_SMTP_USER="user@example.com"
133+
USER_SMTP_PASS="secret"
134+
USER_SMTP_SECURE="n"
135+
USER_SMTP_PORT="587"
136+
USER_SMTP_TLS_VERIFY="y"
137+
138+
See :ref:`install_source_unattended` for the full preloaded-vars example.
139+
140+
Security notes
141+
--------------
142+
143+
- Restrict permissions on ``ossec.conf`` because ``smtp_password`` is stored in plain text.
144+
- Avoid ``smtp_tls_verify=no`` in production; it disables certificate and hostname verification.
145+
- If ``smtp_server`` is a hostname, ensure name resolution works from ``/var/ossec/etc`` (copy
146+
``/etc/resolv.conf`` when needed).

docs/manual/output/standard-email-output.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ The destination email address and mail host should be configured inside the
1717
<global>
1818
<email_notification>yes</email_notification>
1919
<email_to>me@example.com</email_to>
20-
<smtp_server>mx.example.com..</smtp_server>
20+
<smtp_server>mx.example.com</smtp_server>
2121
<email_from>ossec@example.com</email_from>
2222
2323
Full details on all the options are available at :ref:`ossec_config.global`
2424

25+
If your mail provider requires authentication or TLS, see :ref:`manual-out-smtp-auth`.
26+
2527
.. note::
2628

2729
If the `smtp_server` entry contains a hostname, `/etc/resolv.conf` will probably have to be

docs/manual/syscheck/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ Quick facts
4848

4949
- The scans are performed slowly to avoid using too much CPU/memory.
5050

51+
* Are large files supported?
52+
53+
- Starting with OSSEC 4.1.0, files larger than 2GB can be monitored and hashed.
54+
5155
* How are false positives handled?
5256

5357
- Files can be ignored manually in the configuration or using rules. By default when a file has changed 3 times further changes are automatically ignored.

0 commit comments

Comments
 (0)