[[Undefined wiki-command: pagecontents]]
Basic usage
- Run this on an independant IP
- Set a domain's lowest priority MX to be that IP
- Leave the Teergrube to it
What it will do
The teergrube's job is basically to sit on SMTP connections for as long as seems sensible. By being very slow at responding to SMTP commands and using SMTP continuation responses wherever possible will improve our ability in this respect...
SMTP commands we'll recognise, and what to do
connect- Wait a period of time and say a 220 message backHELO/EHLO- Record the helo hostname if provided. reply with a 10 line result one second per lineMAIL FROM:- Accept it. Reply with a 20 line result, one second per line, starting after 10 secondsRCPT TO:- Accept it. Reply with a 30 line result, one second per line, starting 15 seconds laterDATA-- Accept it. Reply with one line after 30 secondsend of data-- reply with a4xxcode after 30 secondsRSET-- reply with one line after 20 secondsQUIT-- reply with a 40 line result, one second per line, after 20 seconds
Basic state for a given connection
- helo hostname provided?
- sender provided?
- in data?
- current prewait
- current wait_per_repeat
- current repeats left
- current code
- current message
Basic processing order for a connection
Every second, the following runs for active connections...
if prewait > 0 then prewait = prewait - 1 return end if repeats > 0 then repeats = repeats - 1 prewait = wait_per_repeat output( current_code .. "-@" .. repeats ) return end if( current_code > 0 ) then output( current_code .. " " .. current_message ) current_code = 0 return end -- Not waiting to send stuff, so let's read a line instead if( got_a_line ) then process according to the list above, setting prewait, repeats, wait_per_repeat, current_code and current_message appropriately end