PowerMTA, FluentD and Octeth Bounce Processing

PowerMTA, FluentD and Octeth Bounce Processing

PowerMTA, FluentD and Octeth Bounce Processing

Installation

Install Fluentd to process PowerMTA Logs and post them to Oempro.

  • Reference

Run ulimit -n and if the result is 1024, increase maximum number of file descriptors to 65536:

If your console shows 1024, it is insufficient. Please add the following lines to your /etc/security/limits.conf file and reboot your machine:

root soft nofile 65536
root hard nofile 65536
* soft nofile 65536
* hard nofile 65536

Reboot the server:

reboot

Install Fluentd Ubuntu package by following instructions here.

# Install packages
apt update
apt install gcc make ruby ruby-dev

# Install Fluentd Gem
gem install fluentd --no-doc

Run the following commands to verify the Fluentd installation:

# Setup the fluentd directory and initial configuration
fluentd --setup /etc/fluent

# Run and test
cd /etc/fluent/
fluentd -c /etc/fluent/fluent.conf -vv &
echo '{"json":"message"}' | fluent-cat debug.test

Use kill to stop the test fluentd process.

Boot Setup

The Fluentd gem does not come with /etc/init.d/ scripts. To ensure Fluentd starts on system boot, we need to create a systemd service file for Fluentd:

  1. Create a new service file for Fluentd:
vi /etc/systemd/system/fluentd.service
  1. Paste the following into the file:
[Unit]
Description=Fluentd data collector
After=network.target

[Service]
User=root
ExecStart=/usr/local/bin/fluentd -c /etc/fluent/oempro.conf --under-supervisor
Restart=always

[Install]
WantedBy=multi-user.target

You can learn the actual path of fluentd by executing which fluentd.

  1. Save and close the file.
  2. Reload the systemd daemon to read the new file:
systemctl daemon-reload
  1. Enable Fluentd to start on boot:
systemctl enable fluentd
  1. You can start Fluentd immediately without rebooting by running:
systemctl start fluentd
  1. To check the status of the Fluentd service, you can run:
systemctl status fluentd

This will ensure that Fluentd starts automatically whenever your system boots up.

Configuration

First, make sure that PowerMTA logs properly. Edit the /etc/pmta/config file and make sure that the following directive exists:

The /etc/fluentd/oempro.conf content should be set to:

In order to monitor stdout of Fluentd, run this command:

journalctl -u fluentd -f

On this page

  • PowerMTA, FluentD and Octeth Bounce Processing
  • Installation
  • Boot Setup
  • Configuration
💠
image

Homepage Customer Area Community Portal Contact Us

Footer Social Icons

©Copyright Octeth, Inc. All rights reserved.