Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] sup-sync-back imap support
@ 2008-10-13 23:06 Dimitri Aivaliotis
  2008-10-14 20:18 ` William Morgan
  0 siblings, 1 reply; 3+ messages in thread
From: Dimitri Aivaliotis @ 2008-10-13 23:06 UTC (permalink / raw)


Hi All,

First of all, I want to thank William for creating a very useful tool
that I've been using since version 0.0.6.  As a mail client, sup has
really grown up, and I look forward to seeing the work spawned by the
recent STS work released under Heliotrope.

Now for the request: does anybody have a dusty patch to sup-sync-back
to make it work with IMAP sources lying around anywhere?  Perhaps with
just functionality for --drop-spam?

I've been using sup exclusively with an IMAP source, and since it's
always been from one computer, I haven't missed the sync-back
functionality.  But now I've got the problem that I'm migrating from
one IMAP server to another, and I don't want to sync the thousands of
messages that only sup recognizes as spam.

If there's no response, I guess I'll cook up a patch sometime in the
next few weeks, as I'd really like to move away from my ageing
mailsystem.

Thanks,
- Dimitri


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [sup-talk] sup-sync-back imap support
  2008-10-13 23:06 [sup-talk] sup-sync-back imap support Dimitri Aivaliotis
@ 2008-10-14 20:18 ` William Morgan
       [not found]   ` <55c107bf0810201644m5888cb42r6087c016f071361b@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: William Morgan @ 2008-10-14 20:18 UTC (permalink / raw)


Hi Dmitri,

Reformatted excerpts from Dimitri Aivaliotis's message of 2008-10-13:
> Now for the request: does anybody have a dusty patch to sup-sync-back
> to make it work with IMAP sources lying around anywhere?  Perhaps with
> just functionality for --drop-spam?

I don't have a patch, but I've just made a couple commits to the next
branch to make this easier, at least as a one-off task. Unfortunately I
haven't quite gotten it to work.

Git pull and then try something like this:

  $ sh devel/console.sh
  [Tue Oct 14 13:06:24 -0700 2008] using character set encoding "UTF-8"
  [Tue Oct 14 13:06:24 -0700 2008] optional 'chronic' library not found (run 'gem install chronic' to install)
  [Tue Oct 14 13:06:24 -0700 2008] crypto: detected gpg binary in /usr/bin/gpg
  [Tue Oct 14 13:06:24 -0700 2008] loading index...
  [Tue Oct 14 13:06:24 -0700 2008] loaded index of 168 messages
  >> docids = Index.ferret.search("label:spam", :limit => :all).hits.map { |h| h.doc }
  => [166]
  >> imap_ids = docids.map { |id| Index.ferret[id][:source_info].to_i }
  => [12235610720003659]
  >> source = Index.sources.select { |s| s.is_a? IMAP }.first
  => #<Recoverable:0x2b86d8889c28 @mutex=#<Mutex:0x2b86d8889bd8>, errorn...>

  ## (or however you want to get the source. if you have more than one
  ## IMAP source, you'll have to look at Index.ferret[id][:source_id] as
  ## well, and match them up to the source.id for each source

  >> Index.ferret[166][:subject]
  => "__START_SUBJECT__ *****SPAM***** exclusive flash __END_SUBJECT__"
  ## (just making sure)

  >> source.mark_as_deleted imap_ids
  [Tue Oct 14 13:08:28 -0700 2008] Connecting to IMAP server xxx:993...
  [Tue Oct 14 13:08:28 -0700 2008] Logging in...
  [Tue Oct 14 13:08:28 -0700 2008] CRAM-MD5 authentication failed: Net::IMAP::NoResponseError. Trying LOGIN auth...
  [Tue Oct 14 13:08:29 -0700 2008] Successfully connected to imaps://xxx/.
  [Tue Oct 14 13:08:29 -0700 2008] fetching IMAP headers 1..183
  [Tue Oct 14 13:08:30 -0700 2008] done fetching IMAP headers
  => [#<struct Net::IMAP::FetchData seqno=153, attr={"FLAGS"=>[:Seen, :Deleted]}>]
  >> source.expunge
  [Tue Oct 14 13:08:36 -0700 2008] fetching IMAP headers 1..183
  [Tue Oct 14 13:08:37 -0700 2008] done fetching IMAP headers
  => true

Unfortunately the expunge command doesn't seem to have any actual
effect. I'm not sure if this is because the server I'm using is broken,
or what. It seems like this should work.

So you can take it from here. I'm done trying to make IMAP act
reasonable. :)
-- 
William <wmorgan-sup at masanjin.net>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [sup-talk] sup-sync-back imap support
       [not found]   ` <55c107bf0810201644m5888cb42r6087c016f071361b@mail.gmail.com>
@ 2008-10-21  0:01     ` William Morgan
  0 siblings, 0 replies; 3+ messages in thread
From: William Morgan @ 2008-10-21  0:01 UTC (permalink / raw)


Reformatted excerpts from Dimitri Aivaliotis's message of 2008-10-20:
> I've finally been able to give your patch a try.  It worked like a
> charm for me!

Cool, glad to hear it.
-- 
William <wmorgan-sup at masanjin.net>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-21  0:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-13 23:06 [sup-talk] sup-sync-back imap support Dimitri Aivaliotis
2008-10-14 20:18 ` William Morgan
     [not found]   ` <55c107bf0810201644m5888cb42r6087c016f071361b@mail.gmail.com>
2008-10-21  0:01     ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox