NYCPHP Meetup

NYPHP.org

[nycphp-talk] An Email Architecture Puzzle

csnyder chsnyder at gmail.com
Sat Jan 21 11:13:17 EST 2006


On 1/13/06, Andrew Yochum <andrew at plexpod.com> wrote:

> Configure your SMTP server or procmail to filter all email through a PHP
> script.  Parse, munge (like adding a tracking number to the subject),
> store it in your DB & pass it through to the recipient.  This is much
> the same way many spam filters and email-based help desk apps work...
> and CLEW.
>
> HTH,
> Andrew

Sorry to jump in so late on this, had my head down this week.

I like this approach because it adds a header which can be used by the
recipient of the email to verify that it was assigned to the proper
job. You could also add a footer to "unassigned" messages, to include
a link to the assignment interface.

For efficiency's sake, I might opt for a different system, using an
IMAP mailbox so that the messages could queue under heavy load without
affecting the timely delivery of mail. Your PHP app would simply read
its inbox every so often, process any new messages, and either delete
them or move them to one or more folders within the mailbox based on
how they are assigned (or not assigned).

There is a nice tradeoff here which can help you decide: pass-through
SMTP has fewer moving parts, whereas IMAP queueing has fault tolerance
and a built-in message store.

--
Chris Snyder
http://chxo.com/


More information about the talk mailing list