On Fri, Feb 24, 2017 at 11:04:06AM +0000, Mark Rogers wrote:
Thanks all for the suggestions but I think I'd better explain more about what I'm trying to achieve.
Suppose I had a colleague, let's call her Jane, sitting at her desk with the sole role of managing a few email accounts, such as "sales@..." and "support@...". Her role would be to to check for incoming email, and forward to the most likely person (or people) to deal with it, based on whether its from a known contact (or relates to a known project). She would then be CC'd in future correspondence and could, for example, chase people if requests go unanswered etc.
Jane, nice as she is, finds this job all rather boring and something that could be automated by any "bot" that can read those email accounts. And she has a point. Which is why I am here :-)
Jane does sound like a very nice person but sadly she doesn't exist. But that's kind of the role I want to perform through software.
Yes, a lot could be done by suitable rules in the IMAP server, but they'd need separately setting up for each email account "Jane" monitors and couldn't develop to take into account knowledge of interactions between more than one email account. "Jane" might also need to monitor email accounts on different servers with different configurations and having it all in one place makes more sense.
If Jane were running (say) Thunderbird or (I assume) mutt or similar she could similarly set up rules in her client, but since Jane doesn't exist and doesn't therefore have a computer I want all this to run on a headless box using software that wasn't designed for a human to read email with. And I'm keen that it can interact with things outside email (so on receipt of certain emails it might run bash scripts, etc).
It sounds as if you want some sort of AI/learning system. A real Jane *would* learn as she went. If this is what you want then I think it's not going to be 'off the shelf' though I suppose you might be able to use SpamAssassin or something like that as a starting point.
On the other hand if you just want to have a configuration file that says "if it's To: Fred" then do this, "if it's about cabbages" do that then you need fetchmail + procmail or some equivalent.