Pages: 1
RSS
Filtering Replies
 
Is it possible to filter out a reply from an original message? I would like to have new incoming messages replied to with one message, a reply responded to with another message, and a second reply responded to with yet another message. I figured I could differentiate between the original and replies with a simple filter for a "re" in the subject, but is there any way to differentiate between the two replies?

Also, is there any way to filter out duplicate recipients? Often times, a recipient will send two messages, each with perhaps a different subject or body. I would like only 1 email per person, regardless of how many messages sent.

Thanks for the help.
 
about the first question, you may create some filters based on the References: header
If a msg is a reply to your msg, that header should contain something like <xxxxxxx@yourdomain.com> once.
If it's a second reply such thing should appear twice etc. A regex based filter condition should be able to catch that. Indeed this assumes the mail client on the other side keeps/sends this info, but I guess most do.

About #2, you want to send one reply only ?
If so with the first reply you may add the recipient to some address book (not main but another created for this purpose). Create an incoming filter that checks if sender exists in that AB - if yes, he received a reply already. If not, send a reply.
 
Thanks for the reply bigg one. The solution for one reply per person worked perfectly. As for the regex, I attempted to look up how to write the code for this but I'm not really familiar with the language and couldn't find any good tutorials on how to go about doing so. Any suggestions?
Edited: Cameron Habib - 11 January 2010 20:06:40
 
A regex that may find that 2 times could be
--
References:.*?domain\.com.*?domain\.com.*?$
--
For one time
--
References:.*?domain\.com.*?$
--
In fact this will match 2 times as well, but put the filter after the above. If the first isn't triggered but this one is, you have it once. If the first is triggered, you have it twice.

$ at the end means match before a line break. If the whole References header is not on a single line, you may remove that.

I haven't tested that and don't use regexes in theBat, so it may have to be adjusted. Also I'm not sure which filter condition exactly has to be used(match, matches all as regexp etc.)
I guess you should test against the header field References (then you may omit $. Also not sure if 'References:' itself is included) , or if that doesn't work - against the entire message source.
Edited: bigg one - 11 January 2010 22:04:14
 
bigg one, I appreciate the help. I actually tried your method with mixed results. Various messages had various information for the headers, with some having up to 5 listings of my domain for just one reply. I decided instead to implement your suggestion of address books and create a set of rules and books for every message I wanted sent out. The system works flawlessly.
Pages: 1