[Zope-dev] How to trigger Zope externally (mail)
Ross Boylan
RossBoylan@stanfordalumni.org
Wed, 26 Feb 2003 16:16:56 -0800
I am working on a poll/survey type product and want to handle
responses by email as well as the web. If you have any advice about
the best architecture, I would appreciate it. I'm currently using
Zope 2.5 on Linux, though it would be nice if the solution weren't too
platform dependent.
Here are some options I have thought of.
1. Incoming mail goes to a pipe, which is a program that processes the
message.
I think the main drawback of this approach is that I would need to run
Zope on top of ZEO so that multiple processes could access the
database safely. I'm also not sure how hard it would be to
reestablish the context of my product outside of regular Zope.
Aside from these concerns, this seems the most natural approach.
2. Incoming mail goes to mbox; via the regular zope web interface I
periodically point to the mbox and request that it be processed.
Ugly, but relatively simple. Some locking and concurrency issues.
Likely to result in much slower response to mail. Also, there could
be some problems distinguishing message boundaries; in practice,
probably not a problem.
3. Incoming mail goes to temp file or temp named pipe*. The running
zope is tickled via http: with the name of the file/pipe, and
processes it from there.
*By "temp named pipe" I mean each mail would need a unique pipe name.
I think if I try to use a single named pipe I may have trouble if
multiple emails go down it around the same time.
4. Deliver the email to the running zope via some other protocol,
e.g., ftp.
I'm not sure how to set this up.
------------------------------
I welcome comments on these approaches, or others that are even
better!
Also, I would like the approach to be reasonably secure.
Thanks.