Re: [twsocket] SMTP mail queue component?
- Original Message - From: "Angus Robertson - Magenta Systems Ltd" To: Sent: Monday, October 04, 2010 11:11 AM Subject: Re: [twsocket] SMTP mail queue component? >> > Has anyone built a component to queue email until an SMTP relay >> > server is available? >> >> Not yet, but it's probably no big deal to write one. >> It could be a simple two files per item approach. > > Simple is what I like, so I want to keep to one file per item, with all > queue or status information in another file, as I do with my MailMaint > POP3 tool. The intention is only to have a few mail items queued. > > Thanks for adding SMTP SendtoFile, presumably for exactly this concept? Yes, that was the idea. Actually I use some kind of a mail queue in one of my apps, but that isn't ready for the public. I prefered to queue an encoded, raw email rather than just the properties of TSmtpCli since file attachments might have changed in the meantime. The alternative would have been to copy file attachments to some temporary directory, but that's a mess. -- Arno Garrels -- 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
Re: [twsocket] SMTP mail queue component?
> > Has anyone built a component to queue email until an SMTP relay > > server is available? > > Not yet, but it's probably no big deal to write one. > It could be a simple two files per item approach. Simple is what I like, so I want to keep to one file per item, with all queue or status information in another file, as I do with my MailMaint POP3 tool. The intention is only to have a few mail items queued. Thanks for adding SMTP SendtoFile, presumably for exactly this concept? Angus -- 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
Re: [twsocket] SMTP mail queue component?
> 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. > 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. Thanks for the comments. Your tool does sound excellent, but is probably intended for heavier use than I envisage. I prefer to deliver a single executable application where possible, to keep installation and support simple. I really want to use standard ICS components as well. I will be making the queuing component or code openly available, but if you have any code you are happy to openly share I'm always happy to avoid rewriting stuff. Angus -- 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
Re: [twsocket] SMTP mail queue component?
On Sun, Oct 3, 2010 at 1:10 PM, Arno Garrels wrote: > Angus Robertson - Magenta Systems Ltd wrote: > > Has anyone built a component to queue email until an SMTP relay > > server is available? > > Not yet, but it's probably no big deal to write one. > It could be a simple two files per item approach. > One email file written to the queue directory with method > SendToFile so it can be resent as is with OwnHeaders and > TIcsStreamReader or from a TStringList later on, and one > info file containing related properties including MxIPs, > Port.. as well as a next retry value, last error etc.. > Both files would share the same filename with different > extensions. > > -- > Arno Garrels > > We use a similar approach in our disk cache--two same named files with different extensions. One of the files is the binary data file and other one is a TMemIniFile. If you are dealing with URLs and want to convert URL to a file name, don't bother with all the 8 Windows' non-file name characters--just SHA1-hash the url to consturct the file name. We also tried an ini file for writing the name of the files (index) to disk but this turned out to be a real pain/slow after a few thousand files since it scans all the previous records for the same namein name=value format of inis as it does not assume there are no duplicate names. So I wrote my own very simple format such as: [DiskCacheObjects] DiskCacheLastSize=5002345 ObjectsCount=3 ObjectURI-0=http://www.iqproxyserver.com ObjectURI-1=http://www.fastream.com/IQProxyServer.exe ObjectURI-2=http://www.intel.com So it's gotten quite mature now. Just FYI. Best Regards, SZ www.iqproxyserver.com -- 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
Re: [twsocket] SMTP mail queue component?
Angus Robertson - Magenta Systems Ltd wrote: > Has anyone built a component to queue email until an SMTP relay > server is available? Not yet, but it's probably no big deal to write one. It could be a simple two files per item approach. One email file written to the queue directory with method SendToFile so it can be resent as is with OwnHeaders and TIcsStreamReader or from a TStringList later on, and one info file containing related properties including MxIPs, Port.. as well as a next retry value, last error etc.. Both files would share the same filename with different extensions. -- Arno Garrels -- 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
Re: [twsocket] SMTP mail queue component?
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? Angus, 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. dZ. -- 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