Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Michael Stapelberg <michael+sup@stapelberg.de>
To: sup-devel <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] [Heliotrope/Turnsole] How to use IMAP?
Date: Wed, 22 Feb 2012 22:39:42 +0100	[thread overview]
Message-ID: <1329946381-sup-2255@stapelberg.de> (raw)
In-Reply-To: <1329113568-sup-8177@typhon>

Hi William,

Thanks for adding code for this. I got the chance to test this today, and I’m
afraid this doesn’t seem to be working as I would expect.

As far as I can tell from glancing at the source and the state file, this code
examines the date stored in every mail, sorts that, then checks where it
stopped before, and continues from there. I think this is a horrible way of
doing things for two reasons:

1) It involves opening every single email on disk.
2) Date specifications in emails are not to be trusted (think spam).

For the time being, I let procmail save my messages in my IMAP server and in
heliotrope with a little script, which I include here for others to see:

#!/bin/bash
# Delivers mail via dovecot and heliotrope

# load RVM
. /home/michael/.rvm/scripts/rvm

TMPFILE=$(mktemp)

cat > $TMPFILE

cat $TMPFILE | sudo -u mail -- /usr/lib/dovecot/deliver -d michael
cat $TMPFILE | ruby -I/home/michael/heliotrope/lib /home/michael/heliotrope/bin/heliotrope-add >>/tmp/last-mail.stdout 2>>/tmp/last-mail.stderr
rm $TMPFILE

After ensuring that it works, you should get rid of the stdout/stderr redirects
or redirect them properly to a place with logfile rotation, of course.

Note that adding mails via stdin doesn’t work until you change the code like this:
https://github.com/wmorgan/heliotrope/pull/34

Best regards,
Michael
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

  reply	other threads:[~2012-02-22 21:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-08 22:48 Michael Stapelberg
2012-01-10  0:40 ` William Morgan
2012-02-06 20:45   ` Michael Stapelberg
2012-02-06 23:08     ` Matthieu Rakotojaona
2012-02-06 23:46       ` Michael Stapelberg
2012-02-07 12:27         ` Matthieu Rakotojaona
2012-02-07 19:11           ` Michael Stapelberg
2012-02-07 21:54             ` Matthieu Rakotojaona
2012-02-13  6:16 ` William Morgan
2012-02-22 21:39   ` Michael Stapelberg [this message]
2012-02-23  6:25     ` William Morgan
2012-02-23 11:24       ` Michael Stapelberg
2012-02-25  6:35         ` William Morgan
2012-02-27  9:16           ` Michael Stapelberg
2012-02-29  1:11             ` William Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329946381-sup-2255@stapelberg.de \
    --to=michael+sup@stapelberg.de \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox