plugin-check-helo.so

A mailfront plugin to provide an ability to reject, defer or add it's helo
name checking results to message header.

Reference:
http://www.linuxmagic.com/best_practices/valid_helo_domain.html

IMPORTANT: This plugin is written for and tested with mailfront 2.00
(might work with earlier version).

* If $RELAYCLIENT or $HELO_CHECK_SKIP is set, this plugin will be skipped.
* If sender is authenticated, this plugin will be skipped also.
* If $HELO_CHECK_REJECT is set, sender will be rejected with reply code 554.
* If $HELO_CHECK_DEFER is set, sender will be deferred with reply code 421.
* NOTE: $HELO_CHECK_REJECT take preference of $HELO_CHECK_DEFER.
* If $HELO_CHECK_REMOTEHOST is set, this plugin will check helo name and
  remotehost whether both are the same otherwise add headers or defer or
  reject accordingly.
* If $HELO_CHECK_REMOTEIP is set, this plugin will check helo name A records
  and remoteip whether both are the same otherwise add headers or defer or
  reject accordingly.  If both are the same, add headers and skip the rest
  of the checks.
* If $HELO_CHECK_REMOTEIP_MATCH is set, this plugin will check the first 3
  octets of remoteip against helo name A records.  If there isn't a match, add
  headers or defer or reject accordingly.  If there is, add headers and skip
  the rest of the checks.
* If $HELO_CHECK_PTR is set, this plugin will make sure the PTR record
  resolves to the same given helo name.  If this is not set, this plugin will
  only check for PTR record of the given helo name's IP exists.
* If $HELO_CHECK_VERBOSE is set, this plugin will log its checking to stderr.
* If all the mentioned variables not set and sender is not authenticated, this
  plugin will add it's helo name checking in each message header.


Requirements:

- mailfront version 2.00 or later (might work with earlier version)
- bglibs version 1.104 or later (might work with earlier version)


Installation:

- Build and install mailfront
- Switch back to this package
- Adjust the contents of the conf-* files
- Build the sources by running "make"
- Install the plugin by running "make install"


Configuration:

Place check-helo in mailfront's plugin list. Depending on your setup
- edit the smtpfront-qmail shell script and place the string "check-helo"
  after "add-received"
- edit the PLUGINS environment variable and place the string "check-helo"
  after "add-received"
- place the argument "check-helo" after the "add-received" of the
  mailfront command

Set up environment as described in plugin-check-helo.html.


This package is Copyright(C) 2013 Giam Teck Choon or CHOON.NET,
and may be copied according to the GNU GENERAL PUBLIC LICENSE (GPL)
Version 2 or a later version.  A copy of this license is included with
this package.  This package comes with no warranty of any kind.
