Providing reliable services since 2001

Custom Search

10 Mar 2010 09:10 am GMT +8

Home > Resources > Scripts & Patches > Mailfront Plugin Rblcheck

Introduction
This plugin provides an ability for rejecting/deferring/tagging messages based on $RBLCHECK environment variable. $RBLCHECK is set by patched rblsmtpd if the sender's IP is listed.

IMPORTANT: This plugin is written for and tested with mailfront 1.12.


Environment Configuration
$RBLCHECK_REJECT
If set, messages will be rejected with code 554.
$RBLCHECK_DEFER
If set, messages will be deferred with code 451.
$RBLCHECK
Do not set this environment variable as this is set by using patched rblsmtpd. You need to patch ucspi-tcp-0.88/rblsmtpd.c with the combined patch (ucspi-tcp-0.88-rblsmtpd.c-combined.patch) provided in this package.

Sender Action
None

Recipient Action
None

Data Action
When client starts to transmit data, this plugin will start its checking for $RBLCHECK environment variable. If $RBLCHECK is not empty, the message will be rejected or deferred or tagged.

If $RBLCHECK_REJECT is set, message will be rejected with code 554.

If $RBLCHECK_DEFER is set, message will be deferred with code 451.

If $RBLCHECK_REJECT and $RBLCHECK_DEFER not set, the following line will be added to the message header:

X-RBL-Check: rbl1 rbl2 rbl3


If you run rblsmtpd -l zen.spamhaus.org -l rbl.spamcop.net -l dnsbl.njabl.org -l cbl.abuseat.org -l dnsbl.sorbs.net -l accredit.habeas.com -l plus.bondedsender.org -l iadb.isipp.com, rblsmtpd set the $RBLCHECK environment variable with zen.spamhaus.org cbl.abuseat.org means the sender's IP is listed at zen.spamhaus.org and cbl.abuseat.org RBL database:

X-RBL-Check: zen.spamhaus.org cbl.abuseat.org


If sender is authenticated or $RELAYCLIENT environment variable is set, then this plugin will be skipped.


Message Action
None

Requirements
» mailfront version 1.12
» bglibs version 1.104 or later (might work with earlier version)
» patch ucspi-tcp-0.88 with ucspi-tcp-0.88-rblsmtpd.c-combined.patch provided

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"

Mailfront Plugins Configuration
Place rblcheck in mailfront's plugin list. Depending on your setup:

» edit the smtpfront-qmail shell script and place the string rblcheck after add-received
» edit the PLUGINS environment variable and place the string rblcheck after add-received
» place the argument rblcheck after the add-received of the mailfront command

Set up environment as described in Environment Configuration above or plugin-rblcheck.html which is included in the package.

Copyright & Disclaimer
This package is Copyright(C) 2010 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.

YOU ARE FREE TO USE THIS SCRIPT/PATCHES/GUIDE BUT I AM NOT RESPONSIBLE FOR ANY DAMAGE CAUSED! YOU HAVE BEEN WARNED!!!


Changes
29 Jan 2010 GMT +8 : version 0.01
Initial release

Download
» mailfront-plugin-rblcheck-0.01.tar.gz : 88bfd7b820d2ce5ff412ccaa3e7ebc2a (md5sum)

All trademarks, trade names, service marks and logos referenced herein belong to their respective companies.

Copyright © 2001 - 2009, CHOON.NET. All rights reserved.