Qmail
[Top] [All Lists]

Re: Yet another smtp delayer

To: qmail@list.cr.yp.to
Subject: Re: Yet another smtp delayer
From: Charles Cazabon <qmail@discworld.dyndns.org>
Date: Sat, 27 Jan 2007 10:37:24 -0600
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-qmail@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list qmail@list.cr.yp.to
In-reply-to: <1169913323.3709.14.camel@eden.idealworldinc.com>
Mail-followup-to: qmail@list.cr.yp.to
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
References: <1169913323.3709.14.camel@eden.idealworldinc.com>
User-agent: Mutt/1.5.11
Paul J. Park <paul@idealworldinc.com> wrote:
> 
> qmail-initcontrol - a helper program that looks up TCPREMOTEIP and
> TCPREMOTEHOST in a file-based map of regexps to delays.  This way,
> it's easy to reconfigure without having to recompile or restart the
> service.  It's also easy to add whitelisting to the map.

Eh?  You can do this already with no new tools.  Create a shellscript qsleep.sh:

  #!/bin/sh
  [ -n "${GREETDELAY}" ] && sleep "${GREETDELAY}"
  exec $@

Change /service/smtpd/run, inserting this script after tcpserver and before
qmail-smtpd:

  ... tcpserver [args] /path/to/qsleep.sh /var/qmail/bin/qmail-smtpd

Set GREETDELAY in your tcpserver rules wherever you want a delay:

  =example.org:allow,GREETDELAY="10" 
  127.0.0.1:allow
  :allow,GREETDELAY="30"

Charles
-- 
--------------------------------------------------------------------------
Charles Cazabon                               <qmail@discworld.dyndns.org>
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
My services include qmail consulting.  See http://pyropus.ca/ for details.
--------------------------------------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>