Re: Exec'ing a script from Cyrus when imapd has a client
On Thu, 2009-11-12 at 13:47 -0500, Greg A. Woods wrote: Use SMTP to breech the unreliable link! It's safe, proven, and designed for that very task! ... and not an option at some mail providers, which are mandatory for some people because they are their employer whose mail they must read. For transferring from a POP-only server to an IMAP-enabled server, there's not much else than fetchmail, like it or not. Xav Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Thu, 12 Nov 2009 17:20:19 -0800 (PST), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client you have focused on the fact that he wants to use fetchmail as the transport between the full-time internet and his intermittently connected network and are telling everyone that he absolutly, under no conditions should try to do what he's attempting. Actually I've said that anyone trying to do this is failing to understand, or even define, the problem they're prematurely throwing half-baked solutions at. most of the rest of us see situations where the basic approach he's doing could be the best possible approach. I believe those of you who are trying to defend the OP's scheme are also failing to understand and even define the actual problem at hand. In fact nobody has come up with a solid real-world scenario where there isn't a much simpler and more obvious solution available, one that can only be seen by stepping back and looking at the actual requirements from a higher level. -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Fri, Nov 13, 2009 at 03:07:00PM -0500, Greg A. Woods wrote: I believe those of you who are trying to defend the OP's scheme are also failing to understand and even define the actual problem at hand. That would be everyone else on this list I believe. Because we realise that the real world is more complex and you don't always have control over which protocols are available to you and how much control you have over where you mail is stored. In fact nobody has come up with a solid real-world scenario where there isn't a much simpler and more obvious solution available, one that can only be seen by stepping back and looking at the actual requirements from a higher level. That's only because you're not actually reading them There have been solid real world scenarios. Here's one: 1) you have mail stored on a system that only allows you POP access, and for real-world political reasons you can't make them feed the mail to you. 2) you read your mail on multiple different systems. 3) you don't want to be manually copying messages around with a GUI client. Feel free to step back and find a simpler and more obvious solution for me that doesn't involve wishful thinking that corporate IT could be convinced to change their policies on your behalf in under 5 years, or that it's worth your while to fight that fight to come up with a slightly more technically pure solution. Bron ( and don't get me started on the don't use a dynamic IP argument until you've lived in Australia for a year and paid a massive premium for a static IP ) Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Sun, 8 Nov 2009 06:54:30 +1100, Bron Gondwana br...@fastmail.fm wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client On Sat, Nov 07, 2009 at 11:08:31AM -0500, Greg A. Woods wrote: Just get a forwarding alias installed on the remote mail server and then you'll be using the MTA to move your mail in a robust, secure, and fail-safe manner to the IMAP server where you desire it to be finally delivered. Maybe unreliable network connectivity? That's _exactly_ where you want to use SMTP or some other store and forward mechanism to create a robust and reliable mail transport link! Use SMTP to breech the unreliable link! It's safe, proven, and designed for that very task! A dynamic IP where they don't want a stale DynDNS pointer to cause someone else to get the mail? Well, amateurs can and will run whatever hacks they want, and they're not usually interested in doing the kinds of things necessary for production systems in the first place either. Further, if anyone is stupid enough to try to use dynamic IP addresses where static IP addresses are REQUIRED for proper functionality and robust operations then they get every problem they deserve and I have no interest whatsoever in catering to any of their hacks and abominations. Use proper client/server protocols for dynamic IP clients! Pull vs Push in the abstract is an age old question that never has only one answer, much as you are trying to paint it that way. Well, in Internet e-mail delivery there has always been one and only one answer to the push vs. pull philosophy. I'm only talking about e-mail here. Fight the way e-mail has always worked and you have to fight the whole infrastructure and use fringe tools with known risks and problems. If you want your e-mail to work reliably then you have to work with the existing infrastructure and with the tried and tested tools that designed and implemented to work that way. Note how even in SMTP the proposed mechanisms for pull-like functionality have been lost, broken, and forgotten forever, and even there, like in UUCP, it's still fundamentally store-and-FORWARD even if the client makes the call. Nobody has _ever_ made pull work for e-mail in any significant widely accepted and implemented way. To that extent history and experience have proven that your age-old question does in fact have only one good workable answer. Note that the final last-hop fetch done by the likes of POP and IMAP is not a pull mechanism -- they switch the whole paradigm to client/server. The rest of this is kinda just BS about how to use a proper IMAP client. Er, you know a perfect IMAP client? I've never been able to find a good one, which is why I use offlineimap to local Maildirs and mutt to talk to them. I didn't say perfect -- I said proper. :-) Mutt is not a proper IMAP client so far as I can tell, for example. Pine, Emacs Wanderlust, Thunderbird, Apple Mail, etc. are all proper IMAP clients in most respects, I think. Pick your poison. :-) Ahh, I see. Fetchmail screwed your dog and pissed in your cereal. No, not me -- I've seen dozens of others screwed by it though. It does nothing good for e-mail. Rumour has it that offlineimap supports running an IMAP server locally and synchronising changes in BOTH directions, with the help of a little on-disk-database to keep track of who changed what. Yes, back to a more proper client/server paradigm. No messing with protocol layer violations is necessary. (offlineimap does sound like a rather crazy idea though -- why not just use a proper IMAP client that properly supports a true offline working mode?) I don't use it because last time I did it was still buggy and new, and now I'm wary. And you would use/recommend fetchmail instead? Talk about a fundamental contradiction! :-) This whole fetchmail thing is a tangent. Implementation detail. Sort of. Anything in its class is at question. The important thing was pull versus push and how to trigger the monkey with a modern email client equivalent of a copy between IMAP folders, but scripted. No, IMAP uses a client/server paradigm, not really a pull. There's a subtle but VERY important difference, especially for e-mail w.r.t. protocol layering violations (especially RFC 822 and newer). -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Sat, 07 Nov 2009 16:05:53 -0500, Adam Tauno Williams awill...@whitemice.org wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client So what? Seriously, if a tool accomplishes the task... and accomplishing the task is the purpose for the technology to exist in the first place. Well, if all you've got is a hammer Bogus, Fetchmail is a POP/IMAP/SMTP client that automatically moves messages based upon its configuration. It doesn't violate any protocol levels at all. If I drag-and-drop messages with my GUI MUA between two servers, or use fetchmail, it is the exact same affect and both are perfectly legitimate. Except, of course, that fetchmail will do so at 3AM every morning while I sleep. Ah, NOPE. POP and IMAP are entirely different paradigms than SMTP (or LMTP), for example. Fetchmail violates RFC822 for starters. See my other reply. If you don't understand then perhaps you don't care about such things -- that's your business. Also fetchmail introduces a huge hole in reliability and robustness of normal MTA message transmission and delivery. I'd very much like to stop anyone from offering such hacks as solutions to others though, especially when there are perfectly good alternatives which don't violate any protocol layers and which are infinitely more robust and reliable. -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Thu, 12 Nov 2009, Greg A. Woods wrote: At Sun, 8 Nov 2009 06:54:30 +1100, Bron Gondwana br...@fastmail.fm wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client On Sat, Nov 07, 2009 at 11:08:31AM -0500, Greg A. Woods wrote: Just get a forwarding alias installed on the remote mail server and then you'll be using the MTA to move your mail in a robust, secure, and fail-safe manner to the IMAP server where you desire it to be finally delivered. Maybe unreliable network connectivity? That's _exactly_ where you want to use SMTP or some other store and forward mechanism to create a robust and reliable mail transport link! Use SMTP to breech the unreliable link! It's safe, proven, and designed for that very task! no, SMTP only works if you have network connectivity that is up most of the time. it will handle short outages, but it will not handle the case where your network connectivity is off most of the time A dynamic IP where they don't want a stale DynDNS pointer to cause someone else to get the mail? Well, amateurs can and will run whatever hacks they want, and they're not usually interested in doing the kinds of things necessary for production systems in the first place either. Further, if anyone is stupid enough to try to use dynamic IP addresses where static IP addresses are REQUIRED for proper functionality and robust operations then they get every problem they deserve and I have no interest whatsoever in catering to any of their hacks and abominations. Use proper client/server protocols for dynamic IP clients! SMTP is not a proper protocol for a dynamic IP environement. Pull vs Push in the abstract is an age old question that never has only one answer, much as you are trying to paint it that way. Well, in Internet e-mail delivery there has always been one and only one answer to the push vs. pull philosophy. I'm only talking about e-mail here. not true, in the beginning UUCP was the primary mechanism for transporting e-mail. it was designed for the (then current) environement where connectivity was very intermittent and expensive to leave idle (which happens to match the use case here as well, but using UUCP takes far more cooperation on the part of the Internet server, thus the fetchmail approach) Fight the way e-mail has always worked and you have to fight the whole infrastructure and use fringe tools with known risks and problems. If you want your e-mail to work reliably then you have to work with the existing infrastructure and with the tried and tested tools that designed and implemented to work that way. Note how even in SMTP the proposed mechanisms for pull-like functionality have been lost, broken, and forgotten forever, and even there, like in UUCP, it's still fundamentally store-and-FORWARD even if the client makes the call. Nobody has _ever_ made pull work for e-mail in any significant widely accepted and implemented way. UUCP that's acttivated when the client connects and tickles the server to let it know that it's connected is effectivly a pull mechanism. The rest of this is kinda just BS about how to use a proper IMAP client. Er, you know a perfect IMAP client? I've never been able to find a good one, which is why I use offlineimap to local Maildirs and mutt to talk to them. I didn't say perfect -- I said proper. :-) Mutt is not a proper IMAP client so far as I can tell, for example. Pine, Emacs Wanderlust, Thunderbird, Apple Mail, etc. are all proper IMAP clients in most respects, I think. Pick your poison. :-) Thunderbird? my understanding (from watching people use it) is that it wants to pull a copy of all your mail to the local box before processing it. how is this a proper IMAP client? David Lang Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
Le jeudi 12 novembre 2009 à 13:53 -0500, Greg A. Woods a écrit : I'd very much like to stop anyone from offering such hacks as solutions to others though, especially when there are perfectly good alternatives which don't violate any protocol layers and which are infinitely more robust and reliable. You dispense a lot of stop energy on this list, with dubious technical arguments to justify your point. Do you gain anything if Cyrus doesn't fulfill the needs of some users ? Xav Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Thu, Nov 12, 2009 at 11:55:25AM -0800, David Lang wrote: Use SMTP to breech the unreliable link! It's safe, proven, and designed for that very task! no, SMTP only works if you have network connectivity that is up most of the time. it will handle short outages, but it will not handle the case where your network connectivity is off most of the time ETRN can solve this, you just need a relay that understands ETRN and is willing to hold your e-mails while you're off-line. ODMR is better for dynamic addresses (you don't need dynamic DNS) but it seems to be less supported. I have not used either yet, so YMMV. Gabor -- - MTA SZTAKI Computer and Automation Research Institute Hungarian Academy of Sciences - Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Thu, 12 Nov 2009, Gabor Gombas wrote: On Thu, Nov 12, 2009 at 11:55:25AM -0800, David Lang wrote: Use SMTP to breech the unreliable link! It's safe, proven, and designed for that very task! no, SMTP only works if you have network connectivity that is up most of the time. it will handle short outages, but it will not handle the case where your network connectivity is off most of the time ETRN can solve this, you just need a relay that understands ETRN and is willing to hold your e-mails while you're off-line. ODMR is better for dynamic addresses (you don't need dynamic DNS) but it seems to be less supported. I have not used either yet, so YMMV. the big advantage of the fetchmail approach that the initial poster was asking about is that it does not require special configuration of the upstream mail server. I definantly agree that it is not the best possible approach. but as far as I can tell, every approach that's better requires cooperation from a mail server that does have full-time Internet connectivity. unfortunantly that's not always available (at least, not available at an affordable price in time and money) David Lang Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Thu, 12 Nov 2009 11:55:25 -0800 (PST), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client no, SMTP only works if you have network connectivity that is up most of the time. it will handle short outages, but it will not handle the case where your network connectivity is off most of the time If your link is off most of the time then use UUCP -- that's what it was designed for. Tunnel it through SSL if you're using public IP addressing and routing for the same link. Or just use IMAP from a client MUA -- your link will be up when you want to read mail and all your mail will be available at the IMAP server at that time. All these excuses for doing strange things with things like fetchmail are really really lame and stretching the imagination beyond belief! Use proper client/server protocols for dynamic IP clients! SMTP is not a proper protocol for a dynamic IP environement. Indeed, SMTP is not a client/server style protocol in the sense I meant. IMAP would be a proper client/server style protocol in the sense I meant. not true, in the beginning UUCP was the primary mechanism for transporting e-mail. it was designed for the (then current) environement where connectivity was very intermittent and expensive to leave idle (which happens to match the use case here as well, but using UUCP takes far more cooperation on the part of the Internet server, thus the fetchmail approach) I used UUCP intensively for at least 10 years at dozens of sites with hundreds of peers, starting over 20 years ago. I've worked on UUCP implementations, including building alternate transport layers for UUCP connectivity over networks such as X.25. UUCP e-mail, _is_ fundamentally a store and forward protocol, _even_ when the client makes the call. Don't confuse connection establishment with higher protocol layers. UUCP is _NOT_ an Internet protocol (though of course modern implementations can use TCP/IP as an underlying connection transport). Now read again what I wrote with all of that in mind: Well, in Internet e-mail delivery there has always been one and only one answer to the push vs. pull philosophy. I'm only talking about e-mail here. UUCP that's acttivated when the client connects and tickles the server to let it know that it's connected is effectivly a pull mechanism. No. The server _always_ _pushes_ the command and data files to the client REGARDLESS of how the connection was initiated. The UUCP client doesn't know what to ask for -- it just opens the connection and allows the server to proceed normally with using the connection. The server pushes over command and data files for the client to act upon, in just exactly the same was as if it had initiated the connection. Connection establishment in UUCP is no more related to the fundamental fact that e-mail via UUCP is a store-and-forward protocol than PPP connection establishment is related to the fact that SMTP is a store-and-forward protocol. They are both different layers. Keep it Simple -- don't confuse or violate protocol layers! Thunderbird? my understanding (from watching people use it) is that it wants to pull a copy of all your mail to the local box before processing it. how is this a proper IMAP client? How is it not a proper IMAP client? Like I said, pick your poison. Some MUAs will want to copy everything over at once for one kind of performance profile, some will request only headers (enough to form the summary index) for another kind of performance profile. Thunderbird fully understands the concept of multiple folders on arbitrary servers, and it more or less speaks true IMAPv4, giving the user an interface to do most everything that IMAPv4 will easily allow. It has additional features that make it possible to work offline. That sounds like a proper IMAP client to me. -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Thu, 12 Nov 2009 21:21:24 +0100, Xavier Bestel xavier.bes...@free.fr wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client Do you gain anything if Cyrus doesn't fulfill the needs of some users ? Did I ever say Cyrus should or should not meet the needs of some users? I think you've got something backwards here. Why should any one product meet the needs of all users? That's the if all you've got is a hammer... analogy. Cyrus IMAP will _NEVER_ meet the needs of all users, and that's fundamentally what I've been trying to say from the start. If you don't need it then don't try to wedge it into your implementation! We all gain if we can avoid the all you've got is a hammer trap, and indeed we all gain if we can help each other avoid that trap too. If I'm not too mistaken it seems most everyone who wanted to use an IMAP server as a client-level tool (by employing the likes of fetchmail) were clearly falling for the I have this Cyrus IMAP Hammer and I want to use it to manage all of my e-mail even though I'm not running a server trap. Certainly that seemed to me to be the OP's situation. The real fear I have is that as a result others will believe that this kind of use is condoned and approved, or worse that these folks were actually setting up such things for other groups of users. In both cases we end up with naive users who will not understand the issues involved. Issues such as mangled headers, unreliable delivery, loss of e-mail, and so on. Sure, it's all fine and dandy for someone to want to learn about a product like Cyrus IMAP (or even fetchmail) by installing and using it in some form where they can personally make use of it. However if the goal is just to make something work in the real world for end users then we really need to go back to the fundamental end-user requirements and figure out how best to meet them without creating hidden problems along the way simply because we've got this hammer in our hands and we're dying to bang away on something. If the user wants some screws installed then we'd be doing them a huge favour if we would go and find the proper screwdriver to do the job for them! -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Thu, 12 Nov 2009, Greg A. Woods wrote: At Thu, 12 Nov 2009 21:21:24 +0100, Xavier Bestel xavier.bes...@free.fr wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client Do you gain anything if Cyrus doesn't fulfill the needs of some users ? Did I ever say Cyrus should or should not meet the needs of some users? I think you've got something backwards here. Why should any one product meet the needs of all users? That's the if all you've got is a hammer... analogy. Cyrus IMAP will _NEVER_ meet the needs of all users, and that's fundamentally what I've been trying to say from the start. If you don't need it then don't try to wedge it into your implementation! We all gain if we can avoid the all you've got is a hammer trap, and indeed we all gain if we can help each other avoid that trap too. If I'm not too mistaken it seems most everyone who wanted to use an IMAP server as a client-level tool (by employing the likes of fetchmail) were clearly falling for the I have this Cyrus IMAP Hammer and I want to use it to manage all of my e-mail even though I'm not running a server trap. Certainly that seemed to me to be the OP's situation. The real fear I have is that as a result others will believe that this kind of use is condoned and approved, or worse that these folks were actually setting up such things for other groups of users. In both cases we end up with naive users who will not understand the issues involved. Issues such as mangled headers, unreliable delivery, loss of e-mail, and so on. who are you to officially condone or approve any particular use? who on this list (or any list) has the authority to do so? it's fine to suggest other solutions, but if people then say that those solutions cannot be used in these cases (and especially when they give the reasons) continuing to argue that it's wrong and evil to use the tool that way is not productive. you may not choose that solution, but that may be because you have resources available to you that make a different solution better. Sure, it's all fine and dandy for someone to want to learn about a product like Cyrus IMAP (or even fetchmail) by installing and using it in some form where they can personally make use of it. However if the goal is just to make something work in the real world for end users then we really need to go back to the fundamental end-user requirements and figure out how best to meet them without creating hidden problems along the way simply because we've got this hammer in our hands and we're dying to bang away on something. If the user wants some screws installed then we'd be doing them a huge favour if we would go and find the proper screwdriver to do the job for them! even if the OP was using UUCP for the mail transport, the question he asked (how to have a job run frequently when a user is logged in, and not run if there are no users logged in) is still a very useful question to get an answer to. you have focused on the fact that he wants to use fetchmail as the transport between the full-time internet and his intermittently connected network and are telling everyone that he absolutly, under no conditions should try to do what he's attempting. that's where we have severe disagreements. most of the rest of us see situations where the basic approach he's doing could be the best possible approach. we may quibble over exact details of some of the things (use fetchmail vs UUCP vs other), but that doesn't make the basic approach invalid. David Lang Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Thu, 12 Nov 2009, Greg A. Woods wrote: At Thu, 12 Nov 2009 11:55:25 -0800 (PST), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client no, SMTP only works if you have network connectivity that is up most of the time. it will handle short outages, but it will not handle the case where your network connectivity is off most of the time If your link is off most of the time then use UUCP -- that's what it was designed for. Tunnel it through SSL if you're using public IP addressing and routing for the same link. you can only do this if the servers you are connecting to support UUCP, most do not. but even if you do this, it's valid to want UUCP to check frequently when imapd has a client and infrequently (if at all) when it doesn't. Or just use IMAP from a client MUA -- your link will be up when you want to read mail and all your mail will be available at the IMAP server at that time. over a slow, high latency, error-prone link IMAP is very painful to use. All these excuses for doing strange things with things like fetchmail are really really lame and stretching the imagination beyond belief! Use proper client/server protocols for dynamic IP clients! SMTP is not a proper protocol for a dynamic IP environement. Indeed, SMTP is not a client/server style protocol in the sense I meant. IMAP would be a proper client/server style protocol in the sense I meant. so you are claiming that his business need is invalid. you are not in a position to declare this. Thunderbird? my understanding (from watching people use it) is that it wants to pull a copy of all your mail to the local box before processing it. how is this a proper IMAP client? How is it not a proper IMAP client? Like I said, pick your poison. Some MUAs will want to copy everything over at once for one kind of performance profile, some will request only headers (enough to form the summary index) for another kind of performance profile. Thunderbird fully understands the concept of multiple folders on arbitrary servers, and it more or less speaks true IMAPv4, giving the user an interface to do most everything that IMAPv4 will easily allow. It has additional features that make it possible to work offline. That sounds like a proper IMAP client to me. that 'more or less speaks true IMAPv4' makes me say it's not a proper IMAP client. I also consider any client that uses IMAP to pull the data to the local system and does everything else there to be a POP client that happens to use IMAP to fetch it's messages. A proper IMAP client would fetch only the portions of a message that the user needs, and would use the capabilities of the server (or at least the basic IMAPv4 capabilities, they may not use all of the enhancements) rather than duplicating the functionality on local copies. this doesn't prevent the client from offering a disconnected mode of operation, but if disconnected mode is not in use, the server should be used. David Lang Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
Xavier Bestel wrote: Hi, I have a small install with cyrus-imapd 2.3.14, which reads some of its mails with fetchmail. To limit the delay in mail delivery, fetchmail awakes each minute to get mails. What I would like is let fetchmail do that only when there's a client actually reading its mails, i.e. an MUA actually connected to imapd. So, my question: how to hook a script each time a client connects/disconnects from imapd ? Check /var/imap/proc for files. If any are present, then a client is connected. Write a polling script to run out of cron that checks for this and runs fetchmail if appropriate. I'll let other's comment on the soundness of this. Semi-pseudo code. #/bin/sh if [ $(find /var/imap/proc -type f | wc -l) -gt 0 ]; then fetchmail fi For bonus points, you could parse the proc files and only run fetch mail for the users actually connected. find /var/imap/proc -type f | \ xargs awk 'BEGIN{FS=\t}{if (length($2)) print $2}' | \ sort -u | \ xargs dispatch_command -- Russell A. Jackson r...@csub.edu Network Analyst California State University, Bakersfield signature.asc Description: OpenPGP digital signature Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
Russell Jackson wrote: Xavier Bestel wrote: Hi, I have a small install with cyrus-imapd 2.3.14, which reads some of its mails with fetchmail. To limit the delay in mail delivery, fetchmail awakes each minute to get mails. What I would like is let fetchmail do that only when there's a client actually reading its mails, i.e. an MUA actually connected to imapd. So, my question: how to hook a script each time a client connects/disconnects from imapd ? Check /var/imap/proc for files. If any are present, then a client is connected. Write a polling script to run out of cron that checks for this and runs fetchmail if appropriate. I'll let other's comment on the soundness of this. Opps. Didn't see that second sub-thread that said pretty much the same exact thing already. -- Russell A. Jackson r...@csub.edu Network Analyst California State University, Bakersfield Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Tue, 3 Nov 2009 17:07:04 -0500, Anthony Tibbs anthony-l...@tibbs.ca wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client You know, I don't know if I agree with all the objections over this person's request. I actually have a similar setup where Fetchmail is used to retrieve messages from a remote mailbox for injection into a Cyrus setup, primarily because of quota requirements on the far end. Oy! Why are you using broken hacks when a perfectly good solution is just begging to be used? Just get a forwarding alias installed on the remote mail server and then you'll be using the MTA to move your mail in a robust, secure, and fail-safe manner to the IMAP server where you desire it to be finally delivered. The rest of this is kinda just BS about how to use a proper IMAP client. Yes, modern MUA's offer the ability to store messages locally, but what if you have that MUA installed in several computers in different locations? IMAP, with modern capable IMAP clients, is an ideal way to access multiple mail folders on multiple IMAP servers from multiple clients, all simultaneously. Moving to 'local folders' in that case isn't helpful. local is just one option -- you can copy and/or move messages to _any_ folder that the MUA has access to! And yes, you could setup two accounts - one on the main server and one to your cyrus setup - and move messages manually, Exactly. It's _trivial_ to do with any modern and capable IMAP client! but then why not fetchmail to the cyrus setup directly too? Well, partly because fetchmail is a rather horrible hack in terms of its code and implementation, but mostly because in doing so you're violating way too many protocol levels and introducing all kinds of possible problems and errors, some of which will cause your mail to be lost, and others of which will compromise the security of both servers. The best and proper way to transport mail to any given desired location is to use a proper and robust Mail Transport Agent with whatever protocol is most appropriate and effective for the job. Fetchmail is not a solution to anything, and never was! -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Sat, Nov 07, 2009 at 11:08:31AM -0500, Greg A. Woods wrote: At Tue, 3 Nov 2009 17:07:04 -0500, Anthony Tibbs anthony-l...@tibbs.ca wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client You know, I don't know if I agree with all the objections over this person's request. I actually have a similar setup where Fetchmail is used to retrieve messages from a remote mailbox for injection into a Cyrus setup, primarily because of quota requirements on the far end. Oy! Why are you using broken hacks when a perfectly good solution is just begging to be used? Just get a forwarding alias installed on the remote mail server and then you'll be using the MTA to move your mail in a robust, secure, and fail-safe manner to the IMAP server where you desire it to be finally delivered. Maybe unreliable network connectivity? A dynamic IP where they don't want a stale DynDNS pointer to cause someone else to get the mail? Pull vs Push in the abstract is an age old question that never has only one answer, much as you are trying to paint it that way. The rest of this is kinda just BS about how to use a proper IMAP client. Er, you know a perfect IMAP client? I've never been able to find a good one, which is why I use offlineimap to local Maildirs and mutt to talk to them. Yes, modern MUA's offer the ability to store messages locally, but what if you have that MUA installed in several computers in different locations? IMAP, with modern capable IMAP clients, is an ideal way to access multiple mail folders on multiple IMAP servers from multiple clients, all simultaneously. Uses more bandwidth than a single pull to local followed by the above to the local IMAP store. Fact. accounts - one on the main server and one to your cyrus setup - and move messages manually, Exactly. It's _trivial_ to do with any modern and capable IMAP client! So trivial you could replace it with a script. Woah, wait. That's what everyone else on this thread has been suggesting all along! but then why not fetchmail to the cyrus setup directly too? Well, partly because fetchmail is a rather horrible hack in terms of its code and implementation, but mostly because in doing so you're violating way too many protocol levels and introducing all kinds of possible problems and errors, some of which will cause your mail to be lost, and others of which will compromise the security of both servers. The best and proper way to transport mail to any given desired location is to use a proper and robust Mail Transport Agent with whatever protocol is most appropriate and effective for the job. Fetchmail is not a solution to anything, and never was! Ahh, I see. Fetchmail screwed your dog and pissed in your cereal. Rumour has it that offlineimap supports running an IMAP server locally and synchronising changes in BOTH directions, with the help of a little on-disk-database to keep track of who changed what. I don't use it because last time I did it was still buggy and new, and now I'm wary. So I just use local Maildirs. A Cyrus instance on my laptop using it would be pretty shiny for testing stuff though. Hmm. This whole fetchmail thing is a tangent. Implementation detail. The important thing was pull versus push and how to trigger the monkey with a modern email client equivalent of a copy between IMAP folders, but scripted. Regards, Bron. Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
but then why not fetchmail to the cyrus setup directly too? Well, partly because fetchmail is a rather horrible hack in terms of its code and implementation, So what? Seriously, if a tool accomplishes the task... and accomplishing the task is the purpose for the technology to exist in the first place. The quality of code and implementation of many mainstream products could be question - but at the end it just doesn't matter - they are accomplishing the ends for their users. but mostly because in doing so you're violating way too many protocol levels Bogus, Fetchmail is a POP/IMAP/SMTP client that automatically moves messages based upon its configuration. It doesn't violate any protocol levels at all. If I drag-and-drop messages with my GUI MUA between two servers, or use fetchmail, it is the exact same affect and both are perfectly legitimate. Except, of course, that fetchmail will do so at 3AM every morning while I sleep. and introducing all kinds of possible problems and errors, Such as? I've used fetchmail on several occasions and never had all kinds of problems. some of which will cause your mail to be lost, and Right, just like a misconfigured MTA will, or a botched DNS server. others of which will compromise the security of both servers. No more so that the use of a MUA; it is just an IMAP/SMTP client after all. The best and proper way to transport mail to any given desired location is to use a proper and robust Mail Transport Agent with whatever protocol is most appropriate and effective for the job. Sure, assuming that is an option and you the ability to modify all the intermediary systems [not likely in the real-world]. Fetchmail is not a solution to anything, and never was! It is an excellent solution for automatically moving messages from one mailbox to another; just like it always has been. -- OpenGroupware developer: awill...@whitemice.org http://whitemiceconsulting.blogspot.com/ OpenGroupare Cyrus IMAPd documenation @ http://docs.opengroupware.org/Members/whitemice/wmogag/file_view Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
You know, I don't know if I agree with all the objections over this person's request. I actually have a similar setup where Fetchmail is used to retrieve messages from a remote mailbox for injection into a Cyrus setup, primarily because of quota requirements on the far end. Yes, modern MUA's offer the ability to store messages locally, but what if you have that MUA installed in several computers in different locations? Moving to 'local folders' in that case isn't helpful. And yes, you could setup two accounts - one on the main server and one to your cyrus setup - and move messages manually, but then why not fetchmail to the cyrus setup directly too? - Original Message - From: Greg A. Woods woods-cy...@weird.com To: Cyrus User's Mailing List info-cyrus@lists.andrew.cmu.edu Sent: Friday, October 23, 2009 2:57 PM Subject: Re: Exec'ing a script from Cyrus when imapd has a client At Thu, 22 Oct 2009 18:43:41 -0700 (PDT), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client there can be cases where you are providing mail services for several people, or have multiple machines you use yourself where having an IMAP server is worthwhile. Neither of those things make any real sense whatsoever. They certainly don't define any clear requirements that make sense in this context. Every modern and useful IMAP-capable MUA can collect e-mail from any combination of many IMAP servers anywhere and everywhere all at once. If fetchmail can fetch the mail from an IMAP server, then so can any MUA. Just get rid of all the unnecessary complexity in the middle and just use the MUA for what it's designed to be used for! now, it's unusual to use something like this without having a full MTA, but it's not unheard of. It's not unusual for people to create all kinds of crazy complicated setups that have no real purpose, in every domain in life. I'm sure I make my own life more complicated than it needs to be in some ways. However things do not _need_ to be made more complicated than necessary, Here the OP's question provides a perfect clue showing that something is far more complicated than it needs to be because we see that it will even have to get more complex (and even less robust) before it begins to work the way it would actually work without any of this unnecessary complexity in the middle in the first place. -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
Citeren David Lang david.l...@digitalinsight.com: what do you consider a 'modern IMAP client' that is actually reasonably efficiant to use? I can't help you answer that question. But I can share my setup. I'm using the offlineimap client so sync my IMAP (Cyrus of course) accounts (2 in fact). I then use mutt to read the maildir. This way I use a normal IMAP client when I'm online (or have a fast connection). When I'm offline or on 3G (or worse) I use the offlineimap tool to sync my mailbox now and then. To me using offlineimap to sync my mailbox I much faster than doing IMAP over slow links. It also gives me a backup of my mailbox very easily. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Rudy Gevaert rudy.geva...@ugent.be tel:+32 9 264 4734 Directie ICT, afd. Infrastructuur Direction ICT, Infrastructure dept. Groep Systemen Systems group Universiteit Gent Ghent University Krijgslaan 281, gebouw S9, 9000 Gent, Belgie www.UGent.be -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Tue, Oct 27, 2009 at 12:15:08AM -0400, Greg A. Woods wrote: Too bad, so sad. Seriously. If you really want to use e-mail address at some antique domain where IMAP access is still not available, and where e-mail forwarding is also not available, then you can still just set up your MUA so you can easily move messages from those antiquated POP folders over to suitable IMAP folders on some other system. You do not _need_ fetchmail to do this for you, and you certainly don't need yet another IMAP server to do this for you. Ahh, I've worked with people like this. It's not an architecturally pure enough idea, so we'll come up with a bunch of client-side hacks instead of solving the actual problem, which I will state my understanding of: I want a local IMAP server that I can connect to with multiple different clients if necessary, back up sanely, etc. Due to circumstances, I need it to pull mail in rather than be pushed to. I would _prefer_ to not pull all the time, but only when there's a client - any client - connected That's a viable problem statement. That's a REAL WORLD problem statement. The solutions suggested on this list have basically been your problem isn't viable, you should do things differently because our perfect world doesn't include this architecture. You know what - I would write a system pretty much just like this if I was stuck at the far end of a slow link. I would run a server and run backups on that, treating the copy on the client as a disposable copy rather than trying to back that up. Honestly, please stop shooting down the architecture. This isn't the place to ask how to do the whole problem, but it is the place to ask how can I get the triggering data from Cyrus that I want. Here are the answers we have come up with: 1) parse the log file (this can be made reliable, we use it at FastMail for some things) 2) scan the $conf/proc/ directory 3) inotify on the meta directory (actually, this is somewhat bogus if you don't have atime turned on) Oh, here's a clever one: 4) write a custom saslauthd and trigger from it. 1 and 4 will get you instant notification (near enough) 2 will be cheap, especially if you do like we do and put $conf/proc on tmpfs. 3 just sucks. Most complex and least useful. Bron. Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Tue, Oct 27, 2009 at 08:18:17AM +0100, Rudy Gevaert wrote: Citeren David Lang david.l...@digitalinsight.com: what do you consider a 'modern IMAP client' that is actually reasonably efficiant to use? I can't help you answer that question. But I can share my setup. I'm using the offlineimap client so sync my IMAP (Cyrus of course) accounts (2 in fact). I then use mutt to read the maildir. Heh. You are me. This way I use a normal IMAP client when I'm online (or have a fast connection). When I'm offline or on 3G (or worse) I use the offlineimap tool to sync my mailbox now and then. I use mutt and offlineimap or the FastMail web interface. I don't tend to bother with a separate IMAP client - just run offlineimap and then use mutt. To me using offlineimap to sync my mailbox I much faster than doing IMAP over slow links. It also gives me a backup of my mailbox very easily. Offlineimap is slow too - it syncs all the flags and internaldates on every message, every time. You might want this patch: http://github.com/brong/brong-offlineimap/commit/7846ab83c5c45911749ab1cb42569702363a619b You'll need a pretty current Cyrus of course, but then you get COMPRESS=DEFLATE support built in to offlineimap. I find about 80% bandwidth savings when there are few actual changes on a big account. Bron. Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
Citeren Bron Gondwana br...@fastmail.fm: You might want this patch: http://github.com/brong/brong-offlineimap/commit/7846ab83c5c45911749ab1cb42569702363a619b You'll need a pretty current Cyrus of course, but then you get COMPRESS=DEFLATE support built in to offlineimap. I find about 80% bandwidth savings when there are few actual changes on a big account. Thanks. When we upgrade to the latest cyrus I'll enable compress and try it! Rudy -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Rudy Gevaert rudy.geva...@ugent.be tel:+32 9 264 4734 Directie ICT, afd. Infrastructuur Direction ICT, Infrastructure dept. Groep Systemen Systems group Universiteit Gent Ghent University Krijgslaan 281, gebouw S9, 9000 Gent, Belgie www.UGent.be -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Tue, 2009-10-27 at 08:18 +0100, Rudy Gevaert wrote: Citeren David Lang david.l...@digitalinsight.com: what do you consider a 'modern IMAP client' that is actually reasonably efficiant to use? I can't help you answer that question. But I can share my setup. I use Evolution on my laptop, I don't know if it is efficient but it works for online/offline very well [and with Copy folder content locally for offline operations I can search mail - and attachments - along with all other documents - with Beagle]. I'm a big fan. I'm using the offlineimap client so sync my IMAP (Cyrus of course) accounts (2 in fact). My server is, of course, Cyrus. While I don't use fetchmail to aggregate mail currently I have in the past and don't see anything unreasonable about doing so. Sometimes arraigning for inbound SMTP is either not feasible or just expensive. I then use mutt to read the maildir. This way I use a normal IMAP client when I'm online (or have a fast connection). When I'm offline or on 3G (or worse) I use the offlineimap tool to sync my mailbox now and then. Yep, I used fetchmail to pull mail into a Cyrus server on a network that only had Inet connectivity over a cell connection [that required a 30ft. tower and high-gain antenna in order to get even that]. To me using offlineimap to sync my mailbox I much faster than doing IMAP over slow links. It also gives me a backup of my mailbox very easily. I'm thinking about using imapsync for a backup solution. I've moved by Cyrus server to a hosted VM at linnode and I'm currently just rsync'ing to a local physcial box for backup. But that kind of stinks. Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Tue, 2009-10-27 at 08:58 -0400, Adam Tauno Williams wrote: On Tue, 2009-10-27 at 08:18 +0100, Rudy Gevaert wrote: To me using offlineimap to sync my mailbox I much faster than doing IMAP over slow links. It also gives me a backup of my mailbox very easily. I'm thinking about using imapsync for a backup solution. I've moved by Cyrus server to a hosted VM at linnode and I'm currently just rsync'ing to a local physcial box for backup. But that kind of stinks. I used imapsync to upgrade cyrus (from 1.5 to 2.3), it seems like a pretty solid piece of software. At least it worked like a charm in my case. Xav Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Fri, 23 Oct 2009 13:37:30 -0700 (PDT), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client I possibly missed it, but I didn't see anything that said that fetchmail was grabbing things via IMAP. Yup, I think you missed it. if you have intermittent/expensive-per-min internet connectivity doing something like this has value. Nope, not really. All modern useful IMAP clients can work offline too. All another IMAP server is doing is adding to the complexity _and_ decreasing, i.e. lowering, the robustness of the overall solution. another reason to run your own server is just to be free from quotas. many ISPs have small mail quotas. All modern useful IMAP clients can also store message locally -- moving them from server to server, or server to local (or back), is as simple as selecting and saving/dragging messages between folders. -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Mon, 2009-10-26 at 12:36 -0400, Greg A. Woods wrote: At Fri, 23 Oct 2009 13:37:30 -0700 (PDT), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client I possibly missed it, but I didn't see anything that said that fetchmail was grabbing things via IMAP. Yup, I think you missed it. if you have intermittent/expensive-per-min internet connectivity doing something like this has value. Nope, not really. All modern useful IMAP clients can work offline too. All another IMAP server is doing is adding to the complexity _and_ decreasing, i.e. lowering, the robustness of the overall solution. another reason to run your own server is just to be free from quotas. many ISPs have small mail quotas. All modern useful IMAP clients can also store message locally -- moving them from server to server, or server to local (or back), is as simple as selecting and saving/dragging messages between folders. - not all mail providers do IMAP. - not all mail providers doing IMAP guarantee unlimited storage or lifelong mail availability. - some users have accumulated mail providers and want to centralize everything in a trusted server That's what I do with Cyrus: fetching mail from various POP3 sources, and having all where we can access it, from several IMAP clients. That you may find this solution not optimal isn't the question (nor really my problem, in fact), I just wanted my server to rest a bit when unused (spinning off the drives array has measurable power gains), so I wanted to be able to know when Cyrus has connected users. Thanks, Xav Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Mon, 26 Oct 2009, Greg A. Woods wrote: At Fri, 23 Oct 2009 13:37:30 -0700 (PDT), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client I possibly missed it, but I didn't see anything that said that fetchmail was grabbing things via IMAP. Yup, I think you missed it. if you have intermittent/expensive-per-min internet connectivity doing something like this has value. Nope, not really. All modern useful IMAP clients can work offline too. All another IMAP server is doing is adding to the complexity _and_ decreasing, i.e. lowering, the robustness of the overall solution. another reason to run your own server is just to be free from quotas. many ISPs have small mail quotas. All modern useful IMAP clients can also store message locally -- moving them from server to server, or server to local (or back), is as simple as selecting and saving/dragging messages between folders. in my mind, having the IMAP client copy all messages to the local drive goes a long way to defeating the benifits of using IMAP in the first place. what do you consider a 'modern IMAP client' that is actually reasonably efficiant to use? there are a lot of 'IMAP clients' out there that treat IMAP as if it was POP (downloading everything and then working on it locally, taking _no_ advantage of the server capabilities) I am interested in finding such a client because at the moment I am using pine and mulberry, both of which are very good at using the server, but not exactly 'modern'. David Lang Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Mon, 2009-10-26 at 10:07 -0700, David Lang wrote: On Mon, 26 Oct 2009, Greg A. Woods wrote: At Fri, 23 Oct 2009 13:37:30 -0700 (PDT), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client I possibly missed it, but I didn't see anything that said that fetchmail was grabbing things via IMAP. Yup, I think you missed it. if you have intermittent/expensive-per-min internet connectivity doing something like this has value. Nope, not really. All modern useful IMAP clients can work offline too. All another IMAP server is doing is adding to the complexity _and_ decreasing, i.e. lowering, the robustness of the overall solution. another reason to run your own server is just to be free from quotas. many ISPs have small mail quotas. All modern useful IMAP clients can also store message locally -- moving them from server to server, or server to local (or back), is as simple as selecting and saving/dragging messages between folders. in my mind, having the IMAP client copy all messages to the local drive goes a long way to defeating the benifits of using IMAP in the first place. The drive is not exactly local, it's on a separate server (which does mainly mail and file server), which is accessed remotely or not, depending on who uses it and when. what do you consider a 'modern IMAP client' that is actually reasonably efficiant to use? there are a lot of 'IMAP clients' out there that treat IMAP as if it was POP (downloading everything and then working on it locally, taking _no_ advantage of the server capabilities) I am interested in finding such a client because at the moment I am using pine and mulberry, both of which are very good at using the server, but not exactly 'modern'. I admit I have yet to find the ideal IMAP client, efficiency-wise. But that's another problem. Xav Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Mon, 26 Oct 2009, Xavier Bestel wrote: On Mon, 2009-10-26 at 10:07 -0700, David Lang wrote: On Mon, 26 Oct 2009, Greg A. Woods wrote: At Fri, 23 Oct 2009 13:37:30 -0700 (PDT), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client I possibly missed it, but I didn't see anything that said that fetchmail was grabbing things via IMAP. Yup, I think you missed it. if you have intermittent/expensive-per-min internet connectivity doing something like this has value. Nope, not really. All modern useful IMAP clients can work offline too. All another IMAP server is doing is adding to the complexity _and_ decreasing, i.e. lowering, the robustness of the overall solution. another reason to run your own server is just to be free from quotas. many ISPs have small mail quotas. All modern useful IMAP clients can also store message locally -- moving them from server to server, or server to local (or back), is as simple as selecting and saving/dragging messages between folders. in my mind, having the IMAP client copy all messages to the local drive goes a long way to defeating the benifits of using IMAP in the first place. The drive is not exactly local, it's on a separate server (which does mainly mail and file server), which is accessed remotely or not, depending on who uses it and when. I was responding to Greg, who was saying that all modern IMAP clients will copy the mail to the local drive so that they can work offline. David Lang what do you consider a 'modern IMAP client' that is actually reasonably efficiant to use? there are a lot of 'IMAP clients' out there that treat IMAP as if it was POP (downloading everything and then working on it locally, taking _no_ advantage of the server capabilities) I am interested in finding such a client because at the moment I am using pine and mulberry, both of which are very good at using the server, but not exactly 'modern'. I admit I have yet to find the ideal IMAP client, efficiency-wise. But that's another problem. Xav Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Mon, 26 Oct 2009, Xavier Bestel wrote: On Mon, 2009-10-26 at 10:07 -0700, David Lang wrote: On Mon, 26 Oct 2009, Greg A. Woods wrote: At Fri, 23 Oct 2009 13:37:30 -0700 (PDT), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client I possibly missed it, but I didn't see anything that said that fetchmail was grabbing things via IMAP. Yup, I think you missed it. if you have intermittent/expensive-per-min internet connectivity doing something like this has value. Nope, not really. All modern useful IMAP clients can work offline too. All another IMAP server is doing is adding to the complexity _and_ decreasing, i.e. lowering, the robustness of the overall solution. another reason to run your own server is just to be free from quotas. many ISPs have small mail quotas. All modern useful IMAP clients can also store message locally -- moving them from server to server, or server to local (or back), is as simple as selecting and saving/dragging messages between folders. in my mind, having the IMAP client copy all messages to the local drive goes a long way to defeating the benifits of using IMAP in the first place. The drive is not exactly local, it's on a separate server (which does mainly mail and file server), which is accessed remotely or not, depending on who uses it and when. I was responding to Greg, who was saying that all modern IMAP clients will copy the mail to the local drive so that they can work offline. There is another point which can be very important in the corporate world: even if the mail clients are so wonderful that they can connect to multiple servers and copy mail between them and you can configure everything so nicely in a hundred config windows and tabs, maybe you simply don't want to configure it on the client side but prefer to do as much as possible on the server side. Then you can use tools like fetchmail, cronjobs, scripts to glue things together. That way you are also free to use whatever client you want, you don't depend so much on the clients features. Regards, Simon Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Mon, 26 Oct 2009 17:59:21 +0100, Xavier Bestel xavier.bes...@free.fr wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client - not all mail providers do IMAP. Too bad, so sad. Seriously. If you really want to use e-mail address at some antique domain where IMAP access is still not available, and where e-mail forwarding is also not available, then you can still just set up your MUA so you can easily move messages from those antiquated POP folders over to suitable IMAP folders on some other system. You do not _need_ fetchmail to do this for you, and you certainly don't need yet another IMAP server to do this for you. Personally I would try desperately to get a forwarding alias set up at any domain I needed to use which didn't offer IMAP access (and probably even if it did offer IMAP). - not all mail providers doing IMAP guarantee unlimited storage or lifelong mail availability. Quota limits are easily avoided with any useful modern IMAP client which can move selected messages between folders, including between systems, and including to the local system (wherever the MUA runs). - some users have accumulated mail providers and want to centralize everything in a trusted server Normally we use forwarding aliases to do that. :-) NEVER EVER fetchmail. I have e-mail addresses at a dozen or so domains, and I could probably have many more if I wished, but I have only two main IMAP accounts (and a few test IMAP accounts at sites where I manage systems and software). All my scattered e-mail addresses forward to one of my main IMAP accounts. I don't need or would I ever want any e-mail address where I cannot set up a forwarding alias. That you may find this solution not optimal isn't the question (nor really my problem, in fact), I just wanted my server to rest a bit when unused (spinning off the drives array has measurable power gains), so I wanted to be able to know when Cyrus has connected users. Indeed it's really not a Cyrus problem in the first place. You have created the situation for yourself within which you must now either choose to exist, or to change. :-) If you really want a truly robust central e-mail server then you should probably be hosting it at a dedicated co-location provider and then its power consumption will likely be the least of your worries. Ideally you would set it up to run SMTP as well and then use forwarding aliases at any other domains to collect all your e-mail at this one server. You'd still need to do off-site backups too of course. Ignoring the questionable sanity of using fetchail to feed an IMAP server, what you originally asked is really a systems programming question, one more appropriate for a forum related to systems programming for kind of OS you're running your server on. There are potentially dozens of various ways the same end result could be achieved on any one given OS and system configuration. -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
Getting Cyrus to actually trigger something is much more complex - but you could easily do something with an inotify on the directory if you want smaller than a minute resolution. http://pyinotify.sourceforge.net/ -- openSUSE http://www.opensuse.org/en/ Linux for human beings who need to get things done. Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Thu, 22 Oct 2009 18:43:41 -0700 (PDT), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client there can be cases where you are providing mail services for several people, or have multiple machines you use yourself where having an IMAP server is worthwhile. Neither of those things make any real sense whatsoever. They certainly don't define any clear requirements that make sense in this context. Every modern and useful IMAP-capable MUA can collect e-mail from any combination of many IMAP servers anywhere and everywhere all at once. If fetchmail can fetch the mail from an IMAP server, then so can any MUA. Just get rid of all the unnecessary complexity in the middle and just use the MUA for what it's designed to be used for! now, it's unusual to use something like this without having a full MTA, but it's not unheard of. It's not unusual for people to create all kinds of crazy complicated setups that have no real purpose, in every domain in life. I'm sure I make my own life more complicated than it needs to be in some ways. However things do not _need_ to be made more complicated than necessary, Here the OP's question provides a perfect clue showing that something is far more complicated than it needs to be because we see that it will even have to get more complex (and even less robust) before it begins to work the way it would actually work without any of this unnecessary complexity in the middle in the first place. -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Fri, 23 Oct 2009 13:00:34 -0700 (PDT), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client as long as you are willing to limit yourself to a single MUA on a single desktop/laptop. if you want to be able to access your mail from different devices you need a mail server, not just a MUA Huh? What in the heck are you talking about? I run multiple IMAP clients (some on the same computer, some on different computers) all _simultaneously_, all accessing a half-dozen different mail accounts on different servers around the Internet. All my MUAs access the same folders and same messages directly, and simultaneously. I certainly don't need yet another IMAP server and a whole bunch of unnecessary complexity with things like fetchmail just to do this. What I would really like to learn is why anyone would falsely believe that they do somehow need their own IMAP server for this reason. There must be some false conception or expectation permeating some parts of the ether out there. -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Fri, 23 Oct 2009, Greg A. Woods wrote: At Fri, 23 Oct 2009 13:00:34 -0700 (PDT), David Lang david.l...@digitalinsight.com wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client as long as you are willing to limit yourself to a single MUA on a single desktop/laptop. if you want to be able to access your mail from different devices you need a mail server, not just a MUA Huh? What in the heck are you talking about? I run multiple IMAP clients (some on the same computer, some on different computers) all _simultaneously_, all accessing a half-dozen different mail accounts on different servers around the Internet. All my MUAs access the same folders and same messages directly, and simultaneously. I certainly don't need yet another IMAP server and a whole bunch of unnecessary complexity with things like fetchmail just to do this. I possibly missed it, but I didn't see anything that said that fetchmail was grabbing things via IMAP. if the remote account is POP then doing something like this has value if you have intermittent/expensive-per-min internet connectivity doing something like this has value. I did something similar to this several years ago where a non-profit only had dial-up internet. I ran a local cyrus server and then had a process to bring up the internet connection as-needed. In that case I just polled for mail every half hour and people were willing to live with that at that time. In this case I actually used UUCP through a fixed mail server to do the routing instead of fetchmail, but the basic concept is the same. another reason to run your own server is just to be free from quotas. many ISPs have small mail quotas. David Lang What I would really like to learn is why anyone would falsely believe that they do somehow need their own IMAP server for this reason. There must be some false conception or expectation permeating some parts of the ether out there. Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Tue, 20 Oct 2009 22:54:12 +0200, Xavier Bestel xavier.bes...@free.fr wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client Le mardi 20 octobre 2009 à 13:00 -0700, David Lang a écrit : On Tue, 20 Oct 2009, Greg A. Woods wrote: At Tue, 20 Oct 2009 19:36:24 +0200, Xavier Bestel xavier.bes...@free.fr wrote: Subject: Exec'ing a script from Cyrus when imapd has a client I have a small install with cyrus-imapd 2.3.14, which reads some of its mails with fetchmail. To limit the delay in mail delivery, fetchmail awakes each minute to get mails. What I would like is let fetchmail do that only when there's a client actually reading its mails, i.e. an MUA actually connected to imapd. I don't get it. Are you saying you are using fetchmail to inject messages into a locally running Cyrus install which you then connect to with a locally running IMAP MUA? I think what he is saying is that he does not have a MTA. he uses fetchmail to download mail from elsewhere and put it in cyrus. currently he crons fetchmail to run once a min so that when people are logged in they see new mail with low latencies. however, if nobody is logged in to Cyrus, this is a waste of time, and he would be better off running fetchmail less frequently (or not at all). so he is asking if there is a way to tell if anyone is connected to Cyrus or not, so that if not he can skip the fetchmail run. Yes, that's it, precisely. OK, that's just the kind of crazy overkill and complexity I was talking about. If you don't have an MTA (but you do have an IMAP-capable MUA), then you really do not need or want Cyrus, and you certainly do not want fetchmail either. Just use your IMAP MUA directly for goodness sake! Why all this madness of many unnecessary layers that are just causing way too much confusion? That said, there are a million hacks that could be used, but all they do is increase the complexity ever more. Cyrus IMAP itself doesn't directly support this kind of thing though. -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Tue, 20 Oct 2009 22:56:42 +0200, Xavier Bestel xavier.bes...@free.fr wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client That may be an answer, yes. However I'd have preferred if the signal came from Cyrus directly (I think it'sa more robust solution). Not using Cyrus or fetchmail at all in this scenario is pretty much infinitely more robust. :-) -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Thu, 22 Oct 2009, Greg A. Woods wrote: At Tue, 20 Oct 2009 22:54:12 +0200, Xavier Bestel xavier.bes...@free.fr wrote: Subject: Re: Exec'ing a script from Cyrus when imapd has a client Le mardi 20 octobre 2009 à 13:00 -0700, David Lang a écrit : On Tue, 20 Oct 2009, Greg A. Woods wrote: At Tue, 20 Oct 2009 19:36:24 +0200, Xavier Bestel xavier.bes...@free.fr wrote: Subject: Exec'ing a script from Cyrus when imapd has a client I have a small install with cyrus-imapd 2.3.14, which reads some of its mails with fetchmail. To limit the delay in mail delivery, fetchmail awakes each minute to get mails. What I would like is let fetchmail do that only when there's a client actually reading its mails, i.e. an MUA actually connected to imapd. I don't get it. Are you saying you are using fetchmail to inject messages into a locally running Cyrus install which you then connect to with a locally running IMAP MUA? I think what he is saying is that he does not have a MTA. he uses fetchmail to download mail from elsewhere and put it in cyrus. currently he crons fetchmail to run once a min so that when people are logged in they see new mail with low latencies. however, if nobody is logged in to Cyrus, this is a waste of time, and he would be better off running fetchmail less frequently (or not at all). so he is asking if there is a way to tell if anyone is connected to Cyrus or not, so that if not he can skip the fetchmail run. Yes, that's it, precisely. OK, that's just the kind of crazy overkill and complexity I was talking about. If you don't have an MTA (but you do have an IMAP-capable MUA), then you really do not need or want Cyrus, and you certainly do not want fetchmail either. Just use your IMAP MUA directly for goodness sake! there can be cases where you are providing mail services for several people, or have multiple machines you use yourself where having an IMAP server is worthwhile. and if you are going to setup an IMAP server, why use anything less than the best? ;-) now, it's unusual to use something like this without having a full MTA, but it's not unheard of. David Lang Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
At Tue, 20 Oct 2009 19:36:24 +0200, Xavier Bestel xavier.bes...@free.fr wrote: Subject: Exec'ing a script from Cyrus when imapd has a client I have a small install with cyrus-imapd 2.3.14, which reads some of its mails with fetchmail. To limit the delay in mail delivery, fetchmail awakes each minute to get mails. What I would like is let fetchmail do that only when there's a client actually reading its mails, i.e. an MUA actually connected to imapd. I don't get it. Are you saying you are using fetchmail to inject messages into a locally running Cyrus install which you then connect to with a locally running IMAP MUA? Maybe you should just eliminate fetchmail from the picture and then see if things make more sense. Just point your MUA at the originating IMAP server and eliminate everything in between. If you're using an IMAP capable client, and you're using IMAP to read your e-mail, then you don't need or want fetchmail -- it's just a rather nasty old hack for the days before IMAP. Personally I think the last usable copy of fetchmail should be archived away on an ancient 9-track magnetic tape reel and put behind a little glass door which has Break glass in case of emergency written on it. Everything is ever so much easier and simpler if you can just eliminate all the unnecessary complexities, such as fetchmail. (if you want to keep a copy of your messages on your local machine, then you can and should probably just use your MUA to do that) -- Greg A. Woods +1 416 218-0098VE3TCP RoboHack wo...@robohack.ca Planix, Inc. wo...@planix.com Secrets of the Weird wo...@weird.com Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Tue, 20 Oct 2009, Greg A. Woods wrote: At Tue, 20 Oct 2009 19:36:24 +0200, Xavier Bestel xavier.bes...@free.fr wrote: Subject: Exec'ing a script from Cyrus when imapd has a client I have a small install with cyrus-imapd 2.3.14, which reads some of its mails with fetchmail. To limit the delay in mail delivery, fetchmail awakes each minute to get mails. What I would like is let fetchmail do that only when there's a client actually reading its mails, i.e. an MUA actually connected to imapd. I don't get it. Are you saying you are using fetchmail to inject messages into a locally running Cyrus install which you then connect to with a locally running IMAP MUA? I think what he is saying is that he does not have a MTA. he uses fetchmail to download mail from elsewhere and put it in cyrus. currently he crons fetchmail to run once a min so that when people are logged in they see new mail with low latencies. however, if nobody is logged in to Cyrus, this is a waste of time, and he would be better off running fetchmail less frequently (or not at all). so he is asking if there is a way to tell if anyone is connected to Cyrus or not, so that if not he can skip the fetchmail run. David Lang Maybe you should just eliminate fetchmail from the picture and then see if things make more sense. Just point your MUA at the originating IMAP server and eliminate everything in between. If you're using an IMAP capable client, and you're using IMAP to read your e-mail, then you don't need or want fetchmail -- it's just a rather nasty old hack for the days before IMAP. Personally I think the last usable copy of fetchmail should be archived away on an ancient 9-track magnetic tape reel and put behind a little glass door which has Break glass in case of emergency written on it. Everything is ever so much easier and simpler if you can just eliminate all the unnecessary complexities, such as fetchmail. (if you want to keep a copy of your messages on your local machine, then you can and should probably just use your MUA to do that) Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
Hi there, maybe logsurfer (or something similar) would be of help, you could monitor your cyrus logs with it and run fetchmail accordingly: http://www.crypt.gen.nz/logsurfer/ http://sourceforge.net/projects/logsurfer/ Regards, Stephan Am Dienstag 20 Oktober 2009 19:36:24 schrieb Xavier Bestel: Hi, I have a small install with cyrus-imapd 2.3.14, which reads some of its mails with fetchmail. To limit the delay in mail delivery, fetchmail awakes each minute to get mails. What I would like is let fetchmail do that only when there's a client actually reading its mails, i.e. an MUA actually connected to imapd. So, my question: how to hook a script each time a client connects/disconnects from imapd ? Thanks, Xav Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html -- If a train station is a place where a train stops, what's a workstation? Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
Le mardi 20 octobre 2009 à 13:00 -0700, David Lang a écrit : On Tue, 20 Oct 2009, Greg A. Woods wrote: At Tue, 20 Oct 2009 19:36:24 +0200, Xavier Bestel xavier.bes...@free.fr wrote: Subject: Exec'ing a script from Cyrus when imapd has a client I have a small install with cyrus-imapd 2.3.14, which reads some of its mails with fetchmail. To limit the delay in mail delivery, fetchmail awakes each minute to get mails. What I would like is let fetchmail do that only when there's a client actually reading its mails, i.e. an MUA actually connected to imapd. I don't get it. Are you saying you are using fetchmail to inject messages into a locally running Cyrus install which you then connect to with a locally running IMAP MUA? I think what he is saying is that he does not have a MTA. he uses fetchmail to download mail from elsewhere and put it in cyrus. currently he crons fetchmail to run once a min so that when people are logged in they see new mail with low latencies. however, if nobody is logged in to Cyrus, this is a waste of time, and he would be better off running fetchmail less frequently (or not at all). so he is asking if there is a way to tell if anyone is connected to Cyrus or not, so that if not he can skip the fetchmail run. Yes, that's it, precisely. Xav Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
Hi, Le mardi 20 octobre 2009 à 22:22 +0200, steff...@gmx.de a écrit : maybe logsurfer (or something similar) would be of help, you could monitor your cyrus logs with it and run fetchmail accordingly: http://www.crypt.gen.nz/logsurfer/ http://sourceforge.net/projects/logsurfer/ That may be an answer, yes. However I'd have preferred if the signal came from Cyrus directly (I think it'sa more robust solution). Thanks, Xav Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Exec'ing a script from Cyrus when imapd has a client
On Tue, Oct 20, 2009 at 10:56:42PM +0200, Xavier Bestel wrote: Hi, Le mardi 20 octobre 2009 à 22:22 +0200, steff...@gmx.de a écrit : maybe logsurfer (or something similar) would be of help, you could monitor your cyrus logs with it and run fetchmail accordingly: http://www.crypt.gen.nz/logsurfer/ http://sourceforge.net/projects/logsurfer/ That may be an answer, yes. However I'd have preferred if the signal came from Cyrus directly (I think it'sa more robust solution). Log watching is actually pretty good - but another option is to monitor the $conf/proc/ directory. When someone is connected there will be a file in there with their username and what folder they currently have selected. Your cron job could just grep that folder and run if there was a file with the required username present. [br...@imap1 proc]$ grep brong * 31327:web6.internal [10.202.2.215] brong user.brong Getting Cyrus to actually trigger something is much more complex - but you could easily do something with an inotify on the directory if you want smaller than a minute resolution. Bron. Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html