On Oct 01, 2010, at 11:41, Angus Robertson - Magenta Systems Ltd wrote:

> Has anyone built a component to queue email until an SMTP relay server is
> available?  

        A few years ago I built a Mail Queue Service (I called SMailQ).  This 
wasn't a queuing component, but an entire queueing service for SMTP clients to 
connect and drop messages for sending to an SMTP server.

        It included a client component based on ICS that would interface with 
the SMailQ service with a simple protocol to dump fully formed MIME messages.  
The SMailQ service would listen on a TCP port and queue messages on disk based 
on priority, and periodically scanned the queue directory to send any messages 
there.  It would also interrupt its scanning of lower priority messages when a 
higher priority message arrived, in order to process it first.

        It also used my own custom MIME library (based on the ones in ICS) to 
encode and decode the messages dynamically, one line at a time, as they were 
"streamed" to and from disk, instead of having to load them into memory 
completely first.

        It used a database to keep a message sending log (for auditing 
purposes) and attempted to recover from failures on restarting by scanning the 
queue directory.  It was blazingly fast and robust.

        This fully featured system may not be what you are looking for, but I 
can share some of the code if you are interested, and at least offer some ideas 
on how I solved certain problems.


To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to