procmail
[Top] [All Lists]

customer service processor with 3 attempt limitation

1999-10-25 22:26:34
Hi everybody,

I am trying to limit procmail to responding to emails
to only 3 instances. To ask this question properly, I
think some background info is necessary:

I've got a procmail file with about 40 rules. The idea
here is that almost all the people emailing me and my
associate ask questions about 58 topics - they just
use different words to ask, but almost all the
questions boil down to these 58 topics. So I started
using procmail to fire off answers based on rules
created after analyzing phrases used to ask these
questions on several hundred emails. The rules use a
set of about 30 files to send responses.

Upside: reponse time is fast - 2 seconds

Downside: sometimes procmail gets it wrong, which
everyone understands as the price they have to pay for
speed, but it can really annoy them when they email 3
times on the same topic and procmail gets it wrong and
keeps them in a loop of them emailing and procmail
responding with a wrong answer.

So, right now what I do is in the responce file sent
out with the cat command there is a string that I ask
them to include anywhere in their email to avoid
getting that same answer again. I also have this rule
at the top to watch out for emails that have been
responded to 3 times already:

:0
* ^Subject:.*re: +re: +re:
$DEFAULT

But, there is still a problem if the person emailing
uses a new subject line each time and fails to include
the strings received so far.

I was wondering, to prevent this, how do i add extra
headers into all responses that will 'stick' with the
emails as they are emailed in and responded to back
and forth? The problem with X-Loop as I understand it
is that it can only hold one value (e.g. our email
address). What I need is a set of rules at the top of
the procmail file that adds a header (say with value
'1st reply' the first time, if that already exists it
adds '2nd reply', ...). Then if promail sees that this
is the 3rd time that email has come in, it dumps it
into the $DEFAULT without further processing. That
way, no matter what the person does with the subject
and body on each reply, as long as thet reply by
hitting their Reply button on their email client, it
will not autorespond with an answer after the 3rd
time. How can I achieve this?

By the way, I call procmail with the -f- switch from
the .forward file and typically send the reponse file
with formail -rtk; cat file_name_here...

Thanks for your help!

David
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

<Prev in Thread] Current Thread [Next in Thread>