The Sophos Community will be offline for scheduled maintenance this Saturday, May 27th, at 13:00 UTC for approximately 1 hour. Apologies for any inconvenience caused.
"Wanna" ransomware outbreak. Please see this Sophos article sophos.com/kb/126733 for advice on how to protect your organization. Immediate action recommended.
PureMessage for UNIX log files must be periodically cleared to avoid using too much disk space. PureMessage for UNIX includes a sample configuration file, logrotate.conf. This can be used to set the parameters for 'rotating' (i.e., archiving) the contents of the PureMessage log files.
The logrotate utility is a standard Linux component. It is also available for other UNIX platforms.
These notes provide a generic example of how to use logrotate. Adapt them to suit your environment and operating system. Refer to your operating system documentation for more information about logrotate. Log rotation is a standard maintenance task on UNIX systems, and is therefore outside the realm of PureMessage support.
Logrotate usually runs as a daily cron job in /etc/cron.daily. It can also be configured to run at set times, or when logs reach a specified size. Log rotation frequency depends on the volume of processed mail and reporting requirements (archived data from log files is no longer included in PureMessage's pre-defined reports).
Log rotation parameters are determined by the configuration of the /opt/pmx6/etc/logrotate.conf configuration file, and the parameters configured for individual PureMessage log files. Parameters for individual log files are stored by default in the /opt/pmx6/etc/logrotate.d directory, and include a configuration file for both the system log (pmx_log) and the message log (message_log), among others. The log configuration files (pmx_log, etc) are imported into the (logrotate.conf) configuration via the 'include /opt/pmx6/etc/logrotate.d' statement in the logrotate.conf file.
The logrotate.d directory contains configuration files for the following logs:
You can specify frequency and backlog settings globally in the logrotate.conf file, or individually for each log file in the sample pmx_log and message_log configuration files. The logrotate documentation for your operating system will include information about parameters.
The logrotate utility can be run as a scheduled job owned by the PureMessage user (by default, "pmx"). In the PureMessage Manager, create a new scheduled job. Enter /path/to/logrotate for the command. Add a description, and use the scroll boxes to configure how often the logs will be rotated.
Alternatively, from the command line, create a file named pmx-logrotate.conf in /opt/pmx6/etc/scheduler.d, and add an <event logrotate> section. For example: <event logrotate> desc = "Rotate PureMessage Logs" enabled = 1 type = exec action = '/usr/local/sbin/logrotate /opt/pmx6/etc/logrotate.conf' <when> s = 0 m = 0 h = 3 </when> </event>
<event logrotate> desc = "Rotate PureMessage Logs" enabled = 1
type = exec action = '/usr/local/sbin/logrotate /opt/pmx6/etc/logrotate.conf' <when> s = 0 m = 0 h = 3 </when> </event>
On some platforms, the default location of the state file for the system will be in a directory for which the PureMessage user has no rights. If so, specify an alternate state file, by inserting the following string in the logrotate command (before the specification of the .conf file):
Every comment submitted here is read (by a human) but we do not reply to specific technical questions. If you need technical support please post a question to our community. Alternatively for licensed products open a support ticket.