digital-scurf wiki Teer Grube

[[Undefined wiki-command: pagecontents]]

Basic usage


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

Basic state for a given connection

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