Providing reliable services since 2001

Custom Search

04 Feb 2012 01:48 pm GMT +8

Home > Resources > Scripts & Patches > greetdelay

Introduction
greetdelay is a program to introduce a small delay before an SMTP greeting. It also enforce RFC 2821's recommendation that SMTP clients not send any commands before receiving the greeting message.

If RELAYCLIENT is set in environment variable, greetdelay will be skipped. Set environment variable GREETDELAY to any numberic value greater than 0 to enable greetdelay to wait for the set value before executing other program.

If SMTP clients send any commands during the greet delay period, "554 smtp protocol violation (#5.5.1)" will be responsed with "premature input on stdin" will be printed in stderr and exit with exit code 111.


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
24 Oct 2010 GMT +8 : Version 0.04
Includes Makefile, README, COPYING, AUTHORS and greetdelay-0.04.spec
Use Makefile to ease installation and uninstallation
08 Sep 2009 GMT +8 : Version 0.03
Fix the description
03 Sep 2009 GMT +8 : Version 0.02
Fix wait delay by checking the stdin first
02 Sep 2009 GMT +8 : Version 0.01
Initial release

Source
» greetdelay-0.04.tar.bz2 : fd452646ca6878731beed0b61dff09c6 (md5sum)

Requirements
» gcc
» make
» ucspi-tcp
» qmail

How to compile, install and use?
Please read the README file provided in this package which contains more information about doing custom installation and so on.

1. Download the source:

wget http://choon.net/opensource/greetdelay/greetdelay.tar.bz2 -P /usr/local/src

2. Unpack:

cd /usr/local/src/
tar jxvf greetdelay-0.04.tar.bz2

3. Compile:

cd greetdelay-0.04.tar.bz2
make

4. Install (default to prefix /usr/local):

make install

5. In your smtpd run file, place greetdelay before qmail-smtpd (assuming greetdelay and qmail-smtpd is in your PATH):

tcpserver -R -h 0 smtp greetdelay qmail-smtpd

6. Set environment variable GREETDELAY to any numberic value greater than 0 and export it in smtpd run file if you want to enable greetdelay globally or set it in your smtpd tcpserver rules.



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

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