Are there any tools to set up an automated IMAP client?
By which I mean I want to set up some software on a headless Linux box which connects to an account on an IMAP server elsewhere. It could then be configured to perform actions on received email, such as filter it, move it to folders, forward it to people based on various criteria, etc.
It seems like the sort of thing that must exist but I'm clearly picking the wrong things to Google for...
Mark
Mark Rogers mailto:mark@more-solutions.co.uk 23 February 2017 16:04 Are there any tools to set up an automated IMAP client?
By which I mean I want to set up some software on a headless Linux box which connects to an account on an IMAP server elsewhere. It could then be configured to perform actions on received email, such as filter it, move it to folders, forward it to people based on various criteria, etc.
It seems like the sort of thing that must exist but I'm clearly picking the wrong things to Google for...
Mark
Procmail immediately springs to mind but its no longer maintained.
Alternatively Sieve looks to have some promise if the server supports it.
Ben
On Thu, Feb 23, 2017 at 04:04:24PM +0000, Mark Rogers wrote:
Are there any tools to set up an automated IMAP client?
By which I mean I want to set up some software on a headless Linux box which connects to an account on an IMAP server elsewhere. It could then be configured to perform actions on received email, such as filter it, move it to folders, forward it to people based on various criteria, etc.
It seems like the sort of thing that must exist but I'm clearly picking the wrong things to Google for...
In the days before always on internet connections there were lots of utilities for doing this sort of thing, they've rather died out now.
I'm *sure* I recently came across this ability in some mailing list software I was reading about but I can't remember where now. If I find it I'll report back.
On 23/02/17 18:57, Chris Green wrote:
On Thu, Feb 23, 2017 at 04:04:24PM +0000, Mark Rogers wrote:
Are there any tools to set up an automated IMAP client?
By which I mean I want to set up some software on a headless Linux box which connects to an account on an IMAP server elsewhere. It could then be configured to perform actions on received email, such as filter it, move it to folders, forward it to people based on various criteria, etc.
It seems like the sort of thing that must exist but I'm clearly picking the wrong things to Google for...
In the days before always on internet connections there were lots of utilities for doing this sort of thing, they've rather died out now.
I'm *sure* I recently came across this ability in some mailing list software I was reading about but I can't remember where now. If I find it I'll report back.
I thought the answer was going to be "Use Mutt". It still could be, but then I found this about filtering with Mutt, which may be of help...
http://mutt.postle.net/filtering/
Of course, you could install a mail server like exim or one of its alternatives, get all the mail onto the mail server and then use the filtering capabilities of the mail server to shift stuff around.
Another alternative is to do it on whatever's providing the imap server for you. For example if you were using gmail to receive your mail, it's possible to write rules on gmail to move them to where you want them to be.
Steve
On Thu, Feb 23, 2017 at 04:04:24PM +0000, Mark Rogers wrote:
Are there any tools to set up an automated IMAP client?
By which I mean I want to set up some software on a headless Linux box which connects to an account on an IMAP server elsewhere. It could then be configured to perform actions on received email, such as filter it, move it to folders, forward it to people based on various criteria, etc.
It seems like the sort of thing that must exist but I'm clearly picking the wrong things to Google for...
fetchmail, or these days possibly getmail4?
J.
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).
Does that make more sense?
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.
On 24 February 2017 at 13:17, Chris Green cl@isbd.net wrote:
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.
I'm not looking for AI. I want something that's sufficiently configurable that I can tweak it as I learn what is needed.
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.
I can see how that would handle the initial forward, but not the "staying in the loop" bit, ie being able to prompt real people like me if messages don't get replied to properly etc. From that point of view I'm thinking a simple ticketing system would be good, although I've not yet found a "simple" ticketing system that doesn't try to do so much as to be too big a job to implement it in the first place.
** Mark Rogers mark@more-solutions.co.uk [2017-02-24 13:42]:
On 24 February 2017 at 13:17, Chris Green cl@isbd.net wrote:
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.
I'm not looking for AI. I want something that's sufficiently configurable that I can tweak it as I learn what is needed.
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.
I can see how that would handle the initial forward, but not the "staying in the loop" bit, ie being able to prompt real people like me if messages don't get replied to properly etc. From that point of view I'm thinking a simple ticketing system would be good, although I've not yet found a "simple" ticketing system that doesn't try to do so much as to be too big a job to implement it in the first place.
** end quote [Mark Rogers]
Sounds like you are heading towards the realm of CRM, have you looked into something like Vtiger or Odoo (previously OpenERP, which has more on the stock control side of things and slightly less on the CRM, but may have enough features). They can hook into IMAP mail accounts and let you know when customers haven't been contacted for a while, either on a specific job or generally if you might be able to generate some new work, etc.
On 26 February 2017 at 12:43, Paul Tansom paul@aptanet.com wrote:
Sounds like you are heading towards the realm of CRM, have you looked into something like Vtiger or Odoo (previously OpenERP, which has more on the stock control side of things and slightly less on the CRM, but may have enough features). They can hook into IMAP mail accounts and let you know when customers haven't been contacted for a while, either on a specific job or generally if you might be able to generate some new work, etc.
Thanks, I'll take a look - we already have vTiger running.