Hi, y'all.
I thought I'd run this up the flagpole here to see what sorts of ideas y'all
might have.
I've got a client with a domain of, say, 'mydomain.com'. They have about 1000
users.
There is a 3rd party company (we'll call them 'reminders.com' for discussion
sake) the client wants to work with that will periodically send notices to
various client users notifying them of the occurrance of certain events. eg.,
they'll send a notice to a user Fred Flintstone (
FredF@mydomain.com) telling
him that his library book needs to be returned.
To accomplish this, they want the email addresses of all the users. For a
variety of reasons, I want these notices to get routed into a single client
database instead of sent out as hundreds of untraceable emails each month.
For one thing, if a user leaves (like an employee), somebody needs to get the
notices in their place, which isn't necessarily possible if a regular email
address is used (either the user's personal email or their email address at
the company).
The 3rd party company has been doing this sort of thing for years, and their
clients (hundreds, with over 100k total users) don't seem to find any problem
with emails getting bounced, managing the coming and going of users and
keeping the 3rd party firm updated on all this stuff. So they're not inclined
to add a bit of code to call an http POST function with this info rather than
have their software call sendmail.
What I'm thinking of is giving the 3rd party a list of names and user-ids
unrelated to their email addresses, per se. Then have them send everything to
an address like one of these:
(1) <userid>.
reminders@mydomain.com
(2) reminders.<userid>@mydomain.com
(3) <userid>@reminders.mydomain.com
There would be something watching for emails conforming to one of these
patterns. When it sees one, it would parse the email and post it to a MySQL
database record keyed on <userid,timestamp> with the body of the message and
other relevant data posted to other fields in the record. It might be a good
idea to save the email in another queue indicating it had been processed.
What I'm wondering is if there's any particular difference between handling
any of these forms. I'm not too keen on #3 as it implies other things in
other contexts (eg., reminders.mydomain.com ==>
www.mydomain.com/reminders/).
Also, what's the "preferred" method you would use to implement something like
this? (I'm using Red Hat 7.1 and qmail in this particular instance, in case
it matters.)
Thanks
-David Schwartz