community/pipermail-archives/sup-devel/2011-05.txt (118621B) - raw
1 From hsanson@gmail.com Sun May 1 11:35:28 2011
2 From: hsanson@gmail.com (Horacio Sanson)
3 Date: Mon, 2 May 2011 00:35:28 +0900
4 Subject: [sup-devel] Cannot query Japanese characters
5 In-Reply-To: <1304052708-sup-4240@masanjin.net>
6 References: <201104251023.19659.hsanson@gmail.com>
7 <1303793294-sup-688@masanjin.net>
8 <1304052708-sup-4240@masanjin.net>
9 Message-ID: <BANLkTim9PigP91LaDQ6UG2_prxncYv1zEA@mail.gmail.com>
10
11 Installed whistelpig 0.6 but now I get a different error that looks
12 similar to the turnsole problem. Below the backtrace:
13
14 http://localhost:8042/search?q=primo -> /search?q=%7Einbox&start=0&num=20
15 127.0.0.1 - - [02/May/2011 00:31:58] "GET /favicon.ico HTTP/1.1" 404 447 0.0008
16 localhost - - [02/May/2011:00:31:58 JST] "GET /favicon.ico HTTP/1.1" 404 447
17 - -> /favicon.ico
18 search(body:"?", 0, 20) took 0.0ms
19 Encoding::CompatibilityError - incompatible character encodings: UTF-8
20 and ASCII-8BIT:
21 bin/heliotrope-server:154:in `block in <class:HeliotropeServer>'
22 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:1152:in `call'
23 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:1152:in
24 `block in compile!'
25 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:724:in
26 `instance_eval'
27 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:724:in `route_eval'
28 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:708:in
29 `block (2 levels) in route!'
30 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:758:in
31 `block in process_route'
32 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:755:in `catch'
33 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:755:in
34 `process_route'
35 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:707:in
36 `block in route!'
37 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:706:in `each'
38 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:706:in `route!'
39 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:843:in `dispatch!'
40 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:644:in
41 `block in call!'
42 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in
43 `instance_eval'
44 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in
45 `block in invoke'
46 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in `catch'
47 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in `invoke'
48 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:644:in `call!'
49 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:629:in `call'
50 /var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/head.rb:9:in `call'
51 /var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/showexceptions.rb:21:in
52 `call'
53 /var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:48:in `_call'
54 /var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:36:in `call'
55 /var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/showexceptions.rb:24:in `call'
56 /var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in `call'
57 /var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in `call'
58 /var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in `service'
59 /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
60 /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
61 /usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
62 127.0.0.1 - - [02/May/2011 00:32:09] "GET /search?q=%E4%BC%9A
63 HTTP/1.1" 500 89861 0.0228
64 localhost - - [02/May/2011:00:32:09 JST] "GET /search?q=%E4%BC%9A
65 HTTP/1.1" 500 89861
66 http://localhost:8042/search?q=%7Einbox&start=0&num=20 -> /search?q=%E4%BC%9A
67 127.0.0.1 - - [02/May/2011 00:32:09] "GET /favicon.ico HTTP/1.1" 404 447 0.0009
68 localhost - - [02/May/2011:00:32:09 JST] "GET /favicon.ico HTTP/1.1" 404 447
69 - -> /favicon.ico
70
71 regards,
72 Horacio
73
74 On Fri, Apr 29, 2011 at 1:52 PM, William Morgan
75 <wmorgan-sup at masanjin.net> wrote:
76 > Reformatted excerpts from William Morgan's message of 2011-04-26:
77 >> Thanks for the bug report on this one too. It's great to have someone
78 >> testing this stuff with non-ASCII code. This is a known bug in
79 >> Whistlepig and I should be releasing a fix soon.
80 >
81 > This is fixed in Whistlepig 0.6. Heliotrope should now be fine with
82 > utf-8 input. I'm still working on this issue in turnsole.
83 >
84 > Let me know if you have any more issues!
85 > --
86 > William <wmorgan-sup at masanjin.net>
87 > _______________________________________________
88 > Sup-devel mailing list
89 > Sup-devel at rubyforge.org
90 > http://rubyforge.org/mailman/listinfo/sup-devel
91 >
92
93 From hsanson@gmail.com Sun May 1 11:46:52 2011
94 From: hsanson@gmail.com (Horacio Sanson)
95 Date: Mon, 2 May 2011 00:46:52 +0900
96 Subject: [sup-devel] Cannot query Japanese characters
97 In-Reply-To: <BANLkTim9PigP91LaDQ6UG2_prxncYv1zEA@mail.gmail.com>
98 References: <201104251023.19659.hsanson@gmail.com>
99 <1303793294-sup-688@masanjin.net>
100 <1304052708-sup-4240@masanjin.net>
101 <BANLkTim9PigP91LaDQ6UG2_prxncYv1zEA@mail.gmail.com>
102 Message-ID: <BANLkTi=ObuZiHWGs7Mtvh8J5k4J3KTxgMA@mail.gmail.com>
103
104 I also tried with ruby 1.8 and heliotrope does not crash but searching
105 any Japanese word returns no matches even for search terms I now have
106 matches.
107
108 And by the way the installation instructions should mention that for
109 ruby 1.8 we also need to install the json gem or heliotrope won't
110 start.
111
112 regards,
113 Horacio
114
115 On Mon, May 2, 2011 at 12:35 AM, Horacio Sanson <hsanson at gmail.com> wrote:
116 > Installed whistelpig 0.6 but now I get a different error that looks
117 > similar to the turnsole problem. Below the backtrace:
118 >
119 > http://localhost:8042/search?q=primo -> /search?q=%7Einbox&start=0&num=20
120 > 127.0.0.1 - - [02/May/2011 00:31:58] "GET /favicon.ico HTTP/1.1" 404 447 0.0008
121 > localhost - - [02/May/2011:00:31:58 JST] "GET /favicon.ico HTTP/1.1" 404 447
122 > - -> /favicon.ico
123 > search(body:"?", 0, 20) took 0.0ms
124 > Encoding::CompatibilityError - incompatible character encodings: UTF-8
125 > and ASCII-8BIT:
126 > ?bin/heliotrope-server:154:in `block in <class:HeliotropeServer>'
127 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:1152:in `call'
128 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:1152:in
129 > `block in compile!'
130 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:724:in
131 > `instance_eval'
132 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:724:in `route_eval'
133 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:708:in
134 > `block (2 levels) in route!'
135 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:758:in
136 > `block in process_route'
137 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:755:in `catch'
138 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:755:in
139 > `process_route'
140 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:707:in
141 > `block in route!'
142 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:706:in `each'
143 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:706:in `route!'
144 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:843:in `dispatch!'
145 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:644:in
146 > `block in call!'
147 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in
148 > `instance_eval'
149 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in
150 > `block in invoke'
151 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in `catch'
152 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in `invoke'
153 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:644:in `call!'
154 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:629:in `call'
155 > ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/head.rb:9:in `call'
156 > ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/showexceptions.rb:21:in
157 > `call'
158 > ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:48:in `_call'
159 > ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:36:in `call'
160 > ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/showexceptions.rb:24:in `call'
161 > ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in `call'
162 > ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in `call'
163 > ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in `service'
164 > ?/usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
165 > ?/usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
166 > ?/usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
167 > 127.0.0.1 - - [02/May/2011 00:32:09] "GET /search?q=%E4%BC%9A
168 > HTTP/1.1" 500 89861 0.0228
169 > localhost - - [02/May/2011:00:32:09 JST] "GET /search?q=%E4%BC%9A
170 > HTTP/1.1" 500 89861
171 > http://localhost:8042/search?q=%7Einbox&start=0&num=20 -> /search?q=%E4%BC%9A
172 > 127.0.0.1 - - [02/May/2011 00:32:09] "GET /favicon.ico HTTP/1.1" 404 447 0.0009
173 > localhost - - [02/May/2011:00:32:09 JST] "GET /favicon.ico HTTP/1.1" 404 447
174 > - -> /favicon.ico
175 >
176 > regards,
177 > Horacio
178 >
179 > On Fri, Apr 29, 2011 at 1:52 PM, William Morgan
180 > <wmorgan-sup at masanjin.net> wrote:
181 >> Reformatted excerpts from William Morgan's message of 2011-04-26:
182 >>> Thanks for the bug report on this one too. It's great to have someone
183 >>> testing this stuff with non-ASCII code. This is a known bug in
184 >>> Whistlepig and I should be releasing a fix soon.
185 >>
186 >> This is fixed in Whistlepig 0.6. Heliotrope should now be fine with
187 >> utf-8 input. I'm still working on this issue in turnsole.
188 >>
189 >> Let me know if you have any more issues!
190 >> --
191 >> William <wmorgan-sup at masanjin.net>
192 >> _______________________________________________
193 >> Sup-devel mailing list
194 >> Sup-devel at rubyforge.org
195 >> http://rubyforge.org/mailman/listinfo/sup-devel
196 >>
197 >
198
199 From dmishd@gmail.com Mon May 2 18:02:43 2011
200 From: dmishd@gmail.com (Hamish)
201 Date: Mon, 02 May 2011 23:02:43 +0100
202 Subject: [sup-devel] [PATCH] Fix problem with time parsing
203 Message-ID: <1304373710-sup-1383@whisper>
204
205 If a message has a date with month first and day second, then if the
206 day is greater than 12, heliotrope crashes. This patch catches the
207 error, and tries again after swapping the day and month.
208 ---
209 lib/heliotrope/maildir-walker.rb | 14 +++++++++++++-
210 1 files changed, 13 insertions(+), 1 deletions(-)
211
212 diff --git a/lib/heliotrope/maildir-walker.rb b/lib/heliotrope/maildir-walker.rb
213 index db9b9d4..47cb08b 100644
214 --- a/lib/heliotrope/maildir-walker.rb
215 +++ b/lib/heliotrope/maildir-walker.rb
216 @@ -43,7 +43,19 @@ private
217 while(l = f.gets)
218 if l =~ /^Date:\s+(.+\S)\s*$/
219 date = $1
220 - pdate = Time.parse($1)
221 + begin
222 + pdate = Time.parse($1)
223 + rescue ArgumentError
224 + # flip the day and month around and try again
225 + if date =~ %r|(\d\d?)([-./])(\d\d?)([-./])(\d{2,4})|
226 + date = $3 + $2 + $1 + $4 + $5
227 + pdate = Time.parse(date)
228 + else
229 + puts "Error while parsing time in file #{fn}"
230 + puts "Matched date text was #{date}"
231 + pdate = Time.at 0
232 + end
233 + end
234 return pdate
235 end
236 end
237 --
238 1.7.4.1
239 -------------- next part --------------
240 A non-text attachment was scrubbed...
241 Name: 0001-Fix-problem-with-time-parsing.patch
242 Type: application/octet-stream
243 Size: 1387 bytes
244 Desc: not available
245 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110502/461f580f/attachment.obj>
246
247 From dmishd@gmail.com Mon May 2 18:17:56 2011
248 From: dmishd@gmail.com (Hamish)
249 Date: Mon, 02 May 2011 23:17:56 +0100
250 Subject: [sup-devel] turnsole crash on start up
251 Message-ID: <1304373950-sup-1962@whisper>
252
253 I've finally got around to playing with turnsole, and it crashes out
254 immediately :/
255
256 $ ruby1.9.1 -Ilib -I../heliotrope/lib bin/turnsole
257 /home/mish/dev/sup/turnsole/lib/turnsole/models.rb:88:in `at': can't convert String into an exact number (TypeError)
258 from /home/mish/dev/sup/turnsole/lib/turnsole/models.rb:88:in `initialize'
259 from /home/mish/dev/sup/turnsole/lib/turnsole/client.rb:34:in `new'
260 from /home/mish/dev/sup/turnsole/lib/turnsole/client.rb:34:in `block (2 levels) in search'
261 from /home/mish/dev/sup/turnsole/lib/turnsole/client.rb:34:in `map'
262 from /home/mish/dev/sup/turnsole/lib/turnsole/client.rb:34:in `block in search'
263 from /home/mish/dev/sup/turnsole/lib/turnsole/ui.rb:76:in `call'
264 from /home/mish/dev/sup/turnsole/lib/turnsole/ui.rb:76:in `step'
265 from bin/turnsole:134:in `<main>'
266
267 I tried in the web browser, and a search appears to work fine (and is
268 impressively quick :) for a couple of terms I tried. But when I click on
269 the inbox link, I go to URL:
270
271 http://localhost:8042/search?q=~inbox
272
273 and get a big old error page :( The relevant parts are:
274
275 TypeError at /search
276 false can't be coerced into Fixnum
277 file: heliotrope-server location: - line: 377
278
279 [snip]
280
281 bin/heliotrope-server in -
282 377. date = escape_html Time.at(thread[:date]).strftime("%Y/%m/%d %H:%M")
283 bin/heliotrope-server in strftime
284 377. date = escape_html Time.at(thread[:date]).strftime("%Y/%m/%d %H:%M")
285 bin/heliotrope-server in threadinfo_to_html
286 377. date = escape_html Time.at(thread[:date]).strftime("%Y/%m/%d %H:%M")
287 bin/heliotrope-server in block (2 levels) in <class:HeliotropeServer>
288 157. results.map { |r| threadinfo_to_html r }.join +
289 bin/heliotrope-server in map
290 157. results.map { |r| threadinfo_to_html r }.join +
291 bin/heliotrope-server in block in <class:HeliotropeServer>
292 157. results.map { |r| threadinfo_to_html r }.join +
293 /usr/lib/ruby/1.9.1/webrick/httpserver.rb in service
294 111. si.service(req, res)
295 /usr/lib/ruby/1.9.1/webrick/httpserver.rb in run
296 70. server.service(req, res)
297 /usr/lib/ruby/1.9.1/webrick/server.rb in block in start_thread
298 183. block ? block.call(sock) : run(sock)
299
300 [snip]
301
302 Any ideas? Does heliotrope have a console like sup that I could try
303 tracking down which message this would be? (I'm using maildir in case it
304 makes a difference).
305
306 Hamish Downer
307
308 From hsanson@gmail.com Tue May 3 10:24:06 2011
309 From: hsanson@gmail.com (Horacio Sanson)
310 Date: Tue, 3 May 2011 23:24:06 +0900
311 Subject: [sup-devel] Cannot query Japanese characters
312 In-Reply-To: <BANLkTi=ObuZiHWGs7Mtvh8J5k4J3KTxgMA@mail.gmail.com>
313 References: <201104251023.19659.hsanson@gmail.com>
314 <1303793294-sup-688@masanjin.net>
315 <1304052708-sup-4240@masanjin.net>
316 <BANLkTim9PigP91LaDQ6UG2_prxncYv1zEA@mail.gmail.com>
317 <BANLkTi=ObuZiHWGs7Mtvh8J5k4J3KTxgMA@mail.gmail.com>
318 Message-ID: <BANLkTi=tSnbEijoEHG76Z5Fy9-3G4TPxVw@mail.gmail.com>
319
320 I managed to stop the crash when searching for Japanese text by
321 forcing UTF-8 encoding in que query parameter (see patch).
322
323 But seems that Whistelpig cannot speak Japanese. I tried the following
324 small test and as you
325 can see I get no results:
326
327
328 > require 'rubygems' => true
329 > require 'whistlepig' => true
330 > include Whistlepig => Object
331 > index = Index.new "index" => #<Whistlepig::Index:0x00000002093f60>
332 > entry1 = Entry.new => #<Whistlepig::Entry:0x0000000207d328>
333 > entry1.add_string "body", "???" => #<Whistlepig::Entry:0x0000000207d328>
334 > docid1 = index.add_entry entry1 => 1
335 > q1 = Query.new "body", "??" => body:"??"
336 > results1 = index.search q1 => []
337
338 I will now dig in Whistelpig source code to see if I can fix this but
339 any pointer/directions or tips
340 were to start looking would be greatly appreciated.
341
342
343 On Mon, May 2, 2011 at 12:46 AM, Horacio Sanson <hsanson at gmail.com> wrote:
344 > I also tried with ruby 1.8 and heliotrope does not crash but searching
345 > any Japanese word returns no matches even for search terms I now have
346 > matches.
347 >
348 > And by the way the installation instructions should mention that for
349 > ruby 1.8 we also need to install the json gem or heliotrope won't
350 > start.
351 >
352 > regards,
353 > Horacio
354 >
355 > On Mon, May 2, 2011 at 12:35 AM, Horacio Sanson <hsanson at gmail.com> wrote:
356 >> Installed whistelpig 0.6 but now I get a different error that looks
357 >> similar to the turnsole problem. Below the backtrace:
358 >>
359 >> http://localhost:8042/search?q=primo -> /search?q=%7Einbox&start=0&num=20
360 >> 127.0.0.1 - - [02/May/2011 00:31:58] "GET /favicon.ico HTTP/1.1" 404 447 0.0008
361 >> localhost - - [02/May/2011:00:31:58 JST] "GET /favicon.ico HTTP/1.1" 404 447
362 >> - -> /favicon.ico
363 >> search(body:"?", 0, 20) took 0.0ms
364 >> Encoding::CompatibilityError - incompatible character encodings: UTF-8
365 >> and ASCII-8BIT:
366 >> ?bin/heliotrope-server:154:in `block in <class:HeliotropeServer>'
367 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:1152:in `call'
368 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:1152:in
369 >> `block in compile!'
370 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:724:in
371 >> `instance_eval'
372 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:724:in `route_eval'
373 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:708:in
374 >> `block (2 levels) in route!'
375 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:758:in
376 >> `block in process_route'
377 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:755:in `catch'
378 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:755:in
379 >> `process_route'
380 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:707:in
381 >> `block in route!'
382 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:706:in `each'
383 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:706:in `route!'
384 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:843:in `dispatch!'
385 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:644:in
386 >> `block in call!'
387 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in
388 >> `instance_eval'
389 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in
390 >> `block in invoke'
391 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in `catch'
392 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:808:in `invoke'
393 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:644:in `call!'
394 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/base.rb:629:in `call'
395 >> ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/head.rb:9:in `call'
396 >> ?/var/lib/gems/1.9.1/gems/sinatra-1.2.5/lib/sinatra/showexceptions.rb:21:in
397 >> `call'
398 >> ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:48:in `_call'
399 >> ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:36:in `call'
400 >> ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/showexceptions.rb:24:in `call'
401 >> ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in `call'
402 >> ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in `call'
403 >> ?/var/lib/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in `service'
404 >> ?/usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
405 >> ?/usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
406 >> ?/usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
407 >> 127.0.0.1 - - [02/May/2011 00:32:09] "GET /search?q=%E4%BC%9A
408 >> HTTP/1.1" 500 89861 0.0228
409 >> localhost - - [02/May/2011:00:32:09 JST] "GET /search?q=%E4%BC%9A
410 >> HTTP/1.1" 500 89861
411 >> http://localhost:8042/search?q=%7Einbox&start=0&num=20 -> /search?q=%E4%BC%9A
412 >> 127.0.0.1 - - [02/May/2011 00:32:09] "GET /favicon.ico HTTP/1.1" 404 447 0.0009
413 >> localhost - - [02/May/2011:00:32:09 JST] "GET /favicon.ico HTTP/1.1" 404 447
414 >> - -> /favicon.ico
415 >>
416 >> regards,
417 >> Horacio
418 >>
419 >> On Fri, Apr 29, 2011 at 1:52 PM, William Morgan
420 >> <wmorgan-sup at masanjin.net> wrote:
421 >>> Reformatted excerpts from William Morgan's message of 2011-04-26:
422 >>>> Thanks for the bug report on this one too. It's great to have someone
423 >>>> testing this stuff with non-ASCII code. This is a known bug in
424 >>>> Whistlepig and I should be releasing a fix soon.
425 >>>
426 >>> This is fixed in Whistlepig 0.6. Heliotrope should now be fine with
427 >>> utf-8 input. I'm still working on this issue in turnsole.
428 >>>
429 >>> Let me know if you have any more issues!
430 >>> --
431 >>> William <wmorgan-sup at masanjin.net>
432 >>> _______________________________________________
433 >>> Sup-devel mailing list
434 >>> Sup-devel at rubyforge.org
435 >>> http://rubyforge.org/mailman/listinfo/sup-devel
436 >>>
437 >>
438 >
439 -------------- next part --------------
440 A non-text attachment was scrubbed...
441 Name: 0001-Fix-crash-for-non-ASCII-chars.patch
442 Type: text/x-patch
443 Size: 985 bytes
444 Desc: not available
445 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110503/abbbe422/attachment.bin>
446
447 From wmorgan-sup@masanjin.net Tue May 3 18:26:04 2011
448 From: wmorgan-sup@masanjin.net (William Morgan)
449 Date: Tue, 03 May 2011 22:26:04 +0000
450 Subject: [sup-devel] Cannot query Japanese characters
451 In-Reply-To: <BANLkTi=tSnbEijoEHG76Z5Fy9-3G4TPxVw@mail.gmail.com>
452 References: <201104251023.19659.hsanson@gmail.com>
453 <1303793294-sup-688@masanjin.net>
454 <1304052708-sup-4240@masanjin.net>
455 <BANLkTim9PigP91LaDQ6UG2_prxncYv1zEA@mail.gmail.com>
456 <BANLkTi=ObuZiHWGs7Mtvh8J5k4J3KTxgMA@mail.gmail.com>
457 <BANLkTi=tSnbEijoEHG76Z5Fy9-3G4TPxVw@mail.gmail.com>
458 Message-ID: <1304460745-sup-6241@masanjin.net>
459
460 Reformatted excerpts from Horacio Sanson's message of 2011-05-03:
461 > index = Index.new "index" => #<Whistlepig::Index:0x00000002093f60>
462 > entry1 = Entry.new => #<Whistlepig::Entry:0x0000000207d328>
463 > entry1.add_string "body", "???" => #<Whistlepig::Entry:0x0000000207d328>
464 > docid1 = index.add_entry entry1 => 1
465 > q1 = Query.new "body", "??" => body:"??"
466 > results1 = index.search q1 => []
467
468 The problem here is tokenization. Whistlepig only provides a very simple
469 tokenizer, namely, it looks for space-separated things [1]. So you have to
470 space-separate your tokens in both the indexing and querying stages, e.g.:
471
472 entry1.add_string "body", "? ? ?" => #<Whistlepig::Entry:0x90b873c>
473 docid1 = index.add_entry entry1 => 1
474 q1 = Query.new "body", "? ?" => AND body:"?" body:"?"
475 q1 = Query.new "body", "\"? ?\"" => PHRASE body:"?" body:"?"
476 results1 = index.search q1 => [1]
477
478 For Japanese, proper tokenization is tricky. You could simply space-separate
479 every character and deal with the spurious matches across word boundaries.
480 Or you could do it right by plugging in a proper tokenizer, e.g. something
481 like http://www.chasen.org/~taku/software/TinySegmenter/.
482
483 [1] It also strips any prefix or suffix characters that match [:punct:]. This
484 is all pretty ad-hoc and undocumented. Providing simpler whitespace-only
485 tokenizer as an alternative is in the works.
486 --
487 William <wmorgan-sup at masanjin.net>
488
489 From hsanson@gmail.com Tue May 3 21:42:25 2011
490 From: hsanson@gmail.com (Horacio Sanson)
491 Date: Wed, 4 May 2011 10:42:25 +0900
492 Subject: [sup-devel] Cannot query Japanese characters
493 In-Reply-To: <1304460745-sup-6241@masanjin.net>
494 References: <201104251023.19659.hsanson@gmail.com>
495 <1303793294-sup-688@masanjin.net>
496 <1304052708-sup-4240@masanjin.net>
497 <BANLkTim9PigP91LaDQ6UG2_prxncYv1zEA@mail.gmail.com>
498 <BANLkTi=ObuZiHWGs7Mtvh8J5k4J3KTxgMA@mail.gmail.com>
499 <BANLkTi=tSnbEijoEHG76Z5Fy9-3G4TPxVw@mail.gmail.com>
500 <1304460745-sup-6241@masanjin.net>
501 Message-ID: <BANLkTikbENFqT2GsE5uWjqN_DTMq43FFkw@mail.gmail.com>
502
503 Chasen is the worst tokenizer, is pretty old. The best one is MeCab
504 that is the faster and from the same author of Chasen.
505 You can see all major Japanese tokenizer in action at this URL:
506 http://nomadscafe.jp/test/keitaiso/index.cgi. Just put some
507 text in the box and press the button.
508
509 After some hacking I got a Heliotrope server that works perfectly with
510 Japanese text. All I did was follow your comments
511 and applied the MeCab tokenizer to the message body and query strings
512 before passing them to Whistelpig or more specific
513 to Heliotrope::Index.
514
515 There is one problem I don't see how to handle... I do receive email
516 in Japanese but also Chinese and Korean. I need a different
517 tokenizer for each one and I have no idea how to handle this. Do email
518 messages contain a language header that would allow me
519 to identify the language and pass it to the corresponding tokenizer??
520
521
522 regards,
523 Horacio
524
525 On Wed, May 4, 2011 at 7:26 AM, William Morgan <wmorgan-sup at masanjin.net> wrote:
526 > Reformatted excerpts from Horacio Sanson's message of 2011-05-03:
527 >> index = Index.new "index" => #<Whistlepig::Index:0x00000002093f60>
528 >> entry1 = Entry.new => #<Whistlepig::Entry:0x0000000207d328>
529 >> entry1.add_string "body", "???" => #<Whistlepig::Entry:0x0000000207d328>
530 >> docid1 = index.add_entry entry1 => 1
531 >> q1 = Query.new "body", "??" => body:"??"
532 >> results1 = index.search q1 => []
533 >
534 > The problem here is tokenization. Whistlepig only provides a very simple
535 > tokenizer, namely, it looks for space-separated things [1]. So you have to
536 > space-separate your tokens in both the indexing and querying stages, e.g.:
537 >
538 > ?entry1.add_string "body", "? ? ?" => #<Whistlepig::Entry:0x90b873c>
539 > ?docid1 = index.add_entry entry1 ? ? ?=> 1
540 > ?q1 = Query.new "body", "? ?" ? ? ? => AND body:"?" body:"?"
541 > ?q1 = Query.new "body", "\"? ?\"" ? => PHRASE body:"?" body:"?"
542 > ?results1 = index.search q1 ? ? ? ? ? => [1]
543 >
544 > For Japanese, proper tokenization is tricky. You could simply space-separate
545 > every character and deal with the spurious matches across word boundaries.
546 > Or you could do it right by plugging in a proper tokenizer, e.g. something
547 > like http://www.chasen.org/~taku/software/TinySegmenter/.
548 >
549 > [1] It also strips any prefix or suffix characters that match [:punct:]. This
550 > is all pretty ad-hoc and undocumented. Providing simpler whitespace-only
551 > tokenizer as an alternative is in the works.
552 > --
553 > William <wmorgan-sup at masanjin.net>
554 > _______________________________________________
555 > Sup-devel mailing list
556 > Sup-devel at rubyforge.org
557 > http://rubyforge.org/mailman/listinfo/sup-devel
558 >
559 -------------- next part --------------
560 A non-text attachment was scrubbed...
561 Name: 0001-Fix-crash-for-non-ASCII-chars.patch
562 Type: text/x-patch
563 Size: 988 bytes
564 Desc: not available
565 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110504/ab445c34/attachment-0002.bin>
566 -------------- next part --------------
567 A non-text attachment was scrubbed...
568 Name: 0002-Add-MeCab-japanese-text-analyzer.patch
569 Type: text/x-patch
570 Size: 1913 bytes
571 Desc: not available
572 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110504/ab445c34/attachment-0003.bin>
573
574 From hsanson@gmail.com Tue May 3 22:03:14 2011
575 From: hsanson@gmail.com (Horacio Sanson)
576 Date: Wed, 4 May 2011 11:03:14 +0900
577 Subject: [sup-devel] Cannot query Japanese characters
578 In-Reply-To: <BANLkTikbENFqT2GsE5uWjqN_DTMq43FFkw@mail.gmail.com>
579 References: <201104251023.19659.hsanson@gmail.com>
580 <1303793294-sup-688@masanjin.net>
581 <1304052708-sup-4240@masanjin.net>
582 <BANLkTim9PigP91LaDQ6UG2_prxncYv1zEA@mail.gmail.com>
583 <BANLkTi=ObuZiHWGs7Mtvh8J5k4J3KTxgMA@mail.gmail.com>
584 <BANLkTi=tSnbEijoEHG76Z5Fy9-3G4TPxVw@mail.gmail.com>
585 <1304460745-sup-6241@masanjin.net>
586 <BANLkTikbENFqT2GsE5uWjqN_DTMq43FFkw@mail.gmail.com>
587 Message-ID: <BANLkTimWHyrh6ZtCEgQ84kNkqFr-ZvLdCw@mail.gmail.com>
588
589 Forgot to mention you need the mecab ruby gem. In Ubuntu 10.04 this
590 gem is part of the distribution and can be installed with the command:
591
592 sudo apt-get install libmecab-ruby1.8 libmecab-ruby1.9.1 mecab-ipadic-utf8
593
594 regards
595 Horacio
596
597 On Wed, May 4, 2011 at 10:42 AM, Horacio Sanson <hsanson at gmail.com> wrote:
598 > Chasen is the worst tokenizer, is pretty old. The best one is MeCab
599 > that is the faster and from the same author of Chasen.
600 > You can see all major Japanese tokenizer in action at this URL:
601 > http://nomadscafe.jp/test/keitaiso/index.cgi. Just put some
602 > text in the box and press the button.
603 >
604 > After some hacking I got a Heliotrope server that works perfectly with
605 > Japanese text. All I did was follow your comments
606 > and applied the MeCab tokenizer to the message body and query strings
607 > before passing them to Whistelpig or more specific
608 > to Heliotrope::Index.
609 >
610 > There is one problem I don't see how to handle... I do receive email
611 > in Japanese but also Chinese and Korean. I need a different
612 > tokenizer for each one and I have no idea how to handle this. Do email
613 > messages contain a language header that would allow me
614 > to identify the language and pass it to the corresponding tokenizer??
615 >
616 >
617 > regards,
618 > Horacio
619 >
620 > On Wed, May 4, 2011 at 7:26 AM, William Morgan <wmorgan-sup at masanjin.net> wrote:
621 >> Reformatted excerpts from Horacio Sanson's message of 2011-05-03:
622 >>> index = Index.new "index" => #<Whistlepig::Index:0x00000002093f60>
623 >>> entry1 = Entry.new => #<Whistlepig::Entry:0x0000000207d328>
624 >>> entry1.add_string "body", "???" => #<Whistlepig::Entry:0x0000000207d328>
625 >>> docid1 = index.add_entry entry1 => 1
626 >>> q1 = Query.new "body", "??" => body:"??"
627 >>> results1 = index.search q1 => []
628 >>
629 >> The problem here is tokenization. Whistlepig only provides a very simple
630 >> tokenizer, namely, it looks for space-separated things [1]. So you have to
631 >> space-separate your tokens in both the indexing and querying stages, e.g.:
632 >>
633 >> ?entry1.add_string "body", "? ? ?" => #<Whistlepig::Entry:0x90b873c>
634 >> ?docid1 = index.add_entry entry1 ? ? ?=> 1
635 >> ?q1 = Query.new "body", "? ?" ? ? ? => AND body:"?" body:"?"
636 >> ?q1 = Query.new "body", "\"? ?\"" ? => PHRASE body:"?" body:"?"
637 >> ?results1 = index.search q1 ? ? ? ? ? => [1]
638 >>
639 >> For Japanese, proper tokenization is tricky. You could simply space-separate
640 >> every character and deal with the spurious matches across word boundaries.
641 >> Or you could do it right by plugging in a proper tokenizer, e.g. something
642 >> like http://www.chasen.org/~taku/software/TinySegmenter/.
643 >>
644 >> [1] It also strips any prefix or suffix characters that match [:punct:]. This
645 >> is all pretty ad-hoc and undocumented. Providing simpler whitespace-only
646 >> tokenizer as an alternative is in the works.
647 >> --
648 >> William <wmorgan-sup at masanjin.net>
649 >> _______________________________________________
650 >> Sup-devel mailing list
651 >> Sup-devel at rubyforge.org
652 >> http://rubyforge.org/mailman/listinfo/sup-devel
653 >>
654 >
655
656 From patricktotzke@googlemail.com Wed May 4 09:08:52 2011
657 From: patricktotzke@googlemail.com (Patrick Totzke)
658 Date: Wed, 4 May 2011 14:08:52 +0100
659 Subject: [sup-devel] multi-account setup and other annoyances
660 Message-ID: <20110504130852.GA6874@optimusprime>
661
662 Hi all,
663
664 It seems I'm having problems posting to this list, so please excuse
665 my re/doublepost if it comes as a duplicate for you.
666
667 Before I start blabbering: Great work on sup so far, for me it seems
668 this is just the right step towards a prefect MUA!
669
670 I'm thinking of switching from my notmuch-mutt setup to sup, but there
671 are a few things I don't see how to do with sup, particularly setting
672 up multiple accounts properly:
673
674 First off, I use imap in combination with offlineimap in deamon-mode
675 (autorefresh = 1) to sync my maildir because I want do get informed about
676 new mails even if sup is not running.
677
678 1) okok, I can define multiple accounts together with different sendmail
679 options in my config.yaml, but how about the ":sent_source:"?
680 I (and any one of you I guess) want to store send mails in a folder that
681 belongs to the account I used for sending. Please tell me I'm wrong and
682 this is not a single global option.
683
684 2) Draft folders: How do I use this "DraftManager" object? resp.
685 what do I have to set such that if the "From" header is set, the mail gets
686 saved in the respective folder (and the draft folder of the default account
687 otherwise)?
688
689 3) can I use somethin like mutt's "set edit_headers = no"?
690
691 4) The index gets locked when sup is running. Is there any possibility
692 to get query results from "outide"? E.g. are there python/c/ruby/whatnot
693 bindings or can I invoke a shellcommand that queries the index readonly
694 without complaining about the lock?
695 I could imagine that at some point I would want to write some little
696 awesome/vicious widget that shows some info on my index.
697
698 5) Why does repeatedly pressing "U" to search for unread mail keep on
699 opening new buffers and pressing "I" does not?
700
701 That's it for now. Thanks for your help,
702 /p
703 -------------- next part --------------
704 A non-text attachment was scrubbed...
705 Name: not available
706 Type: application/pgp-signature
707 Size: 198 bytes
708 Desc: Digital signature
709 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110504/b3529ad7/attachment.bin>
710
711 From wmorgan-sup@masanjin.net Wed May 4 12:18:39 2011
712 From: wmorgan-sup@masanjin.net (William Morgan)
713 Date: Wed, 04 May 2011 16:18:39 +0000
714 Subject: [sup-devel] turnsole crash on start up
715 In-Reply-To: <1304373950-sup-1962@whisper>
716 References: <1304373950-sup-1962@whisper>
717 Message-ID: <1304524566-sup-2732@masanjin.net>
718
719 Reformatted excerpts from Hamish's message of 2011-05-02:
720 > Any ideas? Does heliotrope have a console like sup that I could try
721 > tracking down which message this would be? (I'm using maildir in case
722 > it makes a difference).
723
724 I suspect these are both the same issue---the date for a particular
725 thread is being set to false instead of to an integer.
726
727 I've added bin/heliotrope-console, which is a simple wrapper around irb.
728 You can see if you can track it down that way. In the meantime I'll
729 scour the codebase and see if I can find an obvious culprit, or at least
730 add some protection code.
731
732 Thanks for the bug report!
733 --
734 William <wmorgan-sup at masanjin.net>
735
736 From wmorgan-sup@masanjin.net Wed May 4 12:56:57 2011
737 From: wmorgan-sup@masanjin.net (William Morgan)
738 Date: Wed, 04 May 2011 16:56:57 +0000
739 Subject: [sup-devel] Cannot query Japanese characters
740 In-Reply-To: <BANLkTikbENFqT2GsE5uWjqN_DTMq43FFkw@mail.gmail.com>
741 References: <201104251023.19659.hsanson@gmail.com>
742 <1303793294-sup-688@masanjin.net>
743 <1304052708-sup-4240@masanjin.net>
744 <BANLkTim9PigP91LaDQ6UG2_prxncYv1zEA@mail.gmail.com>
745 <BANLkTi=ObuZiHWGs7Mtvh8J5k4J3KTxgMA@mail.gmail.com>
746 <BANLkTi=tSnbEijoEHG76Z5Fy9-3G4TPxVw@mail.gmail.com>
747 <1304460745-sup-6241@masanjin.net>
748 <BANLkTikbENFqT2GsE5uWjqN_DTMq43FFkw@mail.gmail.com>
749 Message-ID: <1304527268-sup-7661@masanjin.net>
750
751 Hi Horacio,
752
753 Thanks for all your help so far.
754
755 Reformatted excerpts from Horacio Sanson's message of 2011-05-04:
756 > After some hacking I got a Heliotrope server that works perfectly with
757 > Japanese text. All I did was follow your comments
758 > and applied the MeCab tokenizer to the message body and query strings
759 > before passing them to Whistelpig or more specific
760 > to Heliotrope::Index.
761
762 Great!
763
764 > There is one problem I don't see how to handle... I do receive email
765 > in Japanese but also Chinese and Korean. I need a different
766 > tokenizer for each one and I have no idea how to handle this. Do email
767 > messages contain a language header that would allow me
768 > to identify the language and pass it to the corresponding tokenizer??
769
770 There's not a great way to do this in email. You can look at the
771 content-type headers, which is sometimes present, and that will
772 sometimes give you a clue. But it's usually useless.
773
774 You can write some heuristics by hand, of course. Or you can try naive
775 bayes, which performs pretty well on this type of task. It looks like
776 someone just started a ruby project here: https://github.com/fela/rlid.
777 It seems to only have Eurpoean languages so far, but you can probably
778 just dump in some CKJ text and retrain.
779
780 As for your patches: I've applied a related patch to fix the encoding
781 issue with Query#parsed_query_s. Can you let me know if that works?
782
783 Rather than sticking mecab directly in heliotrope, I am going to make a
784 hook for users to plug in their own custom tokenization code like you're
785 doing.
786 --
787 William <wmorgan-sup at masanjin.net>
788
789 From hsanson@gmail.com Thu May 5 23:30:26 2011
790 From: hsanson@gmail.com (Horacio Sanson)
791 Date: Fri, 6 May 2011 12:30:26 +0900
792 Subject: [sup-devel] Cannot query Japanese characters
793 In-Reply-To: <1304527268-sup-7661@masanjin.net>
794 References: <201104251023.19659.hsanson@gmail.com>
795 <1303793294-sup-688@masanjin.net>
796 <1304052708-sup-4240@masanjin.net>
797 <BANLkTim9PigP91LaDQ6UG2_prxncYv1zEA@mail.gmail.com>
798 <BANLkTi=ObuZiHWGs7Mtvh8J5k4J3KTxgMA@mail.gmail.com>
799 <BANLkTi=tSnbEijoEHG76Z5Fy9-3G4TPxVw@mail.gmail.com>
800 <1304460745-sup-6241@masanjin.net>
801 <BANLkTikbENFqT2GsE5uWjqN_DTMq43FFkw@mail.gmail.com>
802 <1304527268-sup-7661@masanjin.net>
803 Message-ID: <BANLkTimr0u=6oB4uSK_6itUU2UMR-yJz+w@mail.gmail.com>
804
805 Great, let me know when you have the modifications so I can stress test them.
806
807 regards,
808 Horacio
809
810 On Thu, May 5, 2011 at 1:56 AM, William Morgan <wmorgan-sup at masanjin.net> wrote:
811 > Hi Horacio,
812 >
813 > Thanks for all your help so far.
814 >
815 > Reformatted excerpts from Horacio Sanson's message of 2011-05-04:
816 >> After some hacking I got a Heliotrope server that works perfectly with
817 >> Japanese text. All I did was follow your comments
818 >> and applied the MeCab tokenizer to the message body and query strings
819 >> before passing them to Whistelpig or more specific
820 >> to Heliotrope::Index.
821 >
822 > Great!
823 >
824 >> There is one problem I don't see how to handle... I do receive email
825 >> in Japanese but also Chinese and Korean. I need a different
826 >> tokenizer for each one and I have no idea how to handle this. Do email
827 >> messages contain a language header that would allow me
828 >> to identify the language and pass it to the corresponding tokenizer??
829 >
830 > There's not a great way to do this in email. You can look at the
831 > content-type headers, which is sometimes present, and that will
832 > sometimes give you a clue. But it's usually useless.
833 >
834 > You can write some heuristics by hand, of course. Or you can try naive
835 > bayes, which performs pretty well on this type of task. It looks like
836 > someone just started a ruby project here: https://github.com/fela/rlid.
837 > It seems to only have Eurpoean languages so far, but you can probably
838 > just dump in some CKJ text and retrain.
839 >
840 > As for your patches: I've applied a related patch to fix the encoding
841 > issue with Query#parsed_query_s. Can you let me know if that works?
842 >
843 > Rather than sticking mecab directly in heliotrope, I am going to make a
844 > hook for users to plug in their own custom tokenization code like you're
845 > doing.
846 > --
847 > William <wmorgan-sup at masanjin.net>
848 > _______________________________________________
849 > Sup-devel mailing list
850 > Sup-devel at rubyforge.org
851 > http://rubyforge.org/mailman/listinfo/sup-devel
852 >
853
854 From dmishd@gmail.com Sun May 8 12:36:22 2011
855 From: dmishd@gmail.com (Hamish)
856 Date: Sun, 08 May 2011 17:36:22 +0100
857 Subject: [sup-devel] mail gem no longer needs activesupport [was: sup-server
858 revisited]
859 Message-ID: <1304872142-sup-6096@whisper>
860
861 Excerpts from William Morgan's message of Tue Feb 22 21:29:07 +0000 2011:
862 > Reformatted excerpts from Tero Tilus's message of 2011-02-22:
863 > > Would it be time to go for https://github.com/mikel/mail now? It would be
864 > > supported and actively developed and I really like the API. As a
865 > > downside, depending on activesupport pulls in a whole a lot of fluff and
866 > > using treetop may suggest that parsing might hog a little more cpu and
867 > > memory than is absolutely necessary.
868 >
869 > I looked at it, but the dependency on activesupport is a dealbreaker for me.
870 > There's no way I would pull that pile of Rails shit into Sup.
871
872 Might be a bit late, but I've just noticed that they're taking the
873 activesupport dependency out, as of mail 2.3.0
874
875 http://rubygems.org/gems/mail/versions/2.3.0 - no activesupport
876
877 On github, the gemspec no longer refers to it:
878
879 https://github.com/mikel/mail/blob/master/mail.gemspec
880
881 though the Gemfile still does ... I think this is an oversight.
882
883 https://github.com/mikel/mail/blob/master/Gemfile
884
885 A couple of commits doing the work:
886
887 https://github.com/mikel/mail/commit/6eb4c44a15eb1707dde60959e85e5c536ef136e2
888 https://github.com/mikel/mail/commit/8bea8ede624e81fb4704e66097a1c8cf35f8de8d
889
890 > RMail is not great and I don't like using it, but it really is the best
891 > thing I've found so far. I think I have whipped it into shape pretty well in
892 > heliotrope.
893 >
894 > > Who would give us bindings to GMime and wrap it inside Mail API...
895 >
896 > I would use GMime bindings in a heartbeat.
897
898 Hamish
899
900 From wmorgan-sup@masanjin.net Tue May 10 08:06:08 2011
901 From: wmorgan-sup@masanjin.net (William Morgan)
902 Date: Tue, 10 May 2011 12:06:08 +0000
903 Subject: [sup-devel] mail gem no longer needs activesupport [was:
904 sup-server revisited]
905 In-Reply-To: <1304872142-sup-6096@whisper>
906 References: <1304872142-sup-6096@whisper>
907 Message-ID: <1305029054-sup-718@masanjin.net>
908
909 Reformatted excerpts from Hamish's message of 2011-05-08:
910 > Might be a bit late, but I've just noticed that they're taking the
911 > activesupport dependency out, as of mail 2.3.0
912
913 Good to know. I won't switch Heliotrope over just for the heck of it,
914 but if I encounter insurmountable problems with RubyMail we'll at least
915 have a backup plan.
916 --
917 William <wmorgan-sup at masanjin.net>
918
919 From hsanson@gmail.com Tue May 10 11:17:47 2011
920 From: hsanson@gmail.com (Horacio Sanson)
921 Date: Wed, 11 May 2011 00:17:47 +0900
922 Subject: [sup-devel] Query for largest msg_id?
923 Message-ID: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
924
925 Is there a way to query Heliotrope what is the largest msg_id
926 currently in the index? I am trying to improve the imap-dumper.rb so
927 it does not download all my emails every time but only the new ones.
928 >From rfc4549.txt (see section 4.3.1) I learned that the way to do this
929 is to FETCH all the messages from [ lastknownmsg_id + 1 : * ]. This
930 will give the ids of all messages added to the server after the last
931 sync. Reading the source code I could not find a way to query this
932 value.
933
934 Also while looking at the code I see that messages are stored in the
935 index using the msg_id as parsed by RMail. There is no further
936 association with the source or mailbox from where the messages were
937 downloaded. This I think may cause collisions if we use one Heliotrope
938 server with more than one email account. Not sure what is the
939 probability of two messages from two different IMAP servers having the
940 same msg_id but nothing in the standard rules out that possibility.
941
942
943 regards
944 Horacio
945
946 From wmorgan-sup@masanjin.net Tue May 10 13:45:23 2011
947 From: wmorgan-sup@masanjin.net (William Morgan)
948 Date: Tue, 10 May 2011 17:45:23 +0000
949 Subject: [sup-devel] [PATCH] Fix problem with time parsing
950 In-Reply-To: <1304373710-sup-1383@whisper>
951 References: <1304373710-sup-1383@whisper>
952 Message-ID: <1305049400-sup-4316@masanjin.net>
953
954 Reformatted excerpts from Hamish's message of 2011-05-02:
955 > If a message has a date with month first and day second, then if the
956 > day is greater than 12, heliotrope crashes. This patch catches the
957 > error, and tries again after swapping the day and month.
958
959 Is this a legitimate email message? Producing rfc2822-compliant date
960 headers is one of the few things that everyone seems capable of doing
961 besides spambots. I'm tempted to take the Sup approach of forging a date
962 header, or giving up on the email, if it's unparseable.
963 --
964 William <wmorgan-sup at masanjin.net>
965
966 From wmorgan-sup@masanjin.net Tue May 10 13:45:49 2011
967 From: wmorgan-sup@masanjin.net (William Morgan)
968 Date: Tue, 10 May 2011 17:45:49 +0000
969 Subject: [sup-devel] heliotrope: Crash with empty message.recipients
970 In-Reply-To: <1303314278-sup-9272@sam.mediasupervision.de>
971 References: <1303314278-sup-9272@sam.mediasupervision.de>
972 Message-ID: <1305049541-sup-4323@masanjin.net>
973
974 Reformatted excerpts from Gregor Hoffleit's message of 2011-04-20:
975 >
976 > To: , debian-vote at lists.debian.org
977 >
978 > This code in line 482 of lib/heliotrope/index.rb will fail work if any
979 > recipient is empty:
980 >
981 > message.recipients.map { |x| x.indexable_text }.join(" ").downcase
982
983 Sorry for the lengthy wait. I believe this has been fixed. Please let me
984 know if you still encounter this problem!
985 --
986 William <wmorgan-sup at masanjin.net>
987
988 From dmishd@gmail.com Tue May 10 14:47:10 2011
989 From: dmishd@gmail.com (Hamish)
990 Date: Tue, 10 May 2011 19:47:10 +0100
991 Subject: [sup-devel] [PATCH] Fix problem with time parsing
992 In-Reply-To: <1305049400-sup-4316@masanjin.net>
993 References: <1304373710-sup-1383@whisper> <1305049400-sup-4316@masanjin.net>
994 Message-ID: <1305053133-sup-4055@whisper>
995
996 Excerpts from William Morgan's message of Tue May 10 18:45:23 +0100 2011:
997 > Reformatted excerpts from Hamish's message of 2011-05-02:
998 > > If a message has a date with month first and day second, then if the
999 > > day is greater than 12, heliotrope crashes. This patch catches the
1000 > > error, and tries again after swapping the day and month.
1001 >
1002 > Is this a legitimate email message? Producing rfc2822-compliant date
1003 > headers is one of the few things that everyone seems capable of doing
1004 > besides spambots. I'm tempted to take the Sup approach of forging a date
1005 > header, or giving up on the email, if it's unparseable.
1006
1007 Sadly it was not spam, but an email from staples (UK) about some stuff I
1008 bought from then online. So sup should not barf on it, but forging a
1009 date header would be fine by me. Though "now" might be better than date
1010 zero, which I think is what sup normally does otherwise ...
1011
1012 Hamish
1013
1014 From wmorgan-sup@masanjin.net Tue May 10 20:34:05 2011
1015 From: wmorgan-sup@masanjin.net (William Morgan)
1016 Date: Wed, 11 May 2011 00:34:05 +0000
1017 Subject: [sup-devel] [PATCH] Fix problem with time parsing
1018 In-Reply-To: <1305053133-sup-4055@whisper>
1019 References: <1304373710-sup-1383@whisper> <1305049400-sup-4316@masanjin.net>
1020 <1305053133-sup-4055@whisper>
1021 Message-ID: <1305073985-sup-7419@masanjin.net>
1022
1023 Reformatted excerpts from Hamish's message of 2011-05-10:
1024 > Sadly it was not spam, but an email from staples (UK) about some stuff
1025 > I bought from then online. So sup should not barf on it, but forging a
1026 > date header would be fine by me. Though "now" might be better than
1027 > date zero, which I think is what sup normally does otherwise ...
1028
1029 I agree. If you have a chance, please add a ticket for this on the
1030 heliotrope github project.
1031 --
1032 William <wmorgan-sup at masanjin.net>
1033
1034 From steve.goldman@gmail.com Wed May 11 09:53:27 2011
1035 From: steve.goldman@gmail.com (Steve)
1036 Date: Wed, 11 May 2011 09:53:27 -0400
1037 Subject: [sup-devel] How to deal with HTML attachments?
1038 Message-ID: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1039
1040 Hi,
1041
1042 A couple days ago, a significant portion of my incoming mail is
1043 arriving as an HTML attachment only, where previously, HTML formatted
1044 emails showed up as semi-readable text and also as an attachment. I
1045 have not messed with sup recently.
1046
1047 How do you recommend dealing with HTML attachments? I hit <enter> on
1048 the attachment and it says "Couldn't execute view command, viewing as
1049 text." Any way to bring this up in a web browser?
1050
1051 Thanks.
1052
1053 From marka@pobox.com Wed May 11 10:13:49 2011
1054 From: marka@pobox.com (Mark Alexander)
1055 Date: Wed, 11 May 2011 10:13:49 -0400
1056 Subject: [sup-devel] How to deal with HTML attachments?
1057 In-Reply-To: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1058 References: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1059 Message-ID: <1305123144-sup-2758@bloovis.org>
1060
1061 Excerpts from Steve's message of Wed May 11 09:53:27 -0400 2011:
1062 > How do you recommend dealing with HTML attachments?
1063
1064 I use a text-mode browser called w3m to view HTML. Sup will invoke it
1065 as necessary (on Ubuntu, at least) if you put the following in your
1066 ~/.mailcap file:
1067
1068 text/html; /usr/bin/w3m -o confirm_qq=false -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
1069
1070 From matiasaguirre@gmail.com Wed May 11 10:30:22 2011
1071 From: matiasaguirre@gmail.com (=?utf-8?q?Mat=C3=ADas_Aguirre?=)
1072 Date: Wed, 11 May 2011 11:30:22 -0300
1073 Subject: [sup-devel] How to deal with HTML attachments?
1074 In-Reply-To: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1075 References: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1076 Message-ID: <1305124168-sup-3908@mintaka>
1077
1078 Excerpts from Steve's message of Wed May 11 10:53:27 -0300 2011:
1079 > Hi,
1080 >
1081 > A couple days ago, a significant portion of my incoming mail is
1082 > arriving as an HTML attachment only, where previously, HTML formatted
1083 > emails showed up as semi-readable text and also as an attachment. I
1084 > have not messed with sup recently.
1085 >
1086 > How do you recommend dealing with HTML attachments? I hit <enter> on
1087 > the attachment and it says "Couldn't execute view command, viewing as
1088 > text." Any way to bring this up in a web browser?
1089
1090 Add this to your ~/.mailcap
1091
1092 text/html; /path/to/browser '%s'; description=HTML Text; nametemplate=%s.html
1093
1094 > Thanks.
1095 --
1096 Mat?as Aguirre <matiasaguirre at gmail.com>
1097
1098 From patricktotzke@googlemail.com Wed May 11 10:15:17 2011
1099 From: patricktotzke@googlemail.com (Patrick Totzke)
1100 Date: Wed, 11 May 2011 15:15:17 +0100
1101 Subject: [sup-devel] How to deal with HTML attachments?
1102 In-Reply-To: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1103 References: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1104 Message-ID: <1305123066-sup-804@optimusprime>
1105
1106 Hi,
1107 I use a mime-hook like this for inline html:
1108 in ~/.sup/hooks$ cat mime-decode.rb :
1109
1110 case content_type
1111 when "text/html"
1112 `/usr/bin/lynx -dump '#{filename}'`
1113 end
1114
1115 To view html when hitting enter you could set your browser in ~/.mailcap:
1116
1117 text/html; firefox %s
1118
1119 best,
1120 /p
1121
1122 Excerpts from Steve's message of Wed May 11 14:53:27 +0100 2011:
1123 > Hi,
1124 >
1125 > A couple days ago, a significant portion of my incoming mail is
1126 > arriving as an HTML attachment only, where previously, HTML formatted
1127 > emails showed up as semi-readable text and also as an attachment. I
1128 > have not messed with sup recently.
1129 >
1130 > How do you recommend dealing with HTML attachments? I hit <enter> on
1131 > the attachment and it says "Couldn't execute view command, viewing as
1132 > text." Any way to bring this up in a web browser?
1133 >
1134 > Thanks.
1135 -------------- next part --------------
1136 A non-text attachment was scrubbed...
1137 Name: signature.asc
1138 Type: application/pgp-signature
1139 Size: 198 bytes
1140 Desc: not available
1141 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110511/edc74231/attachment.bin>
1142
1143 From steve.goldman@gmail.com Wed May 11 10:59:09 2011
1144 From: steve.goldman@gmail.com (Steve)
1145 Date: Wed, 11 May 2011 10:59:09 -0400
1146 Subject: [sup-devel] How to deal with HTML attachments?
1147 In-Reply-To: <1305123144-sup-2758@bloovis.org>
1148 References: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1149 <1305123144-sup-2758@bloovis.org>
1150 Message-ID: <BANLkTimMm-ZGRdxTDaDPaFC58OMmAdJvhA@mail.gmail.com>
1151
1152 On Wed, May 11, 2011 at 10:13 AM, Mark Alexander <marka at pobox.com> wrote:
1153 > Excerpts from Steve's message of Wed May 11 09:53:27 -0400 2011:
1154 >> How do you recommend dealing with HTML attachments?
1155 >
1156 > I use a text-mode browser called w3m to view HTML. ?Sup will invoke it
1157 > as necessary (on Ubuntu, at least) if you put the following in your
1158 > ~/.mailcap file:
1159 >
1160 > text/html; /usr/bin/w3m -o confirm_qq=false -T text/html '%s'; needsterminal; description=HTML Text; nametemplate=%s.html
1161 >
1162
1163 Thanks for the tip!
1164
1165 However, it's still telling me it can't execute the command.
1166
1167 Prior to this, I had no .mailcap. I created one and restarted sup.
1168 Do I need to somehow tell sup about this?
1169
1170 Thanks.
1171
1172 From marka@pobox.com Wed May 11 11:24:28 2011
1173 From: marka@pobox.com (Mark Alexander)
1174 Date: Wed, 11 May 2011 11:24:28 -0400
1175 Subject: [sup-devel] How to deal with HTML attachments?
1176 In-Reply-To: <BANLkTimMm-ZGRdxTDaDPaFC58OMmAdJvhA@mail.gmail.com>
1177 References: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1178 <1305123144-sup-2758@bloovis.org>
1179 <BANLkTimMm-ZGRdxTDaDPaFC58OMmAdJvhA@mail.gmail.com>
1180 Message-ID: <1305127401-sup-2518@bloovis.org>
1181
1182 Excerpts from Steve's message of Wed May 11 10:59:09 -0400 2011:
1183 > However, it's still telling me it can't execute the command.
1184
1185 You may need to install w3m and possibly run-mailcap (part of the mime-support
1186 package on Ubuntu).
1187
1188 From steve.goldman@gmail.com Wed May 11 11:40:37 2011
1189 From: steve.goldman@gmail.com (Steve)
1190 Date: Wed, 11 May 2011 11:40:37 -0400
1191 Subject: [sup-devel] How to deal with HTML attachments?
1192 In-Reply-To: <1305123066-sup-804@optimusprime>
1193 References: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1194 <1305123066-sup-804@optimusprime>
1195 Message-ID: <BANLkTik=37O_vOSeFAmWr44ntmAnWY3Rpg@mail.gmail.com>
1196
1197 On Wed, May 11, 2011 at 10:15 AM, Patrick Totzke
1198 <patricktotzke at googlemail.com> wrote:
1199 > Hi,
1200 > I use a mime-hook like this for inline html:
1201 > in ~/.sup/hooks$ cat mime-decode.rb :
1202 >
1203 > ?case content_type
1204 > ?when "text/html"
1205 > ? `/usr/bin/lynx -dump '#{filename}'`
1206 > ?end
1207 >
1208 > To view html when hitting enter you could set your browser in ~/.mailcap:
1209 >
1210 > ?text/html; firefox %s
1211 >
1212 > best,
1213 > /p
1214
1215
1216 The mime-decode.rb hook does the trick.
1217
1218 Still can't get sup to invoke w3m when I hit <enter> on HTML
1219 attachments. W3m is installed. Something isn't hooked up correctly.
1220 But oh well, we'll save that for the next guy.
1221
1222 Thanks, all.
1223
1224 From tero@tilus.net Thu May 12 04:30:39 2011
1225 From: tero@tilus.net (Tero Tilus)
1226 Date: Thu, 12 May 2011 11:30:39 +0300
1227 Subject: [sup-devel] How to deal with HTML attachments?
1228 In-Reply-To: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1229 References: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1230 Message-ID: <1305188427-sup-5666@tilus.net>
1231
1232 Steve, 2011-05-11 16:53:
1233 > How do you recommend dealing with HTML attachments?
1234
1235 Primary options were already introduced by others.
1236
1237 I use publish hook to view attachments (and html-messages) in browser.
1238 Just hit P and click the link.
1239
1240 I run sup screened in a vps box, so mailcapping html to browser is not
1241 an option for me. My publish.rb looks like this
1242
1243 http://pastie.org/private/ki9luv8yfqjknbhheomi1g
1244
1245 Feel free to use.
1246
1247 --
1248 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
1249
1250 From marka@pobox.com Thu May 12 09:21:40 2011
1251 From: marka@pobox.com (Mark Alexander)
1252 Date: Thu, 12 May 2011 09:21:40 -0400
1253 Subject: [sup-devel] How to deal with HTML attachments?
1254 In-Reply-To: <1305188427-sup-5666@tilus.net>
1255 References: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1256 <1305188427-sup-5666@tilus.net>
1257 Message-ID: <1305206411-sup-2216@bloovis.org>
1258
1259 Excerpts from Tero Tilus's message of Thu May 12 04:30:39 -0400 2011:
1260 > I run sup screened in a vps box, so mailcapping html to browser is not
1261 > an option for me.
1262
1263 I also run sup in screen, sometimes from a remote system via ssh, so
1264 that's why I chose w3m as the mailcap'd browser.
1265
1266 From tero@tilus.net Fri May 13 03:39:34 2011
1267 From: tero@tilus.net (Tero Tilus)
1268 Date: Fri, 13 May 2011 10:39:34 +0300
1269 Subject: [sup-devel] How to deal with HTML attachments?
1270 In-Reply-To: <1305206411-sup-2216@bloovis.org>
1271 References: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1272 <1305188427-sup-5666@tilus.net> <1305206411-sup-2216@bloovis.org>
1273 Message-ID: <1305272083-sup-4650@tilus.net>
1274
1275 Mark Alexander, 2011-05-12 16:21:
1276 > I also run sup in screen, sometimes from a remote system via ssh, so
1277 > that's why I chose w3m as the mailcap'd browser.
1278
1279 I do w3m too. Most (~90%) of the time it does exactly what I want,
1280 but sometimes (say with images, pdf:s and strangely laid out html
1281 documents) an url to the document is a must.
1282
1283 --
1284 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
1285
1286 From patricktotzke@googlemail.com Fri May 13 05:55:17 2011
1287 From: patricktotzke@googlemail.com (Patrick Totzke)
1288 Date: Fri, 13 May 2011 10:55:17 +0100
1289 Subject: [sup-devel] How to deal with HTML attachments?
1290 In-Reply-To: <1305272083-sup-4650@tilus.net>
1291 References: <BANLkTimu3JNdDCvtX0qN4rbE0ejUHP5ztQ@mail.gmail.com>
1292 <1305188427-sup-5666@tilus.net> <1305206411-sup-2216@bloovis.org>
1293 <1305272083-sup-4650@tilus.net>
1294 Message-ID: <1305280248-sup-3289@brick>
1295
1296 Excerpts from Tero Tilus's message of Fri May 13 08:39:34 +0100 2011:
1297 > Mark Alexander, 2011-05-12 16:21:
1298 > > I also run sup in screen, sometimes from a remote system via ssh, so
1299 > > that's why I chose w3m as the mailcap'd browser.
1300 >
1301 > I do w3m too. Most (~90%) of the time it does exactly what I want,
1302 > but sometimes (say with images, pdf:s and strangely laid out html
1303 > documents) an url to the document is a must.
1304
1305 I can highly recommend lynx'x dump mode for inline html: it
1306 produces a "references" suffix which displays all URI's from the
1307 links in the document. This works great con combination with
1308 urxvt's url-select script.
1309 /p
1310 -------------- next part --------------
1311 A non-text attachment was scrubbed...
1312 Name: signature.asc
1313 Type: application/pgp-signature
1314 Size: 198 bytes
1315 Desc: not available
1316 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110513/77b0b41a/attachment.bin>
1317
1318 From wmorgan-sup@masanjin.net Sun May 15 11:01:41 2011
1319 From: wmorgan-sup@masanjin.net (William Morgan)
1320 Date: Sun, 15 May 2011 15:01:41 +0000
1321 Subject: [sup-devel] Query for largest msg_id?
1322 In-Reply-To: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
1323 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
1324 Message-ID: <1305471101-sup-6655@masanjin.net>
1325
1326 Reformatted excerpts from Horacio Sanson's message of 2011-05-10:
1327 > Is there a way to query Heliotrope what is the largest msg_id
1328 > currently in the index?
1329
1330 Sort of---it's a hack, but if you search for e.g. "a OR -a" you'll get
1331 every message in the index, and the first result will be the message
1332 with the highest id thanks to Whistlepig's search semantics.
1333
1334 > I am trying to improve the imap-dumper.rb so
1335 > it does not download all my emails every time but only the new ones.
1336
1337 Sounds great. Unfortunately the Heliotrope message id and the IMAP
1338 message id / message uid are completely different things, and
1339 maintaining a cross-session mapping of them is impossible for generic
1340 IMAP servers, because the uid of every message can change every time you
1341 connect to an IMAP server---see the section on IMAP's 'uidvalidity'
1342 variable. So you'll have to rescan the inbox every time and rebuild the
1343 mapping. Welcome to hell.
1344
1345 > Also while looking at the code I see that messages are stored in the
1346 > index using the msg_id as parsed by RMail. There is no further
1347 > association with the source or mailbox from where the messages were
1348 > downloaded. This I think may cause collisions if we use one Heliotrope
1349 > server with more than one email account. Not sure what is the
1350 > probability of two messages from two different IMAP servers having the
1351 > same msg_id but nothing in the standard rules out that possibility.
1352
1353 This is yet another id: the Message-Id header of the email. This is only
1354 needed to build up the thread structure and should otherwise be ignored.
1355 --
1356 William <wmorgan-sup at masanjin.net>
1357
1358 From wmorgan@masanjin.net Sun May 15 10:50:10 2011
1359 From: wmorgan@masanjin.net (William Morgan)
1360 Date: Sun, 15 May 2011 14:50:10 +0000
1361 Subject: [sup-devel] Turnsole crash
1362 In-Reply-To: <BANLkTi=3y75y0atFWGBSpk6Mrx7+U0V-rQ@mail.gmail.com>
1363 References: <BANLkTi=3y75y0atFWGBSpk6Mrx7+U0V-rQ@mail.gmail.com>
1364 Message-ID: <1305470967-sup-6603@masanjin.net>
1365
1366 [resend]
1367
1368 Reformatted excerpts from Robin Burchell's message of 2011-05-14:
1369 > I tried Turnsole and heliotrope out for the first time today, and got
1370 > a crash using master of both. IIRC I was pressing 'N' on a thread in
1371 > Turnsole.
1372
1373 Thanks. Turnsole is not quite ready for general use and many things like
1374 this are broken (but trivial to fix). If you like, you can file bug
1375 reports against specific breakagest on github and I'll try and do them
1376 first.
1377
1378 > By the way, do you plan to support incremental IMAP fetch somehow? I
1379 > sort of have the crazy desire to use Turnsole on a day to day basis.
1380
1381 It's possible. The best way to use heliotrope is probably with a
1382 .procmailrc, but I realize many people have IMAP access to their primary
1383 account and being able to incrementally import from that would be ideal.
1384 IMAP doesn't appear to have very good support for this type of thing,
1385 though, so I'm not 100% sure how to do it yet.
1386 --
1387 William <wmorgan at masanjin.net>
1388
1389 From hsanson@gmail.com Mon May 16 11:02:39 2011
1390 From: hsanson@gmail.com (Horacio Sanson)
1391 Date: Tue, 17 May 2011 00:02:39 +0900
1392 Subject: [sup-devel] Query for largest msg_id?
1393 In-Reply-To: <1305471101-sup-6655@masanjin.net>
1394 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
1395 <1305471101-sup-6655@masanjin.net>
1396 Message-ID: <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
1397
1398 On Mon, May 16, 2011 at 12:01 AM, William Morgan
1399 <wmorgan-sup at masanjin.net> wrote:
1400 > Reformatted excerpts from Horacio Sanson's message of 2011-05-10:
1401 >> Is there a way to query Heliotrope what is the largest msg_id
1402 >> currently in the index?
1403 >
1404 > Sort of---it's a hack, but if you search for e.g. "a OR -a" you'll get
1405 > every message in the index, and the first result will be the message
1406 > with the highest id thanks to Whistlepig's search semantics.
1407 >
1408
1409 Indeed I have been trying to wrap my head around the IMAP spec and
1410 still don't get a lot of things. For now I will just keep the max UID
1411 read from IMAP server somewhere on disk.
1412
1413 >> I am trying to improve the imap-dumper.rb so
1414 >> it does not download all my emails every time but only the new ones.
1415 >
1416 > Sounds great. Unfortunately the Heliotrope message id and the IMAP
1417 > message id / message uid are completely different things, and
1418 > maintaining a cross-session mapping of them is impossible for generic
1419 > IMAP servers, because the uid of every message can change every time you
1420 > connect to an IMAP server---see the section on IMAP's 'uidvalidity'
1421 > variable. So you'll have to rescan the inbox every time and rebuild the
1422 > mapping. Welcome to hell.
1423 >
1424
1425 When UIDVALIDITY differs I will simply re-scan the whole mailbox and
1426 feed it to Heliotrope. I trust Heliotrope won't add duplicates.
1427
1428 >> Also while looking at the code I see that messages are stored in the
1429 >> index using the msg_id as parsed by RMail. There is no further
1430 >> association with the source or mailbox from where the messages were
1431 >> downloaded. This I think may cause collisions if we use one Heliotrope
1432 >> server with more than one email account. Not sure what is the
1433 >> probability of two messages from two different IMAP servers having the
1434 >> same msg_id but nothing in the standard rules out that possibility.
1435 >
1436 > This is yet another id: the Message-Id header of the email. This is only
1437 > needed to build up the thread structure and should otherwise be ignored.
1438
1439 I am attaching my first small hack for GMail <-> Heliotrope
1440 synchronization. For now it only downloads mail from GMail and injects
1441 them to Heliotrope just as the imap-dumper.rb does. The difference is
1442 that I keep track of the last message UID and UIDVALIDITY values to
1443 avoid re-scanning the whole folder every time.
1444
1445 Now I wan't to take advantage of GMail IMAP extensions (e.g.
1446 X-GM-LABELS, X-GM-THRID) to allow labels/threads synchronization. But
1447 have some doubts about how to correctly use the Heliotrope REST API.
1448 For example in the Heliotrope::Index the add_message method allows to
1449 insert a message and assign it labels, flags and extra parameters at
1450 the same time. How can I do this with the REST API? The only example I
1451 see only adds a message body.
1452
1453 RestClient.post "http://localhost:8042/message", :message => body
1454
1455 Also for what purpose are the ext array used for? Can I use it to add
1456 an account/mailbox property to each message so I can latter retrieve
1457 all messages associated to a mailbox/account pair?
1458
1459 regards,
1460 Horacio
1461
1462 > --
1463 > William <wmorgan-sup at masanjin.net>
1464 > _______________________________________________
1465 > Sup-devel mailing list
1466 > Sup-devel at rubyforge.org
1467 > http://rubyforge.org/mailman/listinfo/sup-devel
1468 >
1469 -------------- next part --------------
1470 A non-text attachment was scrubbed...
1471 Name: gmail.rb
1472 Type: application/x-ruby
1473 Size: 7796 bytes
1474 Desc: not available
1475 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110517/f2b05805/attachment-0001.bin>
1476
1477 From gregor@hoffleit.de Mon May 16 11:56:36 2011
1478 From: gregor@hoffleit.de (Gregor Hoffleit)
1479 Date: Mon, 16 May 2011 17:56:36 +0200
1480 Subject: [sup-devel] heliotrope: Crash with empty message.recipients
1481 In-Reply-To: <1305049541-sup-4323@masanjin.net>
1482 References: <1303314278-sup-9272@sam.mediasupervision.de>
1483 <1305049541-sup-4323@masanjin.net>
1484 Message-ID: <1305560179-sup-7899@sam.mediasupervision.de>
1485
1486 * William Morgan <wmorgan-sup at masanjin.net> [Di Mai 10 19:45:49 +0200 2011]
1487 > Reformatted excerpts from Gregor Hoffleit's message of 2011-04-20:
1488 > >
1489 > > To: , debian-vote at lists.debian.org
1490 > >
1491 > > This code in line 482 of lib/heliotrope/index.rb will fail work if any
1492 > > recipient is empty:
1493 > >
1494 > > message.recipients.map { |x| x.indexable_text }.join(" ").downcase
1495 >
1496 > Sorry for the lengthy wait. I believe this has been fixed. Please let me
1497 > know if you still encounter this problem!
1498
1499 The problem with empty recipient strings is still there, I'm afraid.
1500 Tested today, with current heliotrope from GIT.
1501
1502 Regards,
1503 Gregor
1504
1505 From paul.a.grove@gmail.com Mon May 16 17:56:56 2011
1506 From: paul.a.grove@gmail.com (Paul Grove)
1507 Date: Mon, 16 May 2011 22:56:56 +0100
1508 Subject: [sup-devel] Sign and encrypt
1509 Message-ID: <1305582172-sup-2519@localhost>
1510
1511 Hi I hope you guys can help me, recently I pulled the latest changes to
1512 sup.
1513
1514 It took me a while - but I've noticed that I have problems when signing
1515 and encrypting.
1516
1517 When I sign my emails are signed.
1518 When I encrypt my emails are encrypted.
1519
1520 But when I sign _and_ encrypt my emails come out only encrypted!
1521
1522 I only noticed because I post to a mailing list that requires sign and
1523 encrypt in order to post.
1524
1525 I know this problem never used to exist as I've posted on the list
1526 before without issue. I've taken the emails produced by sup and run
1527 them through gpg and that shows as not signed also.
1528
1529 I had a look at the code, unfortunately I'm not well versed in ruby. I
1530 cannot see for certain if there is a problem.
1531
1532 I can see that when signing the code produces a signature and attaches
1533 it to the email, but when encrypting and signing it doesn't jump through
1534 this hoop of adding any sort of attachment and instead an extra parameter
1535 :sign => true is passed to pgpme when doing the encryption.
1536
1537 Now completely off the top of my head but wasnt it a fairly recent
1538 change to start using pgpme? I seem to remember some discussion on
1539 changing to it, and perhaps the version I was using is prior to this?
1540
1541 Thanks,
1542
1543 Paul Grove
1544 -------------- next part --------------
1545 A non-text attachment was scrubbed...
1546 Name: signature.asc
1547 Type: application/pgp-signature
1548 Size: 490 bytes
1549 Desc: not available
1550 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110516/9c70576e/attachment.bin>
1551
1552 From hsanson@gmail.com Tue May 17 10:59:34 2011
1553 From: hsanson@gmail.com (Horacio Sanson)
1554 Date: Tue, 17 May 2011 23:59:34 +0900
1555 Subject: [sup-devel] Query for largest msg_id?
1556 In-Reply-To: <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
1557 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
1558 <1305471101-sup-6655@masanjin.net>
1559 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
1560 Message-ID: <BANLkTinBWgd2NYZqT+y8oHt9-_aiRjdcNA@mail.gmail.com>
1561
1562 I implemented a new version of the GMail -> Heliotrope sync script and
1563 attach it here in hopes
1564 someone will test it and provide some feedback/comments. This is by no
1565 means ready for general
1566 use so don't use for anything else than experimentation. But since
1567 this script only opens mailboxes
1568 in read only mode (examine) there should not be any problems with you
1569 emails on the server.
1570
1571 This script is GMail specific and has these features:
1572
1573 - Downloads emails from all mailboxes (except All, Trash and Spam)
1574 automatically using
1575 the XLIST GMail IMAP extension and feeds them to Heliotrope via
1576 REST interface.
1577 - Remembers the last email downloaded so it does not start from the beginning
1578 every time.
1579 - Synchronizes GMail labels using the X-GM-LABELS IMAP extension.
1580 - Synchronizes GMail flags with Heliotrope state flags.
1581 - Adds a new mailbox property to messages. This may allow later to implement
1582 Heliotrope -> GMail synchronization.
1583
1584 Things to check and do:
1585 - I am seeing some negative thread_id's in the response. Need to check if
1586 this is normal or a bug in Heliotrope or my script.
1587 - GMail inbox is with a capital "I" (e.g. Inbox) while heliotrope
1588 uses a small "i".
1589 Shall I down case all labels? or make a special treatment for Inbox?
1590 - Refactor the script into something more modular and elegant.
1591
1592 To use this script I had to modify heliotrope-server.rb to allow
1593 setting labels and states when
1594 posting new messages (see attached patch).
1595
1596 regards,
1597 Horacio
1598
1599 On Tue, May 17, 2011 at 12:02 AM, Horacio Sanson <hsanson at gmail.com> wrote:
1600 > On Mon, May 16, 2011 at 12:01 AM, William Morgan
1601 > <wmorgan-sup at masanjin.net> wrote:
1602 >> Reformatted excerpts from Horacio Sanson's message of 2011-05-10:
1603 >>> Is there a way to query Heliotrope what is the largest msg_id
1604 >>> currently in the index?
1605 >>
1606 >> Sort of---it's a hack, but if you search for e.g. "a OR -a" you'll get
1607 >> every message in the index, and the first result will be the message
1608 >> with the highest id thanks to Whistlepig's search semantics.
1609 >>
1610 >
1611 > Indeed I have been trying to wrap my head around the IMAP spec and
1612 > still don't get a lot of things. For now I will just keep the max UID
1613 > read from IMAP server somewhere on disk.
1614 >
1615 >>> I am trying to improve the imap-dumper.rb so
1616 >>> it does not download all my emails every time but only the new ones.
1617 >>
1618 >> Sounds great. Unfortunately the Heliotrope message id and the IMAP
1619 >> message id / message uid are completely different things, and
1620 >> maintaining a cross-session mapping of them is impossible for generic
1621 >> IMAP servers, because the uid of every message can change every time you
1622 >> connect to an IMAP server---see the section on IMAP's 'uidvalidity'
1623 >> variable. So you'll have to rescan the inbox every time and rebuild the
1624 >> mapping. Welcome to hell.
1625 >>
1626 >
1627 > When UIDVALIDITY differs I will simply re-scan the whole mailbox and
1628 > feed it to Heliotrope. I trust Heliotrope won't add duplicates.
1629 >
1630 >>> Also while looking at the code I see that messages are stored in the
1631 >>> index using the msg_id as parsed by RMail. There is no further
1632 >>> association with the source or mailbox from where the messages were
1633 >>> downloaded. This I think may cause collisions if we use one Heliotrope
1634 >>> server with more than one email account. Not sure what is the
1635 >>> probability of two messages from two different IMAP servers having the
1636 >>> same msg_id but nothing in the standard rules out that possibility.
1637 >>
1638 >> This is yet another id: the Message-Id header of the email. This is only
1639 >> needed to build up the thread structure and should otherwise be ignored.
1640 >
1641 > I am attaching my first small hack for GMail <-> Heliotrope
1642 > synchronization. For now it only downloads mail from GMail and injects
1643 > them to Heliotrope just as the imap-dumper.rb does. The difference is
1644 > that I keep track of the last message UID and UIDVALIDITY values to
1645 > avoid re-scanning the whole folder every time.
1646 >
1647 > Now I wan't to take advantage of GMail IMAP extensions (e.g.
1648 > X-GM-LABELS, X-GM-THRID) to allow labels/threads synchronization. But
1649 > have some doubts about how to correctly use the Heliotrope REST API.
1650 > For example in the Heliotrope::Index the add_message method allows to
1651 > insert a message and assign it labels, flags and extra parameters at
1652 > the same time. How can I do this with the REST API? The only example I
1653 > see only adds a message body.
1654 >
1655 > ? ?RestClient.post "http://localhost:8042/message", :message => body
1656 >
1657 > Also for what purpose are the ext array used for? Can I use it to add
1658 > an account/mailbox property to each message so I can latter retrieve
1659 > all messages associated to a mailbox/account pair?
1660 >
1661 > regards,
1662 > Horacio
1663 >
1664 >> --
1665 >> William <wmorgan-sup at masanjin.net>
1666 >> _______________________________________________
1667 >> Sup-devel mailing list
1668 >> Sup-devel at rubyforge.org
1669 >> http://rubyforge.org/mailman/listinfo/sup-devel
1670 >>
1671 >
1672 -------------- next part --------------
1673 A non-text attachment was scrubbed...
1674 Name: gmail.rb
1675 Type: application/x-ruby
1676 Size: 8703 bytes
1677 Desc: not available
1678 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110517/ae523a7c/attachment.bin>
1679 -------------- next part --------------
1680 A non-text attachment was scrubbed...
1681 Name: 0001-Implement-post-message.json.patch
1682 Type: text/x-patch
1683 Size: 2203 bytes
1684 Desc: not available
1685 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110517/ae523a7c/attachment-0001.bin>
1686
1687 From hsanson@gmail.com Tue May 17 11:15:48 2011
1688 From: hsanson@gmail.com (Horacio Sanson)
1689 Date: Wed, 18 May 2011 00:15:48 +0900
1690 Subject: [sup-devel] Query for largest msg_id?
1691 In-Reply-To: <BANLkTinBWgd2NYZqT+y8oHt9-_aiRjdcNA@mail.gmail.com>
1692 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
1693 <1305471101-sup-6655@masanjin.net>
1694 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
1695 <BANLkTinBWgd2NYZqT+y8oHt9-_aiRjdcNA@mail.gmail.com>
1696 Message-ID: <BANLkTimALB2SPD7cn5xa941n6JPx-uvbWg@mail.gmail.com>
1697
1698 Sorry the patch I sent has a small problem. Use this patch instead.
1699
1700
1701 On Tue, May 17, 2011 at 11:59 PM, Horacio Sanson <hsanson at gmail.com> wrote:
1702 > I implemented a new version of the GMail -> Heliotrope sync script and
1703 > attach it here in hopes
1704 > someone will test it and provide some feedback/comments. This is by no
1705 > means ready for general
1706 > use so don't use for anything else than experimentation. But since
1707 > this script only opens mailboxes
1708 > in read only mode (examine) there should not be any problems with you
1709 > emails on the server.
1710 >
1711 > This script is GMail specific and has these features:
1712 >
1713 > ?- Downloads emails from all mailboxes (except All, Trash and Spam)
1714 > automatically using
1715 > ? ?the XLIST GMail IMAP extension and feeds them to Heliotrope via
1716 > REST interface.
1717 > ?- Remembers the last email downloaded so it does not start from the beginning
1718 > ? ?every time.
1719 > ?- Synchronizes GMail labels using the X-GM-LABELS IMAP extension.
1720 > ?- Synchronizes GMail flags with Heliotrope state flags.
1721 > ?- Adds a new mailbox property to messages. This may allow later to implement
1722 > ? ?Heliotrope -> GMail synchronization.
1723 >
1724 > Things to check and do:
1725 > ?- I am seeing some negative thread_id's in the response. Need to check if
1726 > ? ?this is normal or a bug in Heliotrope or my script.
1727 > ?- GMail inbox is with a capital "I" (e.g. Inbox) while heliotrope
1728 > uses a small "i".
1729 > ? ?Shall I down case all labels? or make a special treatment for Inbox?
1730 > ?- Refactor the script into something more modular and elegant.
1731 >
1732 > To use this script I had to modify heliotrope-server.rb to allow
1733 > setting labels and states when
1734 > posting new messages (see attached patch).
1735 >
1736 > regards,
1737 > Horacio
1738 >
1739 > On Tue, May 17, 2011 at 12:02 AM, Horacio Sanson <hsanson at gmail.com> wrote:
1740 >> On Mon, May 16, 2011 at 12:01 AM, William Morgan
1741 >> <wmorgan-sup at masanjin.net> wrote:
1742 >>> Reformatted excerpts from Horacio Sanson's message of 2011-05-10:
1743 >>>> Is there a way to query Heliotrope what is the largest msg_id
1744 >>>> currently in the index?
1745 >>>
1746 >>> Sort of---it's a hack, but if you search for e.g. "a OR -a" you'll get
1747 >>> every message in the index, and the first result will be the message
1748 >>> with the highest id thanks to Whistlepig's search semantics.
1749 >>>
1750 >>
1751 >> Indeed I have been trying to wrap my head around the IMAP spec and
1752 >> still don't get a lot of things. For now I will just keep the max UID
1753 >> read from IMAP server somewhere on disk.
1754 >>
1755 >>>> I am trying to improve the imap-dumper.rb so
1756 >>>> it does not download all my emails every time but only the new ones.
1757 >>>
1758 >>> Sounds great. Unfortunately the Heliotrope message id and the IMAP
1759 >>> message id / message uid are completely different things, and
1760 >>> maintaining a cross-session mapping of them is impossible for generic
1761 >>> IMAP servers, because the uid of every message can change every time you
1762 >>> connect to an IMAP server---see the section on IMAP's 'uidvalidity'
1763 >>> variable. So you'll have to rescan the inbox every time and rebuild the
1764 >>> mapping. Welcome to hell.
1765 >>>
1766 >>
1767 >> When UIDVALIDITY differs I will simply re-scan the whole mailbox and
1768 >> feed it to Heliotrope. I trust Heliotrope won't add duplicates.
1769 >>
1770 >>>> Also while looking at the code I see that messages are stored in the
1771 >>>> index using the msg_id as parsed by RMail. There is no further
1772 >>>> association with the source or mailbox from where the messages were
1773 >>>> downloaded. This I think may cause collisions if we use one Heliotrope
1774 >>>> server with more than one email account. Not sure what is the
1775 >>>> probability of two messages from two different IMAP servers having the
1776 >>>> same msg_id but nothing in the standard rules out that possibility.
1777 >>>
1778 >>> This is yet another id: the Message-Id header of the email. This is only
1779 >>> needed to build up the thread structure and should otherwise be ignored.
1780 >>
1781 >> I am attaching my first small hack for GMail <-> Heliotrope
1782 >> synchronization. For now it only downloads mail from GMail and injects
1783 >> them to Heliotrope just as the imap-dumper.rb does. The difference is
1784 >> that I keep track of the last message UID and UIDVALIDITY values to
1785 >> avoid re-scanning the whole folder every time.
1786 >>
1787 >> Now I wan't to take advantage of GMail IMAP extensions (e.g.
1788 >> X-GM-LABELS, X-GM-THRID) to allow labels/threads synchronization. But
1789 >> have some doubts about how to correctly use the Heliotrope REST API.
1790 >> For example in the Heliotrope::Index the add_message method allows to
1791 >> insert a message and assign it labels, flags and extra parameters at
1792 >> the same time. How can I do this with the REST API? The only example I
1793 >> see only adds a message body.
1794 >>
1795 >> ? ?RestClient.post "http://localhost:8042/message", :message => body
1796 >>
1797 >> Also for what purpose are the ext array used for? Can I use it to add
1798 >> an account/mailbox property to each message so I can latter retrieve
1799 >> all messages associated to a mailbox/account pair?
1800 >>
1801 >> regards,
1802 >> Horacio
1803 >>
1804 >>> --
1805 >>> William <wmorgan-sup at masanjin.net>
1806 >>> _______________________________________________
1807 >>> Sup-devel mailing list
1808 >>> Sup-devel at rubyforge.org
1809 >>> http://rubyforge.org/mailman/listinfo/sup-devel
1810 >>>
1811 >>
1812 >
1813 -------------- next part --------------
1814 A non-text attachment was scrubbed...
1815 Name: 0001-Implement-post-message.json.patch
1816 Type: text/x-patch
1817 Size: 2205 bytes
1818 Desc: not available
1819 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110518/8447df75/attachment-0001.bin>
1820
1821 From wmorgan-sup@masanjin.net Wed May 18 00:59:05 2011
1822 From: wmorgan-sup@masanjin.net (William Morgan)
1823 Date: Wed, 18 May 2011 04:59:05 +0000
1824 Subject: [sup-devel] Query for largest msg_id?
1825 In-Reply-To: <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
1826 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
1827 <1305471101-sup-6655@masanjin.net>
1828 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
1829 Message-ID: <1305693289-sup-4896@masanjin.net>
1830
1831 Reformatted excerpts from Horacio Sanson's message of 2011-05-16:
1832 > When UIDVALIDITY differs I will simply re-scan the whole mailbox and
1833 > feed it to Heliotrope. I trust Heliotrope won't add duplicates.
1834
1835 The REST api will ignore duplicates based on the Message-Id header.
1836
1837 > For example in the Heliotrope::Index the add_message method allows to
1838 > insert a message and assign it labels, flags and extra parameters at
1839 > the same time. How can I do this with the REST API? The only example I
1840 > see only adds a message body.
1841 >
1842 > RestClient.post "http://localhost:8042/message", :message => body
1843
1844 I've just pushed a commit to fix this. You can now send labels, state
1845 and extra params to the POST. See heliotrope-add for an example.
1846
1847 > Also for what purpose are the ext array used for? Can I use it to add
1848 > an account/mailbox property to each message so I can latter retrieve
1849 > all messages associated to a mailbox/account pair?
1850
1851 Anything you put in there will come back as part of a message info block
1852 (e.g. when you GET /thread/123.json), but it's not indexed at all, so
1853 you won't be able to get the list of matching messages.
1854
1855 Probably the easiest way to accomplish that is to make a unique label
1856 for each mailbox/account pair, but that's not ideal. We can think of
1857 ways to make this work.
1858 --
1859 William <wmorgan-sup at masanjin.net>
1860
1861 From wmorgan-sup@masanjin.net Wed May 18 01:05:27 2011
1862 From: wmorgan-sup@masanjin.net (William Morgan)
1863 Date: Wed, 18 May 2011 05:05:27 +0000
1864 Subject: [sup-devel] Query for largest msg_id?
1865 In-Reply-To: <BANLkTinBWgd2NYZqT+y8oHt9-_aiRjdcNA@mail.gmail.com>
1866 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
1867 <1305471101-sup-6655@masanjin.net>
1868 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
1869 <BANLkTinBWgd2NYZqT+y8oHt9-_aiRjdcNA@mail.gmail.com>
1870 Message-ID: <1305694759-sup-7483@masanjin.net>
1871
1872 Reformatted excerpts from Horacio Sanson's message of 2011-05-17:
1873 > I implemented a new version of the GMail -> Heliotrope sync script and
1874 > attach it here in hopes someone will test it and provide some
1875 > feedback/comments.
1876
1877 Great! This is very exciting.
1878
1879 > - I am seeing some negative thread_id's in the response. Need to check
1880 > if this is normal or a bug in Heliotrope or my script.
1881
1882 This is normal. It indicates a thread in which the root message can't be
1883 found (so Heliotrope must construct a pseudo-message to hold the tree
1884 together). Nothing to worry about, except as an indicator that you're
1885 missing email refefred to by something else in the thread.
1886
1887 > - GMail inbox is with a capital "I" (e.g. Inbox) while heliotrope
1888 > uses a small "i".
1889 > Shall I down case all labels? or make a special treatment for Inbox?
1890
1891 I suggest special-casing inbox.
1892
1893 > To use this script I had to modify heliotrope-server.rb to allow
1894 > setting labels and states when posting new messages (see attached
1895 > patch).
1896
1897 I apologize for the confusion in this, but this is actually the wrong
1898 endpoint to use. POST "/message" (no .json) is for adding new emails.
1899 This endpoint was introduced temporarily for outgoing emails, i.e. when
1900 you compose or reply via turnsole. But I'm going to rename it as well as
1901 implement it.
1902
1903 Anyways, I've added the relevant code to /message, so your script should
1904 work against that.
1905 --
1906 William <wmorgan-sup at masanjin.net>
1907
1908 From wmorgan-sup@masanjin.net Wed May 18 10:52:59 2011
1909 From: wmorgan-sup@masanjin.net (William Morgan)
1910 Date: Wed, 18 May 2011 14:52:59 +0000
1911 Subject: [sup-devel] heliotrope: Crash with empty message.recipients
1912 In-Reply-To: <1305560179-sup-7899@sam.mediasupervision.de>
1913 References: <1303314278-sup-9272@sam.mediasupervision.de>
1914 <1305049541-sup-4323@masanjin.net>
1915 <1305560179-sup-7899@sam.mediasupervision.de>
1916 Message-ID: <1305730339-sup-127@masanjin.net>
1917
1918 Reformatted excerpts from Gregor Hoffleit's message of 2011-05-16:
1919 > The problem with empty recipient strings is still there, I'm afraid.
1920 > Tested today, with current heliotrope from GIT.
1921
1922 Rats. Can you please add an issue to the heliotrope github issue tracker
1923 so that I don't forget about this?
1924 --
1925 William <wmorgan-sup at masanjin.net>
1926
1927 From gregor@hoffleit.de Wed May 18 11:47:03 2011
1928 From: gregor@hoffleit.de (Gregor Hoffleit)
1929 Date: Wed, 18 May 2011 17:47:03 +0200
1930 Subject: [sup-devel] heliotrope: Crash with empty message.recipients
1931 In-Reply-To: <1305730339-sup-127@masanjin.net>
1932 References: <1303314278-sup-9272@sam.mediasupervision.de>
1933 <1305049541-sup-4323@masanjin.net>
1934 <1305560179-sup-7899@sam.mediasupervision.de>
1935 <1305730339-sup-127@masanjin.net>
1936 Message-ID: <1305733600-sup-9418@sam.mediasupervision.de>
1937
1938 * William Morgan <wmorgan-sup at masanjin.net> [Mi Mai 18 16:52:59 +0200 2011]
1939 > Reformatted excerpts from Gregor Hoffleit's message of 2011-05-16:
1940 > > The problem with empty recipient strings is still there, I'm afraid.
1941 > > Tested today, with current heliotrope from GIT.
1942 >
1943 > Rats. Can you please add an issue to the heliotrope github issue tracker
1944 > so that I don't forget about this?
1945
1946 Done. https://github.com/wmorgan/heliotrope/issues/1
1947
1948 From sascha-ml-reply-to-2011-2@silbe.org Wed May 18 16:09:26 2011
1949 From: sascha-ml-reply-to-2011-2@silbe.org (Sascha Silbe)
1950 Date: Wed, 18 May 2011 22:09:26 +0200
1951 Subject: [sup-devel] Query for largest msg_id?
1952 In-Reply-To: <1305693289-sup-4896@masanjin.net>
1953 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
1954 <1305471101-sup-6655@masanjin.net>
1955 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
1956 <1305693289-sup-4896@masanjin.net>
1957 Message-ID: <1305748878-sup-7940@xo15-sascha.sascha.silbe.org>
1958
1959 Excerpts from William Morgan's message of Wed May 18 06:59:05 +0200 2011:
1960 > Reformatted excerpts from Horacio Sanson's message of 2011-05-16:
1961 > > When UIDVALIDITY differs I will simply re-scan the whole mailbox and
1962 > > feed it to Heliotrope. I trust Heliotrope won't add duplicates.
1963 >
1964
1965 > The REST api will ignore duplicates based on the Message-Id header.
1966
1967 This is something I don't like about sup: There's no way to access the
1968 "duplicate" messages, e.g. to check whether an outgoing message was
1969 received back fine from the ML or to check the headers.
1970
1971 If heliotrope permanently erases the copies (instead of just not
1972 exposing UI to access them), that would be a major step backwards.
1973
1974 Sascha
1975
1976 --
1977 http://sascha.silbe.org/
1978 http://www.infra-silbe.de/
1979 -------------- next part --------------
1980 A non-text attachment was scrubbed...
1981 Name: signature.asc
1982 Type: application/pgp-signature
1983 Size: 494 bytes
1984 Desc: not available
1985 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110518/f7018919/attachment.bin>
1986
1987 From alvherre@alvh.no-ip.org Wed May 18 23:14:00 2011
1988 From: alvherre@alvh.no-ip.org (Alvaro Herrera)
1989 Date: Wed, 18 May 2011 23:14:00 -0400
1990 Subject: [sup-devel] Query for largest msg_id?
1991 In-Reply-To: <1305748878-sup-7940@xo15-sascha.sascha.silbe.org>
1992 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
1993 <1305471101-sup-6655@masanjin.net>
1994 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
1995 <1305693289-sup-4896@masanjin.net>
1996 <1305748878-sup-7940@xo15-sascha.sascha.silbe.org>
1997 Message-ID: <1305774610-sup-7867@alvh.no-ip.org>
1998
1999 Excerpts from Sascha Silbe's message of mi? may 18 16:09:26 -0400 2011:
2000 > Excerpts from William Morgan's message of Wed May 18 06:59:05 +0200 2011:
2001 > > Reformatted excerpts from Horacio Sanson's message of 2011-05-16:
2002 > > > When UIDVALIDITY differs I will simply re-scan the whole mailbox and
2003 > > > feed it to Heliotrope. I trust Heliotrope won't add duplicates.
2004 > >
2005 >
2006 > > The REST api will ignore duplicates based on the Message-Id header.
2007 >
2008 > This is something I don't like about sup: There's no way to access the
2009 > "duplicate" messages, e.g. to check whether an outgoing message was
2010 > received back fine from the ML or to check the headers.
2011 >
2012 > If heliotrope permanently erases the copies (instead of just not
2013 > exposing UI to access them), that would be a major step backwards.
2014
2015 Same here. I have this in detailed-headers.rb:
2016
2017 headers["Message Id"] = message.id
2018 message.locations.each_with_index { |location, idx|
2019 headers["Location#{idx}"] = "#{location.source} #{location.info}"
2020 }
2021
2022 So I can immediately see all locations of a message; particularly useful
2023 for messages that I send. I don't have easy access to the headers
2024 within the sup UI, but the one or two times I've wanted to do that, I
2025 simply pasted the path to the file to "less" (which works fine because I
2026 use Maildirs; on mboxes it would be a lot more complex).
2027
2028 --
2029 ?lvaro Herrera <alvherre at alvh.no-ip.org>
2030
2031 From hsanson@gmail.com Fri May 20 11:38:30 2011
2032 From: hsanson@gmail.com (Horacio Sanson)
2033 Date: Sat, 21 May 2011 00:38:30 +0900
2034 Subject: [sup-devel] Query for largest msg_id?
2035 In-Reply-To: <1305694759-sup-7483@masanjin.net>
2036 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
2037 <1305471101-sup-6655@masanjin.net>
2038 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
2039 <BANLkTinBWgd2NYZqT+y8oHt9-_aiRjdcNA@mail.gmail.com>
2040 <1305694759-sup-7483@masanjin.net>
2041 Message-ID: <BANLkTikdq9JZbpT-DfZUNXQ74sqW2Txwqg@mail.gmail.com>
2042
2043 On Wed, May 18, 2011 at 2:05 PM, William Morgan
2044 <wmorgan-sup at masanjin.net> wrote:
2045 > Reformatted excerpts from Horacio Sanson's message of 2011-05-17:
2046 >> I implemented a new version of the GMail -> Heliotrope sync script and
2047 >> attach it here in hopes someone will test it and provide some
2048 >> feedback/comments.
2049 >
2050 > Great! This is very exciting.
2051 >
2052 >> - I am seeing some negative thread_id's in the response. Need to check
2053 >> if this is normal or a bug in Heliotrope or my script.
2054 >
2055 > This is normal. It indicates a thread in which the root message can't be
2056 > found (so Heliotrope must construct a pseudo-message to hold the tree
2057 > together). Nothing to worry about, except as an indicator that you're
2058 > missing email refefred to by something else in the thread.
2059 >
2060
2061 Is there a way to use GMail supplied thread ids?? there is an
2062 extension X-GM-THRID that
2063 provides such information.
2064
2065 >> ? - GMail inbox is with a capital "I" (e.g. Inbox) while heliotrope
2066 >> uses a small "i".
2067 >> ? ? Shall I down case all labels? or make a special treatment for Inbox?
2068 >
2069 > I suggest special-casing inbox.
2070 >
2071
2072 Perfect, the new script special cases inbox
2073
2074 >> To use this script I had to modify heliotrope-server.rb to allow
2075 >> setting labels and states when posting new messages (see attached
2076 >> patch).
2077 >
2078 > I apologize for the confusion in this, but this is actually the wrong
2079 > endpoint to use. POST "/message" (no .json) is for adding new emails.
2080 > This endpoint was introduced temporarily for outgoing emails, i.e. ?when
2081 > you compose or reply via turnsole. But I'm going to rename it as well as
2082 > implement it.
2083 >
2084
2085 Great I rewrote the GMail -> Heliotrope script to use the improved
2086 POST "/message"
2087 and works wonderfully.
2088
2089 I am attaching the new version that is cleaner and seems to work
2090 without problems.
2091
2092 > Anyways, I've added the relevant code to /message, so your script should
2093 > work against that.
2094 > --
2095 > William <wmorgan-sup at masanjin.net>
2096 > _______________________________________________
2097 > Sup-devel mailing list
2098 > Sup-devel at rubyforge.org
2099 > http://rubyforge.org/mailman/listinfo/sup-devel
2100 >
2101 -------------- next part --------------
2102 A non-text attachment was scrubbed...
2103 Name: gmail.rb
2104 Type: application/x-ruby
2105 Size: 11630 bytes
2106 Desc: not available
2107 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110521/3aa0e261/attachment-0001.bin>
2108
2109 From dmishd@gmail.com Sun May 22 17:34:31 2011
2110 From: dmishd@gmail.com (Hamish)
2111 Date: Sun, 22 May 2011 22:34:31 +0100
2112 Subject: [sup-devel] Sign and encrypt
2113 In-Reply-To: <1305582172-sup-2519@localhost>
2114 References: <1305582172-sup-2519@localhost>
2115 Message-ID: <1306099840-sup-7534@whisper>
2116
2117 Excerpts from Paul Grove's message of Mon May 16 22:56:56 +0100 2011:
2118 > But when I sign _and_ encrypt my emails come out only encrypted!
2119 >
2120 > I only noticed because I post to a mailing list that requires sign and
2121 > encrypt in order to post.
2122 >
2123 > I know this problem never used to exist as I've posted on the list
2124 > before without issue. I've taken the emails produced by sup and run
2125 > them through gpg and that shows as not signed also.
2126
2127 Interesting. I wrote the code to start using gpgme, and it's been
2128 working fine for me. I also am on an email list that requires emails to
2129 be signed and encrypted (using scheuder[0]) and my emails are accepted
2130 there.
2131
2132 With the way I've been using gpgme the signature is embedded within the
2133 signed text, so looking at the encrypted email you just see a single
2134 block. However saving the email and running gpg against it reports that
2135 the email is both encrypted and signed for me.
2136
2137 As to which version you are using, if you were on the master branch then
2138 you shouldn't have any of the gpgme stuff, and if you have the latest
2139 from the "next" branch then you should have the same as me.
2140
2141 If you check you have the latest from the "next" branch and still can't
2142 generate a signed and encrypted email, then feel free to send me a
2143 signed and encrypted email using sup, and I'll pull it apart at my end.
2144
2145 Hamish Downer
2146
2147 [0] http://schleuder2.nadir.org/
2148
2149 From wmorgan-sup@masanjin.net Sun May 22 18:00:51 2011
2150 From: wmorgan-sup@masanjin.net (William Morgan)
2151 Date: Sun, 22 May 2011 22:00:51 +0000
2152 Subject: [sup-devel] Query for largest msg_id?
2153 In-Reply-To: <BANLkTikdq9JZbpT-DfZUNXQ74sqW2Txwqg@mail.gmail.com>
2154 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
2155 <1305471101-sup-6655@masanjin.net>
2156 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
2157 <BANLkTinBWgd2NYZqT+y8oHt9-_aiRjdcNA@mail.gmail.com>
2158 <1305694759-sup-7483@masanjin.net>
2159 <BANLkTikdq9JZbpT-DfZUNXQ74sqW2Txwqg@mail.gmail.com>
2160 Message-ID: <1306101513-sup-1687@masanjin.net>
2161
2162 Reformatted excerpts from Horacio Sanson's message of 2011-05-20:
2163 > Is there a way to use GMail supplied thread ids?? there is an
2164 > extension X-GM-THRID that
2165 > provides such information.
2166
2167 Not really. Heliotrope has to maintain its own message ids and thread ids.
2168 When you feed it messages, it threads things different from how Gmail does,
2169 anyways.
2170
2171 > Great I rewrote the GMail -> Heliotrope script to use the improved
2172 > POST "/message"
2173 > and works wonderfully.
2174
2175 Great!
2176
2177 > I am attaching the new version that is cleaner and seems to work
2178 > without problems.
2179
2180 Very nice. I would like to include something like this when I release
2181 Heliotrope to the world at large, since I suspect this will be a popular
2182 migration path. So thank you for laying the foundation.
2183 --
2184 William <wmorgan-sup at masanjin.net>
2185
2186 From wmorgan-sup@masanjin.net Sun May 22 18:05:57 2011
2187 From: wmorgan-sup@masanjin.net (William Morgan)
2188 Date: Sun, 22 May 2011 22:05:57 +0000
2189 Subject: [sup-devel] Query for largest msg_id?
2190 In-Reply-To: <1305748878-sup-7940@xo15-sascha.sascha.silbe.org>
2191 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
2192 <1305471101-sup-6655@masanjin.net>
2193 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
2194 <1305693289-sup-4896@masanjin.net>
2195 <1305748878-sup-7940@xo15-sascha.sascha.silbe.org>
2196 Message-ID: <1306101722-sup-3610@masanjin.net>
2197
2198 Reformatted excerpts from Sascha Silbe's message of 2011-05-18:
2199 > If heliotrope permanently erases the copies (instead of just not
2200 > exposing UI to access them), that would be a major step backwards.
2201
2202 What do you suggest as a way of exposing duplicates within the UI? I
2203 worry that just keeping all copies of a message around will make the
2204 thread structure messy. Is there a better alternative?
2205 --
2206 William <wmorgan-sup at masanjin.net>
2207
2208 From dmishd@gmail.com Sun May 22 18:03:41 2011
2209 From: dmishd@gmail.com (Hamish)
2210 Date: Sun, 22 May 2011 23:03:41 +0100
2211 Subject: [sup-devel] [PATCH] Fix problem with time parsing
2212 In-Reply-To: <1305073985-sup-7419@masanjin.net>
2213 References: <1304373710-sup-1383@whisper> <1305049400-sup-4316@masanjin.net>
2214 <1305053133-sup-4055@whisper> <1305073985-sup-7419@masanjin.net>
2215 Message-ID: <1306101800-sup-8165@whisper>
2216
2217 Excerpts from William Morgan's message of Wed May 11 01:34:05 +0100 2011:
2218 > Reformatted excerpts from Hamish's message of 2011-05-10:
2219 > > Sadly it was not spam, but an email from staples (UK) about some stuff
2220 > > I bought from then online. So sup should not barf on it, but forging a
2221 > > date header would be fine by me. Though "now" might be better than
2222 > > date zero, which I think is what sup normally does otherwise ...
2223 >
2224 > I agree. If you have a chance, please add a ticket for this on the
2225 > heliotrope github project.
2226
2227 Done: https://github.com/wmorgan/heliotrope/issues/2
2228
2229 Hamish Downer
2230
2231 From dmishd@gmail.com Sun May 22 18:47:03 2011
2232 From: dmishd@gmail.com (Hamish)
2233 Date: Sun, 22 May 2011 23:47:03 +0100
2234 Subject: [sup-devel] [sup-talk] Word wrap for quoted lines
2235 In-Reply-To: <1305818177-sup-9473@localhost>
2236 References: <BANLkTimTBRbHOTPDpE=qFZetZyccdCdt6w@mail.gmail.com>
2237 <1305817664-sup-572@localhost> <1305818177-sup-9473@localhost>
2238 Message-ID: <1306104299-sup-3629@whisper>
2239
2240 Excerpts from john.wyzer's message of Thu May 19 16:16:51 +0100 2011:
2241 > > Excerpts from Antti Kaihola's message of Tue May 10 09:07:13 +0200 2011:
2242 > > >
2243 > > > When reading messages in Sup and expanding quoted lines, long quoted
2244 > > > lines are not word wrapped and thus I can't read all the content.
2245 > > > Non-quoted content wraps as expected.
2246 >
2247 > Ah. Here's a fix:
2248 > https://github.com/rburchell/sup/commit/a60dd01fe297bf3cd5a12c17a40849219c7f8a91
2249
2250 I've created a wrap_quoted branch and applied this patch to it. If there
2251 are no objections I'll merge it into the next branch, probably next
2252 weekend.
2253
2254 Hamish Downer
2255
2256 From gaudenz@soziologie.ch Mon May 23 03:52:43 2011
2257 From: gaudenz@soziologie.ch (Gaudenz Steinlin)
2258 Date: Mon, 23 May 2011 09:52:43 +0200
2259 Subject: [sup-devel] Query for largest msg_id?
2260 In-Reply-To: <1306101722-sup-3610@masanjin.net>
2261 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
2262 <1305471101-sup-6655@masanjin.net>
2263 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
2264 <1305693289-sup-4896@masanjin.net>
2265 <1305748878-sup-7940@xo15-sascha.sascha.silbe.org>
2266 <1306101722-sup-3610@masanjin.net>
2267 Message-ID: <1306136821-sup-9611@meteor.durcheinandertal.local>
2268
2269 Excerpts from William Morgan's message of 2011-05-23 00:05:57 +0200:
2270 > Reformatted excerpts from Sascha Silbe's message of 2011-05-18:
2271 > > If heliotrope permanently erases the copies (instead of just not
2272 > > exposing UI to access them), that would be a major step backwards.
2273 >
2274 > What do you suggest as a way of exposing duplicates within the UI? I
2275 > worry that just keeping all copies of a message around will make the
2276 > thread structure messy. Is there a better alternative?
2277
2278 Merging the messages is fine and actually an improvement over other
2279 MUAs. But adding a line in the header section indicating the source
2280 and how often the message appears in the source would be nice. Like
2281
2282 Sources: maildir://bla/blu (2), maildir://foo/bar (1)
2283
2284 Also if you display the message in the raw form (V key in sup), then
2285 all the copies could be shown in full. This would help diagnosing
2286 why you receive duplicates of certain messages.
2287
2288 Gaudenz
2289
2290 --
2291 Ever tried. Ever failed. No matter.
2292 Try again. Fail again. Fail better.
2293 ~ Samuel Beckett ~
2294
2295 From hsanson@gmail.com Mon May 23 10:42:16 2011
2296 From: hsanson@gmail.com (Horacio Sanson)
2297 Date: Mon, 23 May 2011 23:42:16 +0900
2298 Subject: [sup-devel] Heliotrope limitations for backward synchronization, , ,
2299 Message-ID: <BANLkTikfZiyezXe3tF-VVgsEWjZb33EEVg@mail.gmail.com>
2300
2301 Now that I have GMail to Heliotrope initial synchronization (first
2302 time) and incremental (new messages) synchronization working in my
2303 script I started working on Heliotrope to GMail synchronization.
2304 Unfortunately I found some difficulties to achieve this.
2305
2306 I am following rfc4549.txt and the client-to-server synchronization
2307 says verbatim:
2308
2309 c) "Client-to-server synchronization": for each IMAP "action" that
2310 was pending on the client, do the following:
2311
2312 1) If the action implies opening a new mailbox (any operation that
2313 operates on messages), open the mailbox. Check its UID
2314 validity value (see Section 4.1 for more details) returned in
2315 the UIDVALIDITY response code. If the UIDVALIDITY value
2316 returned by the server differs, the client MUST empty the local
2317 cache of the mailbox and remove any pending "actions" that
2318 refer to UIDs in that mailbox (and consider them failed). Note
2319 that this doesn't affect actions performed on client-generated
2320 fake UIDs (see Section 5).
2321
2322 2) Perform the action. If the action is to delete a mailbox
2323 (DELETE), make sure that the mailbox is closed first (see also
2324 Section 3.4.12 of [RFC2683]).
2325
2326
2327 Seems simple to do but Heliotrope currently does not store/provide
2328 enough information to implement this like:
2329
2330 1) Account and Mailbox information of messages.
2331 2) Heliotrope msg_id to GMail UID map.
2332 3) Per mailbox action FIFO queues.
2333
2334
2335 Each action performed via Heliotrope (add label, remove label, state
2336 change, delete) should be stored in some kind of FIFO associated to
2337 the an account/mailbox pair. For example adding a label to a message
2338 in my personal account's inbox would add an action like:
2339
2340 label_add <label> <msg_id>
2341
2342 where label_add is the action, <label> the action parameter and
2343 <msg_id> the message ID as seen by Heliotrope. Then during
2344 synchronization for an account I would iterate over all mailboxes
2345 associated to the account and for each one I would replay the same
2346 actions stored in the mailbox FIFO in the GMail server. Once an action
2347 succeeds on the GMail side I pop it out of the FIFO and continue with
2348 the next action. Using the msg_id to UID map I can determine to what
2349 message on the GMail side the action should be performed on.
2350
2351 Now how to implement these features? One way could be using the extra
2352 parameters hash in the Heliotrope::Index::message_add method to store
2353 the messages account, mailbox and UID's of each message when they are
2354 added to Heliotrope index. This would also require a way to query this
2355 information.
2356
2357 Another way would be to use special labels to mark mailboxes and
2358 accounts. And add some new query formats to get all mailboxes for a
2359 certain account and the FIFO actions of the mailbox.
2360
2361 Finally I am more inclined to keeping a separate Index/Store for each
2362 account and access them via REST URLs like:
2363
2364 POST /<account> #
2365 Create new account Index/Store files
2366 POST /<account>/<mailbox> # Create new
2367 mailbox in account. Implemented using special labels?
2368 GET /<account>/mailboxes # List all
2369 mailboxes for account
2370 GET /<account>/<mailbox>/action # Get the next pending
2371 action on mailbox
2372 DELETE /<account>/<mailbox>/action # Delete next pending
2373 action on mailbox
2374 POST /<account>/<mailbox>/message # Add new message to an
2375 account/mailbox
2376 GET /<account>/<mailbox>/message # Get all messages from
2377 account/mailbox
2378
2379 This of course is how I think IMAP offline synchronization could be
2380 done. If there are other ways to do this I am open to suggestions.
2381
2382 regards,
2383 Horacio Sanson
2384
2385 From wmorgan-sup@masanjin.net Mon May 23 12:14:53 2011
2386 From: wmorgan-sup@masanjin.net (William Morgan)
2387 Date: Mon, 23 May 2011 16:14:53 +0000
2388 Subject: [sup-devel] Query for largest msg_id?
2389 In-Reply-To: <1306136821-sup-9611@meteor.durcheinandertal.local>
2390 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
2391 <1305471101-sup-6655@masanjin.net>
2392 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
2393 <1305693289-sup-4896@masanjin.net>
2394 <1305748878-sup-7940@xo15-sascha.sascha.silbe.org>
2395 <1306101722-sup-3610@masanjin.net>
2396 <1306136821-sup-9611@meteor.durcheinandertal.local>
2397 Message-ID: <1306167053-sup-7478@masanjin.net>
2398
2399 Reformatted excerpts from Gaudenz Steinlin's message of 2011-05-23:
2400 > Merging the messages is fine and actually an improvement over other
2401 > MUAs.
2402
2403 I agree. I like the behavior.
2404
2405 > But adding a line in the header section indicating the source
2406 > and how often the message appears in the source would be nice.
2407
2408 This is essentially what Alvaro's detailed-headers hook does. But unlike
2409 Sup, heliotrope doesn't have the notion of different mailstores. There's
2410 just one.
2411
2412 With some effort, we could add some kind of differentiating information
2413 at mail addition time, but it's hard to know what would fit the general
2414 case. A list of (from, timestamp) tuples?
2415 --
2416 William <wmorgan-sup at masanjin.net>
2417
2418 From dmishd@gmail.com Mon May 23 17:22:03 2011
2419 From: dmishd@gmail.com (Hamish)
2420 Date: Mon, 23 May 2011 22:22:03 +0100
2421 Subject: [sup-devel] Query for largest msg_id?
2422 In-Reply-To: <BANLkTikdq9JZbpT-DfZUNXQ74sqW2Txwqg@mail.gmail.com>
2423 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
2424 <1305471101-sup-6655@masanjin.net>
2425 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
2426 <BANLkTinBWgd2NYZqT+y8oHt9-_aiRjdcNA@mail.gmail.com>
2427 <1305694759-sup-7483@masanjin.net>
2428 <BANLkTikdq9JZbpT-DfZUNXQ74sqW2Txwqg@mail.gmail.com>
2429 Message-ID: <1306185381-sup-6337@whisper>
2430
2431 Excerpts from Horacio Sanson's message of Fri May 20 16:38:30 +0100 2011:
2432 > On Wed, May 18, 2011 at 2:05 PM, William Morgan wrote:
2433 > > Reformatted excerpts from Horacio Sanson's message of 2011-05-17:
2434 > >> I implemented a new version of the GMail -> Heliotrope sync script and
2435 > >> attach it here in hopes someone will test it and provide some
2436 > >> feedback/comments.
2437
2438 This sounds awesome. I've already downloaded my gmail email using
2439 offlineimap (into maildir format), and I'm wondering if it's possible to
2440 get your script to use the local copies first, and only then get the new
2441 emails from gmail - so as to save redownloading several hundred
2442 megabytes of email ...
2443
2444 I'm keen to try it out, but don't want to use it on my main account as I
2445 imagine it would take a long time. Maybe I'll just set up a second
2446 account with some test email to play with it.
2447
2448 If it's just too hard to do, I'll just have to do the whole thing
2449 anyway, but it won't be too bad as just a one off job.
2450
2451 Thanks for your work though
2452 Hamish
2453
2454 From vivien.didelot@gmail.com Mon May 23 18:23:58 2011
2455 From: vivien.didelot@gmail.com (Vivien Didelot)
2456 Date: Mon, 23 May 2011 18:23:58 -0400
2457 Subject: [sup-devel] Heliotrope limitations for backward synchronization, , ,
2458 In-Reply-To: <BANLkTikfZiyezXe3tF-VVgsEWjZb33EEVg@mail.gmail.com>
2459 References: <BANLkTikfZiyezXe3tF-VVgsEWjZb33EEVg@mail.gmail.com>
2460 Message-ID: <BANLkTinOR1N6DEi0GvCRBjd4GCg=sDP4=Q@mail.gmail.com>
2461
2462 Hi Horacio,
2463
2464 FWIW, you may use -- or even just take a look at -- the 'gmail' gem.
2465 It works pretty well for back syncing and is built on RFCs too (if I'm not
2466 mistaken).
2467 For maildir backsyncing, the 'maildir' gem also do the job,
2468 both are using the great 'mail' gem (which I hope, Heliotrope & co will use
2469 soon).
2470
2471 Vivien.
2472
2473 On Mon, May 23, 2011 at 10:42 AM, Horacio Sanson <hsanson at gmail.com> wrote:
2474
2475 > Now that I have GMail to Heliotrope initial synchronization (first
2476 > time) and incremental (new messages) synchronization working in my
2477 > script I started working on Heliotrope to GMail synchronization.
2478 > Unfortunately I found some difficulties to achieve this.
2479 >
2480 > I am following rfc4549.txt and the client-to-server synchronization
2481 > says verbatim:
2482 >
2483 > c) "Client-to-server synchronization": for each IMAP "action" that
2484 > was pending on the client, do the following:
2485 >
2486 > 1) If the action implies opening a new mailbox (any operation that
2487 > operates on messages), open the mailbox. Check its UID
2488 > validity value (see Section 4.1 for more details) returned in
2489 > the UIDVALIDITY response code. If the UIDVALIDITY value
2490 > returned by the server differs, the client MUST empty the local
2491 > cache of the mailbox and remove any pending "actions" that
2492 > refer to UIDs in that mailbox (and consider them failed). Note
2493 > that this doesn't affect actions performed on client-generated
2494 > fake UIDs (see Section 5).
2495 >
2496 > 2) Perform the action. If the action is to delete a mailbox
2497 > (DELETE), make sure that the mailbox is closed first (see also
2498 > Section 3.4.12 of [RFC2683]).
2499 >
2500 >
2501 > Seems simple to do but Heliotrope currently does not store/provide
2502 > enough information to implement this like:
2503 >
2504 > 1) Account and Mailbox information of messages.
2505 > 2) Heliotrope msg_id to GMail UID map.
2506 > 3) Per mailbox action FIFO queues.
2507 >
2508 >
2509 > Each action performed via Heliotrope (add label, remove label, state
2510 > change, delete) should be stored in some kind of FIFO associated to
2511 > the an account/mailbox pair. For example adding a label to a message
2512 > in my personal account's inbox would add an action like:
2513 >
2514 > label_add <label> <msg_id>
2515 >
2516 > where label_add is the action, <label> the action parameter and
2517 > <msg_id> the message ID as seen by Heliotrope. Then during
2518 > synchronization for an account I would iterate over all mailboxes
2519 > associated to the account and for each one I would replay the same
2520 > actions stored in the mailbox FIFO in the GMail server. Once an action
2521 > succeeds on the GMail side I pop it out of the FIFO and continue with
2522 > the next action. Using the msg_id to UID map I can determine to what
2523 > message on the GMail side the action should be performed on.
2524 >
2525 > Now how to implement these features? One way could be using the extra
2526 > parameters hash in the Heliotrope::Index::message_add method to store
2527 > the messages account, mailbox and UID's of each message when they are
2528 > added to Heliotrope index. This would also require a way to query this
2529 > information.
2530 >
2531 > Another way would be to use special labels to mark mailboxes and
2532 > accounts. And add some new query formats to get all mailboxes for a
2533 > certain account and the FIFO actions of the mailbox.
2534 >
2535 > Finally I am more inclined to keeping a separate Index/Store for each
2536 > account and access them via REST URLs like:
2537 >
2538 > POST /<account> #
2539 > Create new account Index/Store files
2540 > POST /<account>/<mailbox> # Create new
2541 > mailbox in account. Implemented using special labels?
2542 > GET /<account>/mailboxes # List all
2543 > mailboxes for account
2544 > GET /<account>/<mailbox>/action # Get the next pending
2545 > action on mailbox
2546 > DELETE /<account>/<mailbox>/action # Delete next pending
2547 > action on mailbox
2548 > POST /<account>/<mailbox>/message # Add new message to an
2549 > account/mailbox
2550 > GET /<account>/<mailbox>/message # Get all messages from
2551 > account/mailbox
2552 >
2553 > This of course is how I think IMAP offline synchronization could be
2554 > done. If there are other ways to do this I am open to suggestions.
2555 >
2556 > regards,
2557 > Horacio Sanson
2558 > _______________________________________________
2559 > Sup-devel mailing list
2560 > Sup-devel at rubyforge.org
2561 > http://rubyforge.org/mailman/listinfo/sup-devel
2562 >
2563
2564
2565
2566 --
2567 Vivien Didelot,
2568 vivien.didelot.org
2569 -------------- next part --------------
2570 An HTML attachment was scrubbed...
2571 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110523/9478f7bf/attachment.html>
2572
2573 From hsanson@gmail.com Mon May 23 23:16:24 2011
2574 From: hsanson@gmail.com (Horacio Sanson)
2575 Date: Tue, 24 May 2011 12:16:24 +0900
2576 Subject: [sup-devel] Query for largest msg_id?
2577 In-Reply-To: <1306185381-sup-6337@whisper>
2578 References: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
2579 <1305471101-sup-6655@masanjin.net>
2580 <BANLkTin5eRZw44Je+==V=K4pyVw2T7S3+A@mail.gmail.com>
2581 <BANLkTinBWgd2NYZqT+y8oHt9-_aiRjdcNA@mail.gmail.com>
2582 <1305694759-sup-7483@masanjin.net>
2583 <BANLkTikdq9JZbpT-DfZUNXQ74sqW2Txwqg@mail.gmail.com>
2584 <1306185381-sup-6337@whisper>
2585 Message-ID: <BANLkTikn6iB-+f5-xLk2nEAOBL8Dzjfx8A@mail.gmail.com>
2586
2587 On Tue, May 24, 2011 at 6:22 AM, Hamish <dmishd at gmail.com> wrote:
2588 > Excerpts from Horacio Sanson's message of Fri May 20 16:38:30 +0100 2011:
2589 >> On Wed, May 18, 2011 at 2:05 PM, William Morgan wrote:
2590 >> > Reformatted excerpts from Horacio Sanson's message of 2011-05-17:
2591 >> >> I implemented a new version of the GMail -> Heliotrope sync script and
2592 >> >> attach it here in hopes someone will test it and provide some
2593 >> >> feedback/comments.
2594 >
2595 > This sounds awesome. I've already downloaded my gmail email using
2596 > offlineimap (into maildir format), and I'm wondering if it's possible to
2597 > get your script to use the local copies first, and only then get the new
2598 > emails from gmail - so as to save redownloading several hundred
2599 > megabytes of email ...
2600 >
2601
2602 Unfortunately this script is GMail specific and I make use of some
2603 GMail only extensions (X-GM-LABELS, XLIST, etc) that render the
2604 script unusable for any other mail store. My main motivation for
2605 creating this script was to get rid of offlineimap as this would store
2606 each message twice, once in offlineimap folders and once in heliotrope
2607 store.
2608
2609 > I'm keen to try it out, but don't want to use it on my main account as I
2610 > imagine it would take a long time. Maybe I'll just set up a second
2611 > account with some test email to play with it.
2612 >
2613
2614 Please do not use this script with your main account,... It won't
2615 affect your GMail data since I use read-only mode (IMAP examine) but
2616 it still has some problems I need to handle before I can guarantee
2617 that Heliotrope is 100% sync with GMail after running the script. For
2618 instance sometimes GMail fails to send me the message body or timeouts
2619 generating some IMAP exceptions I need to handle more gracefully.
2620
2621 If you have a test account with some messages any testing is greatly
2622 appreciated...
2623
2624 > If it's just too hard to do, I'll just have to do the whole thing
2625 > anyway, but it won't be too bad as just a one off job.
2626 >
2627 > Thanks for your work though
2628 > Hamish
2629 > _______________________________________________
2630 > Sup-devel mailing list
2631 > Sup-devel at rubyforge.org
2632 > http://rubyforge.org/mailman/listinfo/sup-devel
2633 >
2634
2635 From alvherre@alvh.no-ip.org Tue May 24 14:13:43 2011
2636 From: alvherre@alvh.no-ip.org (Alvaro Herrera)
2637 Date: Tue, 24 May 2011 14:13:43 -0400
2638 Subject: [sup-devel] [sup-talk] Word wrap for quoted lines
2639 In-Reply-To: <1306104299-sup-3629@whisper>
2640 References: <BANLkTimTBRbHOTPDpE=qFZetZyccdCdt6w@mail.gmail.com>
2641 <1305817664-sup-572@localhost> <1305818177-sup-9473@localhost>
2642 <1306104299-sup-3629@whisper>
2643 Message-ID: <1306260795-sup-3474@alvh.no-ip.org>
2644
2645 Excerpts from Hamish's message of dom may 22 18:47:03 -0400 2011:
2646 > Excerpts from john.wyzer's message of Thu May 19 16:16:51 +0100 2011:
2647 > > > Excerpts from Antti Kaihola's message of Tue May 10 09:07:13 +0200 2011:
2648 > > > >
2649 > > > > When reading messages in Sup and expanding quoted lines, long quoted
2650 > > > > lines are not word wrapped and thus I can't read all the content.
2651 > > > > Non-quoted content wraps as expected.
2652 > >
2653 > > Ah. Here's a fix:
2654 > > https://github.com/rburchell/sup/commit/a60dd01fe297bf3cd5a12c17a40849219c7f8a91
2655 >
2656 > I've created a wrap_quoted branch and applied this patch to it. If there
2657 > are no objections I'll merge it into the next branch, probably next
2658 > weekend.
2659
2660 Tried it from your branch, works great.
2661
2662 --
2663 ?lvaro Herrera <alvherre at alvh.no-ip.org>
2664
2665 From dmishd@gmail.com Sun May 29 13:32:07 2011
2666 From: dmishd@gmail.com (Hamish)
2667 Date: Sun, 29 May 2011 18:32:07 +0100
2668 Subject: [sup-devel] [sup-talk] Word wrap for quoted lines
2669 In-Reply-To: <1306260795-sup-3474@alvh.no-ip.org>
2670 References: <BANLkTimTBRbHOTPDpE=qFZetZyccdCdt6w@mail.gmail.com>
2671 <1305817664-sup-572@localhost> <1305818177-sup-9473@localhost>
2672 <1306104299-sup-3629@whisper> <1306260795-sup-3474@alvh.no-ip.org>
2673 Message-ID: <1306690297-sup-4154@whisper>
2674
2675 Excerpts from Alvaro Herrera's message of Tue May 24 19:13:43 +0100 2011:
2676 > Excerpts from Hamish's message of dom may 22 18:47:03 -0400 2011:
2677 > > I've created a wrap_quoted branch and applied this patch to it. If there
2678 > > are no objections I'll merge it into the next branch, probably next
2679 > > weekend.
2680 >
2681 > Tried it from your branch, works great.
2682
2683 OK, this is now merged into the next branch.
2684
2685 Hamish
2686
2687 From dmishd@gmail.com Mon May 30 13:23:10 2011
2688 From: dmishd@gmail.com (Hamish)
2689 Date: Mon, 30 May 2011 18:23:10 +0100
2690 Subject: [sup-devel] [PATCHES] Add an account selector in edit-mode
2691 In-Reply-To: <1300032642-sup-9716@mailer>
2692 References: <1300032642-sup-9716@mailer>
2693 Message-ID: <1306775826-sup-4909@whisper>
2694
2695 Excerpts from Damien Leone's message of Sun Mar 13 16:13:05 +0000 2011:
2696 > 0002-edit-message-mode-Add-an-optional-account-selector.patch
2697
2698 I've finally got around to reviewing some of these. The patch above
2699 seems to confuse possible email addresses, and user accounts. These do
2700 not line up as it is possible for each account to have multiple email
2701 addresses associated with it (using the alternates value in an account).
2702
2703 I have only one account, and have alternates, so the account selector
2704 appears, but doesn't work due to the confusion. I've had a look through,
2705 but not found an easy way to fix that behaviour, so I'll leave it up to
2706 you as to how you want to do it.
2707
2708 I imagine though that you would want to handle all the possible email
2709 addresses, so I've written an extra patch to do that, and pushed your
2710 patch and mine onto the (new) account_selector branch on gitorious.
2711 Please have a look and see if what I've done still works for you, and is
2712 what you meant.
2713
2714 I also wondered whether to change the behaviour so that the account
2715 selector will only appear if there is more than one possible email
2716 address to choose from, but I thought it would be handy to be able to
2717 reset the From: header to your usual From: using the selector, rather
2718 than having to hand edit whatever was in the To: header that you are
2719 replying to. What do you think?
2720
2721 I'll wait for you to review my changes before I merge this into next.
2722 (My changes are in commit bf56b543cc664c40c3695e287ee8e7e924f2d0d1)
2723
2724 Hamish Downer
2725
2726 From dmishd@gmail.com Mon May 30 18:57:11 2011
2727 From: dmishd@gmail.com (Hamish)
2728 Date: Mon, 30 May 2011 23:57:11 +0100
2729 Subject: [sup-devel] github patches
2730 Message-ID: <1306794197-sup-949@whisper>
2731
2732 I thought I'd have a poke around github for useful patches that haven't
2733 been applied, I've found a few. Big-ish ones (like the account selector)
2734 are getting their own branch, but I can't be bothered doing that for
2735 every single patch, so I've stated a branch called "github_patches" to
2736 put a few small ones in.
2737
2738 There's one I'm not sure about, any feedback welcome:
2739
2740 https://github.com/mavam/sup/commit/cbc577609dea6cb058aaf39811678f9d34fd1848
2741 This allows the startup hook to affect the sent source and draft source.
2742 I wonder if any startup hooks would rely on the sent source and draft
2743 source being set already?
2744
2745 Hamish Downer
2746
2747 From eg@gaute.vetsj.com Tue May 31 03:57:39 2011
2748 From: eg@gaute.vetsj.com (Gaute Hope)
2749 Date: Tue, 31 May 2011 09:57:39 +0200
2750 Subject: [sup-devel] Another UTF-8 exception: edit-message-mode.rb
2751 Message-ID: <1306828491-sup-5835@qwerzila>
2752
2753 Hi,
2754
2755 ran into another UTF-8 exception in edit-message-mode, I don't know
2756 exactly what is causing it - but could be UTF-8 chars in some of the
2757 keywords that are sanitized.
2758
2759 Anyway, exception:
2760 --- ArgumentError from thread: main
2761 invalid byte sequence in UTF-8
2762 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:498:in `gsub'
2763 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:498:in `sanitize_body'
2764 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:373:in `block in send_message'
2765 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/mbox.rb:114:in `block in store_message'
2766 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/mbox.rb:111:in `open'
2767 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/mbox.rb:111:in `store_message'
2768 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/sent.rb:28:in `write_sent_message'
2769 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/util.rb:618:in `method_missing'
2770 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:373:in `send_message'
2771 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/mode.rb:59:in `handle_input'
2772 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:277:in `handle_input'
2773 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/bin/sup:271:in `<module:Redwood>'
2774 /home/gaute/.gem/ruby/1.9.1/gems/sup-999/bin/sup:80:in `<top (required)>'
2775 /home/gaute/.gem/ruby/1.9.1/bin/sup:19:in `load'
2776 /home/gaute/.gem/ruby/1.9.1/bin/sup:19:in `<main>'
2777
2778 And a patch:
2779 0001-Fix-UTF-8-exception-in-santizing-body.patch
2780
2781 Best regards,
2782 Gaute
2783 -------------- next part --------------
2784 A non-text attachment was scrubbed...
2785 Name: 0001-Fix-UTF-8-exception-in-santizing-body.patch
2786 Type: application/octet-stream
2787 Size: 693 bytes
2788 Desc: not available
2789 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20110531/2b149473/attachment.obj>
2790