Exec'ing a script from Cyrus when imapd has a client

Bron Gondwana brong at fastmail.fm
Sat Nov 7 14:54:30 EST 2009


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-list at 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.


More information about the Info-cyrus mailing list