Subject: Re: [sup-talk] Questions about offlineimap+msmtp+maildir+gmail syncing

From: Anirudh Sanjeev <[email-masked]>
Date: Sun, 17 Jan 2010 22:27:19 +0530

Hi,

I wrote a small document describing how I got sup to work with Gmail,
since there isn't any "definitive" guide on it.

I really want some review and feedback on the text:
http://sup.rubyforge.org/wiki/wiki.pl?GmailOfflineImapSmtp

Thank you,
Anirudh

--
http://anirudhsanjeev.org
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Scott Henson <[email-masked]>
Date: Sun, 17 Jan 2010 12:52:56 -0500

On Sun, Jan 17, 2010 at 9:54 AM, William Morgan <[email-masked]>wrote:

> Reformatted excerpts from Tero Tilus's message of 2010-01-16:
> > Why would you need to do that?  Afaik storing the maildir id to index
> > should be enough so that you can map sup index back to maildir.  Am I
> > overlooking somethin here?
>
> Yeah, there's a Maildir#filename_for_id that you should be able to use.
>
>
Using the maildir id as the sup id allows sup to play a little fast and
loose with the access of mail in the maildir.  I've got a 15% speed increase
(measured by sup-sync --all).  This also allows sup to play nice with other
mail clients accessing the maildir.

I'm down to the last few issues with my new maildir sync back code, I just
can't get sup to show me the deleted and spam messages.  I'm working on the
next branch, and it seems like it might be having problems with ruby 1.8
that comes with F12 and I seem to be unable to get ruby 1.9 installed.  Once
I get things working I'll publish the branch to github.

-- 
Scott Henson

---

From: William Morgan <[email-masked]>
Date: Thu, 14 Jan 2010 09:07:44 -0500

Reformatted excerpts from Anirudh Sanjeev's message of 2010-01-06:
> Since sup supports sync with mbox, is there any utility that takes IMAP
> and packs it into mbox format, or maybe converts Maildir messages into
> mbox?

Fetchmail for the first, and I think there's probably and md2mbox or
something out there for the second.
-- 
William <[email-masked]>
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Anirudh Sanjeev <[email-masked]>
Date: Wed, 06 Jan 2010 17:08:20 +0530

Hi,

This is my first real email with sup! I configured sup to work with my
Gmail(hosted apps) account as follows:

1. Offlineimap fetches email and saves to Maildir (I am behind a very
   slow connection, I need to mirror email)
2. The appropriate Maildir is added as a source in sup. Specifically,
   the Gmail.[All Mail] Folder, which has "cur".
3. I configured msmtp to be used for sending email instead of sendmail.

So far I can read all my emails, and the experience is great. I have a
few minor questions:

1. When I send email via sup, I see the same email as an unread message
   in my Gmail web frontend in the Inbox folder rather than the sent
   folder.
2. Any changes in sup aren't reflected in my web frontend. I am guessing
   this is a problem with my offlineimap configuration. Deleting or
   archiving an email doesn't change anything in the web client.
3. I am unable to work with the drafts already existing in Gmail and the
   web interface is unaware of the drafts I have here. A suggestion on
   how to fix this would be awesome!.
4. Any other suggestions on how to make the experience with offlineimap
   would be awesome! I initially used offlineimap's imap server
   mirroring feature, but I found putting the emails in Maildir format
   made it a lot easier.

I've pasted some of my config files here:
1. My config.yaml - http://antileet.pastebin.com/m3209dc32
2. My sources.yaml - http://antileet.pastebin.com/m6fc935ee
3. My .msmtprc - http://antileet.pastebin.com/m564eafc3
4. My .offlineimaprc - http://antileet.pastebin.com/m3ac306b6

Please help me get sup working! This is exactly what I've been looking
for. I promise to write up a detailed tutorial for the Wiki if I can get
it to work :)

Thanks,
Anirudh

--
Senior undergraduate student, Indian Institute of Technology, Kharagpur
http://anirudhsanjeev.org
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Scott Henson <[email-masked]>
Date: Mon, 18 Jan 2010 23:44:56 -0500

I'm using Redwood::PollManager.each_message_from source like sup-sync-back
uses.  Looking at the definition of that function, it will load all messages
from the source without discrimination.  I've put my repo up on github (
http://github.com/shenson/sup) with my code in the release branch.  It
includes my code to change the source id to the maildir id.  The code I'm
actually running is in bin/sup-clean.

As far as I can tell, I'm using the same basic structure as sup-sync-back,
so I should be getting back all the messages.  If anyone wants to clue me in
on what I'm doing wrong, I'd be very grateful.  Thanks.

On Sun, Jan 17, 2010 at 3:42 PM, William Morgan <[email-masked]>wrote:

> Reformatted excerpts from Scott Henson's message of 2010-01-17:
> > I'm down to the last few issues with my new maildir sync back code, I
> > just can't get sup to show me the deleted and spam messages.
>
> If you're going through index.each_message or each_id, you need to
> specify :load_spam => true and load_deleted => true.
> --

---

From: Anirudh Sanjeev <[email-masked]>
Date: Thu, 07 Jan 2010 00:39:59 +0530

Hi!

Excerpts from Eric Sherman's message of Wed Jan 06 18:26:20 +0530 2010:
> I would add the ninjagod account to your sup config.yaml and take a look at 
> the wiki [MultipleAccountsAndReply][1] and the reply-from/before-edit 
> [Hooks][2].
That helped, and my outgoing email seems to be sorted out. Thank you.

> The fact that you're not seeing changes is not your fault--sup just doesn't 
> do it.
Oh, that's too bad. Are there any plans to support syncing with IMAP or
Maildir anytime soon? Either way, looks like I'll have to quit the Web
interface and Evolution cold turkey and stick with sup!

Thanks!
Anirudh

---

From: William Morgan <[email-masked]>
Date: Sun, 17 Jan 2010 09:54:48 -0500

---

From: Eric Sherman <[email-masked]>
Date: Wed, 06 Jan 2010 07:56:20 -0500

> 3. I configured msmtp to be used for sending email instead of sendmail.

My setup is similar.

>    in my Gmail web frontend in the Inbox folder rather than the sent

It looks like in your sup config.yaml you're only using one of your two 
accounts to send mail from.  You're probably seeing messages sent from 
[email-masked] in your [email-masked] gmail interface?

[1]: http://sup.rubyforge.org/wiki/wiki.pl?MultipleAccountsAndReply
[2]: http://sup.rubyforge.org/wiki/wiki.pl?Hooks

>    archiving an email doesn't change anything in the web client.

This is because sup is primarily concerned with its own index, and does not 
at present manipulate its sources by default.  Though there is
sup-sync-back which can propagate deleted messages or marked-as-spam back 
to sources--it only supports mbox at present.

>    how to fix this would be awesome!.

You could add your gmail drafts as another source to get them into sup, 
though sup won't actually treat those messages as drafts and you won't see 
sup drafts in gmail.

>    mirroring feature, but I found putting the emails in Maildir format

If sup actually manipulated its sources, you wouldn't have these issues, 
but it doesn't.  So aside from the missing account in your sup config.yaml, 
I'd say your setup is fine and is working as it should.

Sup doesn't play well with other interfaces manipulating its 
sources--you'll be doing the sup-sync dance a lot.  I just stopped using 
other mail clients with my sources and I've been happy ever since.

Good luck,
-eric

---

From: Justin Mason <[email-masked]>
Date: Thu, 14 Jan 2010 14:30:58 +0000

for the first, I've used fetchmail to do that:

: 576...; cat fetchmailrc

poll hostname.domain.com proto IMAP

  user "jmason" pass "[your imap password]" is "jmason"

  folder "name_of_folder"

  ssl

  fetchall

  keep

  no rewrite

  expunge 100

  mda "/usr/bin/procmail -f %F /home/jmason/Mail/procmailrc";

: 577...; cat procmailrc

MAILDIR=$HOME
DEFAULT=$MAILDIR/mbox

:0

$DEFAULT

and it'll append it all to ~/mbox.

--j.

-- 
--j.

---

From: William Morgan <[email-masked]>
Date: Sun, 17 Jan 2010 15:42:57 -0500

---

From: Justin Mason <[email-masked]>
Date: Thu, 14 Jan 2010 14:32:33 +0000

hmm.  apologies for the additional line breaks; a cut and paste bug
with Synergy.  here's fixed versions:

: 577...; cat procmailrc
MAILDIR=$HOME
DEFAULT=$MAILDIR/mbox

:0
$DEFAULT

--j.

---

From: Scott Henson <[email-masked]>
Date: Sat, 16 Jan 2010 12:21:22 -0500

On Wed, Jan 6, 2010 at 2:09 PM, Anirudh Sanjeev <[email-masked]
> wrote:

> and packs it into mbox format, or maybe converts Maildir messages into
I'm currently working on getting sup to support syncing back to maildirs.
I'm using a setup a lot like yours, with offlineimap syncing with an imap
server.

I've currently got a local branch that makes sup use maildir ids as the
internal sup id.  I've almost got sup to the point that it will sync back
changes to a maildir.  I have a few more bugs to work out, but I intend to
post a patch relatively soon.

---

From: Tero Tilus <[email-masked]>
Date: Sat, 16 Jan 2010 22:04:37 +0200

> I'm currently working on getting sup to support syncing back to maildirs.

Wonderful!  I love you!  :-*

> internal sup id.

-- 
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk