community/pipermail-archives/sup-devel/2010-07.txt (81417B) - raw
1 From sascha-pgp@silbe.org Thu Jul 1 09:48:13 2010
2 From: sascha-pgp@silbe.org (Sascha Silbe)
3 Date: Thu, 1 Jul 2010 13:48:13 +0000
4 Subject: [sup-devel] [PATCH] parse_header: don't use empty or invalid
5 Message-ID header
6 Message-ID: <1277992093-10600-1-git-send-email-sascha-pgp@silbe.org>
7
8 If Message-ID contains only invalid characters (or none at all),
9 sanitize_message_id will return an empty string. As Message.parse_header
10 only checked for header existance, not validity, sup-dump could produce
11 a dump file that sup-sync would choke on.
12
13 We now fall back to a fake id for both missing and invalid Message-ID
14 headers.
15 ---
16 lib/sup/message.rb | 13 +++++++------
17 1 files changed, 7 insertions(+), 6 deletions(-)
18
19 diff --git a/lib/sup/message.rb b/lib/sup/message.rb
20 index a13fc0c..f273988 100644
21 --- a/lib/sup/message.rb
22 +++ b/lib/sup/message.rb
23 @@ -77,14 +77,15 @@ class Message
24 def parse_header encoded_header
25 header = SavingHash.new { |k| decode_header_field encoded_header[k] }
26
27 - @id = if header["message-id"]
28 + @id = ''
29 + if header["message-id"]
30 mid = header["message-id"] =~ /<(.+?)>/ ? $1 : header["message-id"]
31 - sanitize_message_id mid
32 - else
33 - id = "sup-faked-" + Digest::MD5.hexdigest(raw_header)
34 - from = header["from"]
35 + @id = sanitize_message_id mid
36 + end
37 + if (not @id.include? '@') || @id.length < 6
38 + @id = "sup-faked-" + Digest::MD5.hexdigest(raw_header)
39 + #from = header["from"]
40 #debug "faking non-existent message-id for message from #{from}: #{id}"
41 - id
42 end
43
44 @from = Person.from_address(if header["from"]
45 --
46 1.7.1
47
48
49 From bwalton@artsci.utoronto.ca Thu Jul 1 10:33:22 2010
50 From: bwalton@artsci.utoronto.ca (Ben Walton)
51 Date: Thu, 01 Jul 2010 10:33:22 -0400
52 Subject: [sup-devel] [PATCH] parse_header: don't use empty or invalid
53 Message-ID header
54 In-Reply-To: <1277992093-10600-1-git-send-email-sascha-pgp@silbe.org>
55 References: <1277992093-10600-1-git-send-email-sascha-pgp@silbe.org>
56 Message-ID: <1277994760-sup-4189@pinkfloyd.chass.utoronto.ca>
57
58 Excerpts from Sascha Silbe's message of Thu Jul 01 09:48:13 -0400 2010:
59
60 Hi Sascha,
61
62 > + #from = header["from"]
63
64 This patch looks good, but why include the commented line?
65
66 Thanks
67 -Ben
68 --
69 Ben Walton
70 Systems Programmer - CHASS
71 University of Toronto
72 C:416.407.5610 | W:416.978.4302
73
74
75 From sascha-ml-email-sup-devel@silbe.org Thu Jul 1 15:34:47 2010
76 From: sascha-ml-email-sup-devel@silbe.org (Sascha Silbe)
77 Date: Thu, 01 Jul 2010 19:34:47 +0000
78 Subject: [sup-devel] [PATCH] parse_header: don't use empty or invalid
79 Message-ID header
80 In-Reply-To: <1277994760-sup-4189@pinkfloyd.chass.utoronto.ca>
81 References: <1277992093-10600-1-git-send-email-sascha-pgp@silbe.org>
82 <1277994760-sup-4189@pinkfloyd.chass.utoronto.ca>
83 Message-ID: <1278012648-sup-257@twin.sascha.silbe.org>
84
85 Excerpts from Ben Walton's message of Thu Jul 01 14:33:22 +0000 2010:
86
87 > > + #from = header["from"]
88 >
89 > This patch looks good, but why include the commented line?
90 I just commented out a line that was only useful in combination with the
91 line directly below it that was already commented out. If you prefer
92 I can remove both of them instead (or do the change in a separate patch).
93
94 Sascha
95
96 --
97 http://sascha.silbe.org/
98 http://www.infra-silbe.de/
99 -------------- next part --------------
100 A non-text attachment was scrubbed...
101 Name: signature.asc
102 Type: application/pgp-signature
103 Size: 490 bytes
104 Desc: not available
105 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100701/2157f666/attachment.bin>
106
107 From bwalton@artsci.utoronto.ca Thu Jul 1 16:11:08 2010
108 From: bwalton@artsci.utoronto.ca (Ben Walton)
109 Date: Thu, 01 Jul 2010 16:11:08 -0400
110 Subject: [sup-devel] [PATCH] parse_header: don't use empty or invalid
111 Message-ID header
112 In-Reply-To: <1278012648-sup-257@twin.sascha.silbe.org>
113 References: <1277992093-10600-1-git-send-email-sascha-pgp@silbe.org>
114 <1277994760-sup-4189@pinkfloyd.chass.utoronto.ca>
115 <1278012648-sup-257@twin.sascha.silbe.org>
116 Message-ID: <1278015019-sup-7327@pinkfloyd.chass.utoronto.ca>
117
118 Excerpts from Sascha Silbe's message of Thu Jul 01 15:34:47 -0400 2010:
119
120 > I just commented out a line that was only useful in combination with
121 > the line directly below it that was already commented out. If you
122 > prefer I can remove both of them instead (or do the change in a
123 > separate patch).
124
125 I'd resubmit with the lines removed. It keeps the history cleaner.
126 Up to you of course, it's just my own preference I'm putting forward.
127
128 Thanks
129 -Ben
130 --
131 Ben Walton
132 Systems Programmer - CHASS
133 University of Toronto
134 C:416.407.5610 | W:416.978.4302
135
136
137 From cam+sup@cammunism.org Thu Jul 1 17:32:37 2010
138 From: cam+sup@cammunism.org (Cameron Matheson)
139 Date: Thu, 01 Jul 2010 15:32:37 -0600
140 Subject: [sup-devel] =?utf-8?b?W1BBVENIXSBEb27igJl0IGRpc3BsYXkgIi4uLiIg?=
141 =?utf-8?q?after_snippets_which_are_displayed_completely?=
142 In-Reply-To: <1276711781-sup-4102@midna.zekjur.net>
143 References: <1276711781-sup-4102@midna.zekjur.net>
144 Message-ID: <1278019896-sup-9354@cammunism.org>
145
146 Excerpts from Michael Stapelberg's message of Wed Jun 16 12:11:47 -0600 2010:
147 > quote from the commit message:
148 > Don?t display "..." after snippets which are displayed completely
149 >
150 > Short mails (for example: "Yes, the date works for me.") often can
151 > be displayed completely in the snippet. However, before this patch,
152 > sup abbreviated the snippet even though it was not abbreviated.
153
154 I haven't seen any one else comment on this yet, but this is a nagging
155 issue that I have meant to fix for ages. Thanks!
156
157 From rlane@club.cc.cmu.edu Fri Jul 2 22:31:32 2010
158 From: rlane@club.cc.cmu.edu (Rich Lane)
159 Date: Fri, 02 Jul 2010 22:31:32 -0400
160 Subject: [sup-devel] [PATCH] fix reference to EncodingUnsupportedError
161 In-Reply-To: <1277797825-8181-1-git-send-email-sascha-pgp@silbe.org>
162 References: <1277797825-8181-1-git-send-email-sascha-pgp@silbe.org>
163 Message-ID: <1278123679-sup-5970@zyrg.net>
164
165 Applied to master.
166
167 From rlane@club.cc.cmu.edu Fri Jul 2 22:31:53 2010
168 From: rlane@club.cc.cmu.edu (Rich Lane)
169 Date: Fri, 02 Jul 2010 22:31:53 -0400
170 Subject: [sup-devel] [PATCH] Don't choke when scanning message with
171 unknown encoding
172 In-Reply-To: <1277798694-8642-1-git-send-email-sascha-pgp@silbe.org>
173 References: <1277798694-8642-1-git-send-email-sascha-pgp@silbe.org>
174 Message-ID: <1278123779-sup-6393@zyrg.net>
175
176 Applied to master.
177
178 From rlane@club.cc.cmu.edu Fri Jul 2 22:31:59 2010
179 From: rlane@club.cc.cmu.edu (Rich Lane)
180 Date: Fri, 02 Jul 2010 22:31:59 -0400
181 Subject: [sup-devel] [PATCH] fix crash in sup-dump if the default sent
182 source is used
183 In-Reply-To: <1277799125-8696-1-git-send-email-sascha-pgp@silbe.org>
184 References: <1277799125-8696-1-git-send-email-sascha-pgp@silbe.org>
185 Message-ID: <1278123805-sup-3778@zyrg.net>
186
187 Applied to master.
188
189 From rlane@club.cc.cmu.edu Fri Jul 2 22:32:23 2010
190 From: rlane@club.cc.cmu.edu (Rich Lane)
191 Date: Fri, 02 Jul 2010 22:32:23 -0400
192 Subject: [sup-devel] [PATCH] parse_header: don't use empty or invalid
193 Message-ID header
194 In-Reply-To: <1277992093-10600-1-git-send-email-sascha-pgp@silbe.org>
195 References: <1277992093-10600-1-git-send-email-sascha-pgp@silbe.org>
196 Message-ID: <1278124230-sup-174@zyrg.net>
197
198 Applied to master.
199
200 From rlane@club.cc.cmu.edu Fri Jul 2 22:33:21 2010
201 From: rlane@club.cc.cmu.edu (Rich Lane)
202 Date: Fri, 02 Jul 2010 22:33:21 -0400
203 Subject: [sup-devel] =?utf-8?b?W1BBVENIXSBEb27igJl0IGRpc3BsYXkgIi4uLiIg?=
204 =?utf-8?q?after_snippets_which_are_displayed_completely?=
205 In-Reply-To: <1276711781-sup-4102@midna.zekjur.net>
206 References: <1276711781-sup-4102@midna.zekjur.net>
207 Message-ID: <1278124387-sup-5603@zyrg.net>
208
209 Applied to master.
210
211 From rlane@club.cc.cmu.edu Fri Jul 2 22:33:48 2010
212 From: rlane@club.cc.cmu.edu (Rich Lane)
213 Date: Fri, 02 Jul 2010 22:33:48 -0400
214 Subject: [sup-devel] [PATCH] inline-gpg: call text_to_chunks on the text
215 before/after the GPG part
216 In-Reply-To: <1277221190-sup-946@midna.zekjur.net>
217 References: <1277221190-sup-946@midna.zekjur.net>
218 Message-ID: <1278124417-sup-4659@zyrg.net>
219
220 Applied to master.
221
222 From sascha-ml-email-sup-devel@silbe.org Sat Jul 3 06:35:50 2010
223 From: sascha-ml-email-sup-devel@silbe.org (Sascha Silbe)
224 Date: Sat, 03 Jul 2010 10:35:50 +0000
225 Subject: [sup-devel] [PATCH] parse_header: don't use empty or invalid
226 Message-ID header
227 In-Reply-To: <1278124230-sup-174@zyrg.net>
228 References: <1277992093-10600-1-git-send-email-sascha-pgp@silbe.org>
229 <1278124230-sup-174@zyrg.net>
230 Message-ID: <1278153268-sup-6159@twin.sascha.silbe.org>
231
232 [several patches from this and other threads]
233 > Applied to master.
234 Thanks!
235
236 Sascha
237
238 --
239 http://sascha.silbe.org/
240 http://www.infra-silbe.de/
241 -------------- next part --------------
242 A non-text attachment was scrubbed...
243 Name: signature.asc
244 Type: application/pgp-signature
245 Size: 490 bytes
246 Desc: not available
247 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100703/14dfde2c/attachment.bin>
248
249 From sascha-ml-email-sup-devel@silbe.org Sat Jul 3 06:39:21 2010
250 From: sascha-ml-email-sup-devel@silbe.org (Sascha Silbe)
251 Date: Sat, 03 Jul 2010 10:39:21 +0000
252 Subject: [sup-devel] [PATCH] parse_header: don't use empty or invalid
253 Message-ID header
254 In-Reply-To: <1278015019-sup-7327@pinkfloyd.chass.utoronto.ca>
255 References: <1277992093-10600-1-git-send-email-sascha-pgp@silbe.org>
256 <1277994760-sup-4189@pinkfloyd.chass.utoronto.ca>
257 <1278012648-sup-257@twin.sascha.silbe.org>
258 <1278015019-sup-7327@pinkfloyd.chass.utoronto.ca>
259 Message-ID: <1278153353-sup-1102@twin.sascha.silbe.org>
260
261 Excerpts from Ben Walton's message of Thu Jul 01 20:11:08 +0000 2010:
262
263 > I'd resubmit with the lines removed. It keeps the history cleaner.
264 Since the patch has already been merged in its current form, I won't post
265 a new one. It's no change in program behaviour or output and the comments
266 are not incorrect. Maybe they even help someone while debugging one day. ;)
267
268 Sascha
269
270 --
271 http://sascha.silbe.org/
272 http://www.infra-silbe.de/
273 -------------- next part --------------
274 A non-text attachment was scrubbed...
275 Name: signature.asc
276 Type: application/pgp-signature
277 Size: 490 bytes
278 Desc: not available
279 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100703/3531f528/attachment.bin>
280
281 From sascha-pgp@silbe.org Sat Jul 3 07:06:22 2010
282 From: sascha-pgp@silbe.org (Sascha Silbe)
283 Date: Sat, 3 Jul 2010 13:06:22 +0200
284 Subject: [sup-devel] [PATCH] don't leak fds for mbox sources
285 Message-ID: <1278155182-8545-1-git-send-email-sascha-pgp@silbe.org>
286
287 Only open the mbox when it's actually used and close it again once we're
288 finished iterating over it.
289
290 Adds a method go_idle to Source to inform the source we're unlikely to
291 use it in the near future so it can do internal clean-up as appropriate.
292
293 Signed-off-by: Sascha Silbe <sascha-pgp at silbe.org>
294 ---
295 lib/sup/mbox.rb | 28 ++++++++++++++++++++++++++--
296 lib/sup/poll.rb | 7 ++++++-
297 lib/sup/source.rb | 6 ++++++
298 3 files changed, 38 insertions(+), 3 deletions(-)
299
300
301 This is my first non-trivial patch to a Ruby project. Please mention
302 even minor style mistakes.
303
304
305 diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
306 index 3f7ae3e..2bf32ea 100644
307 --- a/lib/sup/mbox.rb
308 +++ b/lib/sup/mbox.rb
309 @@ -23,7 +23,7 @@ class MBox < Source
310 raise ArgumentError, "not an mbox uri" unless uri.scheme == "mbox"
311 raise ArgumentError, "mbox URI ('#{uri}') cannot have a host: #{uri.host}" if uri.host
312 raise ArgumentError, "mbox URI must have a path component" unless uri.path
313 - @f = File.open uri.path, 'rb'
314 + @f = nil
315 @path = uri.path
316 else
317 @f = uri_or_fp
318 @@ -53,12 +53,31 @@ class MBox < Source
319 end
320 end
321
322 + def ensure_open
323 + @f = File.open @path, 'rb' if @f.nil?
324 + end
325 + private :ensure_open
326 +
327 + def go_idle
328 + @mutex.synchronize do
329 + return if @f.nil? || @path.nil?
330 + @f.close
331 + @f = nil
332 + end
333 + end
334 +
335 def start_offset; 0; end
336 - def end_offset; File.size @f; end
337 + def end_offset
338 + @mutex.synchronize do
339 + ensure_open
340 + File.size @f
341 + end
342 + end
343
344 def load_header offset
345 header = nil
346 @mutex.synchronize do
347 + ensure_open
348 @f.seek offset
349 l = @f.gets
350 unless MBox::is_break_line? l
351 @@ -71,6 +90,7 @@ class MBox < Source
352
353 def load_message offset
354 @mutex.synchronize do
355 + ensure_open
356 @f.seek offset
357 begin
358 ## don't use RMail::Mailbox::MBoxReader because it doesn't properly ignore
359 @@ -88,6 +108,7 @@ class MBox < Source
360 ## scan forward until we're at the valid start of a message
361 def correct_offset!
362 @mutex.synchronize do
363 + ensure_open
364 @f.seek cur_offset
365 string = ""
366 until @f.eof? || MBox::is_break_line?(l = @f.gets)
367 @@ -100,6 +121,7 @@ class MBox < Source
368 def raw_header offset
369 ret = ""
370 @mutex.synchronize do
371 + ensure_open
372 @f.seek offset
373 until @f.eof? || (l = @f.gets) =~ /^\r*$/
374 ret << l
375 @@ -131,6 +153,7 @@ class MBox < Source
376 ## sup-sync-back has to do it.
377 def each_raw_message_line offset
378 @mutex.synchronize do
379 + ensure_open
380 @f.seek offset
381 yield @f.gets
382 until @f.eof? || MBox::is_break_line?(l = @f.gets)
383 @@ -145,6 +168,7 @@ class MBox < Source
384
385 begin
386 @mutex.synchronize do
387 + ensure_open
388 @f.seek cur_offset
389
390 ## cur_offset could be at one of two places here:
391 diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
392 index 49e456b..3ce867c 100644
393 --- a/lib/sup/poll.rb
394 +++ b/lib/sup/poll.rb
395 @@ -159,7 +159,10 @@ EOS
396 ## this is the primary mechanism for iterating over messages from a source.
397 def each_message_from source, opts={}
398 begin
399 - return if source.done? || source.has_errors?
400 + if source.done? || source.has_errors?
401 + source.go_idle
402 + return
403 + end
404
405 source.each do |offset, source_labels|
406 if source.has_errors?
407 @@ -175,6 +178,8 @@ EOS
408 HookManager.run "before-add-message", :message => m
409 yield m
410 end
411 +
412 + source.go_idle
413 rescue SourceError => e
414 warn "problem getting messages from #{source}: #{e.message}"
415 Redwood::report_broken_sources :force_to_top => true
416 diff --git a/lib/sup/source.rb b/lib/sup/source.rb
417 index 2f2e5df..13dc443 100644
418 --- a/lib/sup/source.rb
419 +++ b/lib/sup/source.rb
420 @@ -40,6 +40,7 @@ class Source
421 ## - raw_header offset
422 ## - raw_message offset
423 ## - check (optional)
424 + ## - go_idle (optional)
425 ## - next (or each, if you prefer): should return a message and an
426 ## array of labels.
427 ##
428 @@ -94,6 +95,11 @@ class Source
429 ## to proactively notify the user of any source problems.
430 def check; end
431
432 + ## release resources that are easy to reacquire. it is called
433 + ## after processing a source (e.g. polling) to prevent resource
434 + ## leaks (esp. file descriptors).
435 + def go_idle; end
436 +
437 ## yields successive offsets and labels, starting at #cur_offset.
438 ##
439 ## when implementing a source, you can overwrite either #each or #next. the
440 --
441 1.7.1
442
443
444 From damien.leone@fensalir.fr Sat Jul 3 13:22:42 2010
445 From: damien.leone@fensalir.fr (Damien Leone)
446 Date: Sat, 03 Jul 2010 19:22:42 +0200
447 Subject: [sup-devel] [PATCHES] reply-mode,
448 signatures and account selector
449 In-Reply-To: <1276089233-sup-510@mailer>
450 References: <1276087951-sup-7816@mailer> <1276089233-sup-510@mailer>
451 Message-ID: <1278177699-sup-5324@mailer>
452
453 Any reviewer for these patches?
454
455 Thanks.
456
457 Excerpts from Damien Leone's message of mer. juin 09 15:15:11 +0200 2010:
458 > I noticed an error in the third patch.
459 > Please consider the one attached to *this* email.
460 >
461 > Regards,
462
463 --
464 Damien Leone <damien.leone at fensalir.fr>
465
466 Web: http://dleone.fensalir.fr/
467 GPG: 0x82EB4DDF
468
469 From sascha-pgp@silbe.org Thu Jul 8 08:28:07 2010
470 From: sascha-pgp@silbe.org (Sascha Silbe)
471 Date: Thu, 8 Jul 2010 12:28:07 +0000
472 Subject: [sup-devel] [PATCH] mbox: fix date format
473 Message-ID: <1278592087-614-1-git-send-email-sascha-pgp@silbe.org>
474
475 The date format used in all (known/common) variations is that of Unix/POSIX
476 asctime(), not the RFC 822 / RFC 2822 Date: header format.
477
478 Using an incorrect date format causes at least mutt, mb2md and Python
479 UnixMailbox (but not PortableUnixMailbox) to either reject the mailbox or show
480 it as empty.
481
482 References:
483 http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/mail-mbox-formats.html
484 http://www.qmail.org/man/man5/mbox.html
485
486 Signed-off-by: Sascha Silbe <sascha-pgp at silbe.org>
487 ---
488 lib/sup/mbox.rb | 2 +-
489 1 files changed, 1 insertions(+), 1 deletions(-)
490
491 diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
492 index 2bf32ea..452519d 100644
493 --- a/lib/sup/mbox.rb
494 +++ b/lib/sup/mbox.rb
495 @@ -140,7 +140,7 @@ class MBox < Source
496 need_blank = File.exists?(@filename) && !File.zero?(@filename)
497 File.open(@filename, "ab") do |f|
498 f.puts if need_blank
499 - f.puts "From #{from_email} #{date.rfc2822}"
500 + f.puts "From #{from_email} #{date.asctime}"
501 yield f
502 end
503 end
504 --
505 1.7.1
506
507
508 From sascha-pgp@silbe.org Thu Jul 8 08:28:31 2010
509 From: sascha-pgp@silbe.org (Sascha Silbe)
510 Date: Thu, 8 Jul 2010 12:28:31 +0000
511 Subject: [sup-devel] [PATCH] fix crash in sup-sync if the default sent
512 source is used
513 Message-ID: <1278592111-654-1-git-send-email-sascha-pgp@silbe.org>
514
515 This fixes a crash in sup-sync when syncing a folder that contains a copy of a
516 "sent" message and no "sent" folder has been explicitly configured in the
517 config file (so it hasn't been added to sources.yaml).
518
519 Signed-off-by: Sascha Silbe <sascha-pgp at silbe.org>
520 ---
521 bin/sup-sync | 6 ++++++
522 1 files changed, 6 insertions(+), 0 deletions(-)
523
524 diff --git a/bin/sup-sync b/bin/sup-sync
525 index 6eb8f80..7fb2a87 100755
526 --- a/bin/sup-sync
527 +++ b/bin/sup-sync
528 @@ -116,6 +116,12 @@ index.lock_interactively or exit
529 begin
530 index.load
531
532 + if(s = Redwood::SourceManager.source_for Redwood::SentManager.source_uri)
533 + Redwood::SentManager.source = s
534 + else
535 + Redwood::SourceManager.add_source Redwood::SentManager.default_source
536 + end
537 +
538 sources = if opts[:all_sources]
539 Redwood::SourceManager.sources
540 elsif ARGV.empty?
541 --
542 1.7.1
543
544
545 From sascha-pgp@silbe.org Thu Jul 8 11:26:37 2010
546 From: sascha-pgp@silbe.org (Sascha Silbe)
547 Date: Thu, 8 Jul 2010 15:26:37 +0000
548 Subject: [sup-devel] [PATCH] fix crash during poll if Maildir has been
549 emptied
550 Message-ID: <1278602797-2553-1-git-send-email-sascha-pgp@silbe.org>
551
552 We need to do the rescan in start_offset instead of end_offset so that
553 end_offset won't be called if the Maildir is empty after the rescan.
554
555 Fixes this crash:
556
557 NoMethodError from thread: user-invoked poll
558 undefined method `+' for nil:NilClass
559 /home/sascha.silbe/src/sup/lib/sup/maildir.rb:171:in `end_offset'
560 /home/sascha.silbe/src/sup/lib/sup/source.rb:90:in `done?'
561 [...]
562
563 Signed-off-by: Sascha Silbe <sascha-pgp at silbe.org>
564 ---
565 lib/sup/maildir.rb | 4 ++--
566 1 files changed, 2 insertions(+), 2 deletions(-)
567
568 diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb
569 index ef3b318..0b2fd5e 100644
570 --- a/lib/sup/maildir.rb
571 +++ b/lib/sup/maildir.rb
572 @@ -162,12 +162,12 @@ class Maildir < Source
573 end
574
575 def start_offset
576 - scan_mailbox
577 + scan_mailbox :rescan => true
578 @ids.first
579 end
580
581 def end_offset
582 - scan_mailbox :rescan => true
583 + scan_mailbox
584 @ids.last + 1
585 end
586
587 --
588 1.7.1
589
590
591 From sascha-pgp@silbe.org Thu Jul 8 13:15:22 2010
592 From: sascha-pgp@silbe.org (Sascha Silbe)
593 Date: Thu, 8 Jul 2010 17:15:22 +0000
594 Subject: [sup-devel] [PATCH] don't leak fds for mbox sources
595 Message-ID: <1278609322-1401-1-git-send-email-sascha-pgp@silbe.org>
596
597 Only open the mbox when it's actually used and close it again once we're
598 finished iterating over it.
599
600 Adds a method go_idle to Source to inform the source we're unlikely to
601 use it in the near future so it can do internal clean-up as appropriate.
602
603 Signed-off-by: Sascha Silbe <sascha-pgp at silbe.org>
604 ---
605 lib/sup/mbox.rb | 28 ++++++++++++++++++++++++++--
606 lib/sup/poll.rb | 7 ++++++-
607 lib/sup/source.rb | 6 ++++++
608 3 files changed, 38 insertions(+), 3 deletions(-)
609
610 This patch allows configuring more than RLIMIT_NOFILE mbox sources. I have
611 been testing it for several days.
612
613 Please do point out even minor style mistakes.
614
615
616 diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
617 index 3f7ae3e..2bf32ea 100644
618 --- a/lib/sup/mbox.rb
619 +++ b/lib/sup/mbox.rb
620 @@ -23,7 +23,7 @@ class MBox < Source
621 raise ArgumentError, "not an mbox uri" unless uri.scheme == "mbox"
622 raise ArgumentError, "mbox URI ('#{uri}') cannot have a host: #{uri.host}" if uri.host
623 raise ArgumentError, "mbox URI must have a path component" unless uri.path
624 - @f = File.open uri.path, 'rb'
625 + @f = nil
626 @path = uri.path
627 else
628 @f = uri_or_fp
629 @@ -53,12 +53,31 @@ class MBox < Source
630 end
631 end
632
633 + def ensure_open
634 + @f = File.open @path, 'rb' if @f.nil?
635 + end
636 + private :ensure_open
637 +
638 + def go_idle
639 + @mutex.synchronize do
640 + return if @f.nil? || @path.nil?
641 + @f.close
642 + @f = nil
643 + end
644 + end
645 +
646 def start_offset; 0; end
647 - def end_offset; File.size @f; end
648 + def end_offset
649 + @mutex.synchronize do
650 + ensure_open
651 + File.size @f
652 + end
653 + end
654
655 def load_header offset
656 header = nil
657 @mutex.synchronize do
658 + ensure_open
659 @f.seek offset
660 l = @f.gets
661 unless MBox::is_break_line? l
662 @@ -71,6 +90,7 @@ class MBox < Source
663
664 def load_message offset
665 @mutex.synchronize do
666 + ensure_open
667 @f.seek offset
668 begin
669 ## don't use RMail::Mailbox::MBoxReader because it doesn't properly ignore
670 @@ -88,6 +108,7 @@ class MBox < Source
671 ## scan forward until we're at the valid start of a message
672 def correct_offset!
673 @mutex.synchronize do
674 + ensure_open
675 @f.seek cur_offset
676 string = ""
677 until @f.eof? || MBox::is_break_line?(l = @f.gets)
678 @@ -100,6 +121,7 @@ class MBox < Source
679 def raw_header offset
680 ret = ""
681 @mutex.synchronize do
682 + ensure_open
683 @f.seek offset
684 until @f.eof? || (l = @f.gets) =~ /^\r*$/
685 ret << l
686 @@ -131,6 +153,7 @@ class MBox < Source
687 ## sup-sync-back has to do it.
688 def each_raw_message_line offset
689 @mutex.synchronize do
690 + ensure_open
691 @f.seek offset
692 yield @f.gets
693 until @f.eof? || MBox::is_break_line?(l = @f.gets)
694 @@ -145,6 +168,7 @@ class MBox < Source
695
696 begin
697 @mutex.synchronize do
698 + ensure_open
699 @f.seek cur_offset
700
701 ## cur_offset could be at one of two places here:
702 diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
703 index 49e456b..3ce867c 100644
704 --- a/lib/sup/poll.rb
705 +++ b/lib/sup/poll.rb
706 @@ -159,7 +159,10 @@ EOS
707 ## this is the primary mechanism for iterating over messages from a source.
708 def each_message_from source, opts={}
709 begin
710 - return if source.done? || source.has_errors?
711 + if source.done? || source.has_errors?
712 + source.go_idle
713 + return
714 + end
715
716 source.each do |offset, source_labels|
717 if source.has_errors?
718 @@ -175,6 +178,8 @@ EOS
719 HookManager.run "before-add-message", :message => m
720 yield m
721 end
722 +
723 + source.go_idle
724 rescue SourceError => e
725 warn "problem getting messages from #{source}: #{e.message}"
726 Redwood::report_broken_sources :force_to_top => true
727 diff --git a/lib/sup/source.rb b/lib/sup/source.rb
728 index 2f2e5df..13dc443 100644
729 --- a/lib/sup/source.rb
730 +++ b/lib/sup/source.rb
731 @@ -40,6 +40,7 @@ class Source
732 ## - raw_header offset
733 ## - raw_message offset
734 ## - check (optional)
735 + ## - go_idle (optional)
736 ## - next (or each, if you prefer): should return a message and an
737 ## array of labels.
738 ##
739 @@ -94,6 +95,11 @@ class Source
740 ## to proactively notify the user of any source problems.
741 def check; end
742
743 + ## release resources that are easy to reacquire. it is called
744 + ## after processing a source (e.g. polling) to prevent resource
745 + ## leaks (esp. file descriptors).
746 + def go_idle; end
747 +
748 ## yields successive offsets and labels, starting at #cur_offset.
749 ##
750 ## when implementing a source, you can overwrite either #each or #next. the
751 --
752 1.7.1
753
754
755 From damien.leone@fensalir.fr Fri Jul 9 12:44:01 2010
756 From: damien.leone@fensalir.fr (Damien Leone)
757 Date: Fri, 09 Jul 2010 18:44:01 +0200
758 Subject: [sup-devel] Adding backward synchronization for Maildir sources
759 Message-ID: <1278693172-sup-6247@mailer>
760
761 Sup guys,
762
763 I have been working on backward synchronization for Maildir sources
764 last week and I need your help to test and review the code.
765
766 I pushed my commits (based on the 'next' branch) to my repo which you
767 can find here [0] for the web interface and here [1] for the git
768 address.
769
770 The following is related to Maildir sources ONLY.
771
772 So what does work and what does not (if you don't want to read this,
773 scroll to the quick howto below):
774
775 - Sup will now stay synchronized with your remote sources by detecting
776 if a message has been remotely updated (ie: you change a flag from
777 another client), these updates will be applied to your local index and
778 your thread-view-mode buffers should be properly refreshed;
779
780 - When a message is remotely deleted, it should now disappear from
781 your index;
782
783 - There is a new configuration option called "sync_back_to_maildir"
784 which is false by default. When true, this option updates your actual
785 Maildir files when you change a label, this is done in real time
786 before being saved to xapian. So for instance if you use offlineimap
787 the changes should be synched back to your IMAP server by the next
788 poll in Sup (assuming that your before-poll hook runs offlineimap);
789
790 - I wrote a "sup-sync-back-maildir" script that will synchronize all
791 messages from your sources at once. This should be executed the first
792 time BEFORE any polling, otherwise your IMAP server will be synched to
793 your Sup index and if you did not used another client to mark your
794 emails as read etc. (like me) and to update your IMAP server then you
795 will lose all what you did in Sup (labels, etc.);
796
797 - I added two new hidden labels in Sup: 'replied' and 'forwarded',
798 they are automatically added when replying, forwarding or bouncing a
799 message, this is to bring a better Maildir support to Sup, this should
800 be invisible for users;
801
802 - However you will probably lose all your remote 'replied' and
803 'forwarded' flags after your first backward synchronization to Maildir
804 since Sup dropped these labels when it added your messages to xapian.
805
806 - Moving a message from a Maildir source to another is not (yet?)
807 supported.
808
809 So, you should now be able to use multiple clients to handle your
810 emails, for instance I can use gmail to mark messages as starred or
811 so, it will be reflected in Sup. In the same way, if I mark a message
812 as read in Sup it will appear as read in the gmail web interface.
813
814 I tested this code with my main account (2 GB and like 15 Maildir
815 sources) it works fine so far.
816
817 Be warned that it is highly experimental, but if you use offlineimap
818 it has a realdelete option so you *should* not lose any email, in the
819 worst case it might mess your flags/labels up.
820
821 I tested it only with offlineimap working with a gmail account.
822
823 Quick howto:
824
825 1. Close sup
826 2. Backup your emails and your xapian index or use another Sup session
827 3. Clone the branch [1]
828 4. IMPORTANT: run "bin/sup-sync-back-maildir" to synchronize the
829 Maildirs you wish, check the help
830 5. Add ":sync_back_to_maildir: true" to your config.yaml
831 6. Run and use sup
832
833 Please test it and make reviews! :)
834
835 NOTE: if you want this to work, get sure that you are not calling
836 offlineimap with the '-q' option (as suggested in the wiki) otherwise
837 it will ignore the flag updates on IMAP server, so check your
838 before-poll hook.
839
840 [0] http://git.fensalir.fr/?p=dleone/sup.git
841 [1] $ git clone git://fensalir.fr/dleone/sup.git -b maildir-sync
842
843 --
844 Damien Leone <damien.leone at fensalir.fr>
845
846 Web: http://dleone.fensalir.fr/
847 GPG: 0x82EB4DDF
848 -------------- next part --------------
849 A non-text attachment was scrubbed...
850 Name: signature.asc
851 Type: application/pgp-signature
852 Size: 198 bytes
853 Desc: not available
854 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100709/775ef421/attachment.bin>
855
856 From ezyang@MIT.EDU Fri Jul 9 12:56:31 2010
857 From: ezyang@MIT.EDU (Edward Z. Yang)
858 Date: Fri, 09 Jul 2010 12:56:31 -0400
859 Subject: [sup-devel] Adding backward synchronization for Maildir sources
860 In-Reply-To: <1278693172-sup-6247@mailer>
861 References: <1278693172-sup-6247@mailer>
862 Message-ID: <1278694430-sup-914@ezyang>
863
864 Hey Damien,
865
866 This is great! A few quick questions for you:
867
868 1. Suppose we decide to test your branch, and run into some show-stopper
869 bugs. What?s the procedure for backing out changes?
870
871 2. What precisely are the semantics for handling Sup labels?
872
873 Thanks,
874 Edward
875
876 Excerpts from Damien Leone's message of Fri Jul 09 12:44:01 -0400 2010:
877 > Sup guys,
878 >
879 > I have been working on backward synchronization for Maildir sources
880 > last week and I need your help to test and review the code.
881 >
882 > I pushed my commits (based on the 'next' branch) to my repo which you
883 > can find here [0] for the web interface and here [1] for the git
884 > address.
885 >
886 > The following is related to Maildir sources ONLY.
887 >
888 > So what does work and what does not (if you don't want to read this,
889 > scroll to the quick howto below):
890 >
891 > - Sup will now stay synchronized with your remote sources by detecting
892 > if a message has been remotely updated (ie: you change a flag from
893 > another client), these updates will be applied to your local index and
894 > your thread-view-mode buffers should be properly refreshed;
895 >
896 > - When a message is remotely deleted, it should now disappear from
897 > your index;
898 >
899 > - There is a new configuration option called "sync_back_to_maildir"
900 > which is false by default. When true, this option updates your actual
901 > Maildir files when you change a label, this is done in real time
902 > before being saved to xapian. So for instance if you use offlineimap
903 > the changes should be synched back to your IMAP server by the next
904 > poll in Sup (assuming that your before-poll hook runs offlineimap);
905 >
906 > - I wrote a "sup-sync-back-maildir" script that will synchronize all
907 > messages from your sources at once. This should be executed the first
908 > time BEFORE any polling, otherwise your IMAP server will be synched to
909 > your Sup index and if you did not used another client to mark your
910 > emails as read etc. (like me) and to update your IMAP server then you
911 > will lose all what you did in Sup (labels, etc.);
912 >
913 > - I added two new hidden labels in Sup: 'replied' and 'forwarded',
914 > they are automatically added when replying, forwarding or bouncing a
915 > message, this is to bring a better Maildir support to Sup, this should
916 > be invisible for users;
917 >
918 > - However you will probably lose all your remote 'replied' and
919 > 'forwarded' flags after your first backward synchronization to Maildir
920 > since Sup dropped these labels when it added your messages to xapian.
921 >
922 > - Moving a message from a Maildir source to another is not (yet?)
923 > supported.
924 >
925 > So, you should now be able to use multiple clients to handle your
926 > emails, for instance I can use gmail to mark messages as starred or
927 > so, it will be reflected in Sup. In the same way, if I mark a message
928 > as read in Sup it will appear as read in the gmail web interface.
929 >
930 > I tested this code with my main account (2 GB and like 15 Maildir
931 > sources) it works fine so far.
932 >
933 > Be warned that it is highly experimental, but if you use offlineimap
934 > it has a realdelete option so you *should* not lose any email, in the
935 > worst case it might mess your flags/labels up.
936 >
937 > I tested it only with offlineimap working with a gmail account.
938 >
939 > Quick howto:
940 >
941 > 1. Close sup
942 > 2. Backup your emails and your xapian index or use another Sup session
943 > 3. Clone the branch [1]
944 > 4. IMPORTANT: run "bin/sup-sync-back-maildir" to synchronize the
945 > Maildirs you wish, check the help
946 > 5. Add ":sync_back_to_maildir: true" to your config.yaml
947 > 6. Run and use sup
948 >
949 > Please test it and make reviews! :)
950 >
951 > NOTE: if you want this to work, get sure that you are not calling
952 > offlineimap with the '-q' option (as suggested in the wiki) otherwise
953 > it will ignore the flag updates on IMAP server, so check your
954 > before-poll hook.
955 >
956 > [0] http://git.fensalir.fr/?p=dleone/sup.git
957 > [1] $ git clone git://fensalir.fr/dleone/sup.git -b maildir-sync
958 >
959
960 From damien.leone@fensalir.fr Fri Jul 9 13:14:58 2010
961 From: damien.leone@fensalir.fr (Damien Leone)
962 Date: Fri, 09 Jul 2010 19:14:58 +0200
963 Subject: [sup-devel] Adding backward synchronization for Maildir sources
964 In-Reply-To: <1278694430-sup-914@ezyang>
965 References: <1278693172-sup-6247@mailer> <1278694430-sup-914@ezyang>
966 Message-ID: <1278695023-sup-8869@mailer>
967
968 Hello Edward,
969
970 > 1. Suppose we decide to test your branch, and run into some show-stopper
971 > bugs. What?s the procedure for backing out changes?
972
973 You should backup your Maildir directories and your xapian index, this
974 is what I did and if something goes wrong I can still restore my
975 backups and run offlineimap to resynch everything as it was before on
976 the IMAP server.
977
978 But for my initial tests I used a test Maildir containing nothing
979 important so maybe this is what you should do. ;)
980
981 > 2. What precisely are the semantics for handling Sup labels?
982
983 I followed the Maildir documentation [0]. When synching a message, Sup
984 builds the flags string and relink the file to the disk, moving it
985 from new/ to cur/ or vice versa if needed.
986
987 Related labels are: unread, replied, forwarded, deleted, draft (but it
988 won't work for now because draft messages in Sup are handled
989 separately), flagged (aka starred).
990
991 Every other labels are ignored because not supported.
992
993 [0] http://cr.yp.to/proto/maildir.html
994
995 --
996 Damien Leone <damien.leone at fensalir.fr>
997
998 Web: http://dleone.fensalir.fr/
999 GPG: 0x82EB4DDF
1000 -------------- next part --------------
1001 A non-text attachment was scrubbed...
1002 Name: signature.asc
1003 Type: application/pgp-signature
1004 Size: 198 bytes
1005 Desc: not available
1006 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100709/eef91e70/attachment.bin>
1007
1008 From ezyang@MIT.EDU Fri Jul 9 15:46:08 2010
1009 From: ezyang@MIT.EDU (Edward Z. Yang)
1010 Date: Fri, 09 Jul 2010 15:46:08 -0400
1011 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1012 In-Reply-To: <1278695023-sup-8869@mailer>
1013 References: <1278693172-sup-6247@mailer> <1278694430-sup-914@ezyang>
1014 <1278695023-sup-8869@mailer>
1015 Message-ID: <1278704722-sup-2256@ezyang>
1016
1017 Excerpts from Damien Leone's message of Fri Jul 09 13:14:58 -0400 2010:
1018 > > 1. Suppose we decide to test your branch, and run into some show-stopper
1019 > > bugs. What?s the procedure for backing out changes?
1020 >
1021 > You should backup your Maildir directories and your xapian index, this
1022 > is what I did and if something goes wrong I can still restore my
1023 > backups and run offlineimap to resynch everything as it was before on
1024 > the IMAP server.
1025 >
1026 > But for my initial tests I used a test Maildir containing nothing
1027 > important so maybe this is what you should do. ;)
1028
1029 I doubt a test Maildir will give you the sort of test pressure that you?re
1030 looking for. Go go real datasets.
1031
1032 > > 2. What precisely are the semantics for handling Sup labels?
1033 >
1034 > I followed the Maildir documentation [0]. When synching a message, Sup
1035 > builds the flags string and relink the file to the disk, moving it
1036 > from new/ to cur/ or vice versa if needed.
1037 >
1038 > Related labels are: unread, replied, forwarded, deleted, draft (but it
1039 > won't work for now because draft messages in Sup are handled
1040 > separately), flagged (aka starred).
1041
1042 Great, thanks! I?ll give it a spin this weekend.
1043
1044 Edward
1045
1046 From rlane@club.cc.cmu.edu Mon Jul 12 22:10:51 2010
1047 From: rlane@club.cc.cmu.edu (Rich Lane)
1048 Date: Mon, 12 Jul 2010 22:10:51 -0400
1049 Subject: [sup-devel] [PATCH] mbox: fix date format
1050 In-Reply-To: <1278592087-614-1-git-send-email-sascha-pgp@silbe.org>
1051 References: <1278592087-614-1-git-send-email-sascha-pgp@silbe.org>
1052 Message-ID: <1278987038-sup-162@zyrg.net>
1053
1054 Applied to master.
1055
1056 From rlane@club.cc.cmu.edu Mon Jul 12 22:13:26 2010
1057 From: rlane@club.cc.cmu.edu (Rich Lane)
1058 Date: Mon, 12 Jul 2010 22:13:26 -0400
1059 Subject: [sup-devel] [PATCH] fix crash in sup-sync if the default sent
1060 source is used
1061 In-Reply-To: <1278592111-654-1-git-send-email-sascha-pgp@silbe.org>
1062 References: <1278592111-654-1-git-send-email-sascha-pgp@silbe.org>
1063 Message-ID: <1278987191-sup-868@zyrg.net>
1064
1065 Applied to master.
1066
1067 From rlane@club.cc.cmu.edu Mon Jul 12 22:19:28 2010
1068 From: rlane@club.cc.cmu.edu (Rich Lane)
1069 Date: Mon, 12 Jul 2010 22:19:28 -0400
1070 Subject: [sup-devel] [PATCH] fix crash during poll if Maildir has been
1071 emptied
1072 In-Reply-To: <1278602797-2553-1-git-send-email-sascha-pgp@silbe.org>
1073 References: <1278602797-2553-1-git-send-email-sascha-pgp@silbe.org>
1074 Message-ID: <1278987290-sup-1833@zyrg.net>
1075
1076 I'm going to be merging the source rewrite into master soon, so
1077 this patch won't apply. I'll make sure empty maildirs work.
1078
1079 From rlane@club.cc.cmu.edu Mon Jul 12 22:23:46 2010
1080 From: rlane@club.cc.cmu.edu (Rich Lane)
1081 Date: Mon, 12 Jul 2010 22:23:46 -0400
1082 Subject: [sup-devel] [PATCH] don't leak fds for mbox sources
1083 In-Reply-To: <1278609322-1401-1-git-send-email-sascha-pgp@silbe.org>
1084 References: <1278609322-1401-1-git-send-email-sascha-pgp@silbe.org>
1085 Message-ID: <1278987576-sup-9788@zyrg.net>
1086
1087 This patch also won't apply once the source rewrite is merged. It's
1088 definitely a good idea though, so I'll (eventually) adapt this patch to
1089 the new codebase. Or feel free to rebase against next.
1090
1091 The code itself looks good, I have no style nits with it.
1092
1093 From sgoldman@teza.com Fri Jul 9 16:39:37 2010
1094 From: sgoldman@teza.com (Steve Goldman)
1095 Date: Fri, 09 Jul 2010 16:39:37 -0400
1096 Subject: [sup-devel] Character encoding crash
1097 Message-ID: <1278707910-sup-3979@sodium.teza.com>
1098
1099
1100 I would send the characters from the message I was replying to, but
1101 then sup would crash.
1102
1103 Running from master, latest commit June 9th.
1104
1105 Thanks.
1106
1107
1108 --- ArgumentError from thread: main
1109 invalid byte sequence in US-ASCII
1110 /teza/home-h/sgoldman/sup-src/mainline/lib/sup/modes/edit-message-mode.rb:369:in `build_message'
1111 /teza/home-h/sgoldman/sup-src/mainline/lib/sup/modes/edit-message-mode.rb:343:in `send_message'
1112 /teza/home-h/sgoldman/sup-src/mainline/lib/sup/mode.rb:59:in `handle_input'
1113 /teza/home-h/sgoldman/sup-src/mainline/lib/sup/buffer.rb:277:in `handle_input'
1114 bin/sup:260:in `<module:Redwood>'
1115 bin/sup:69:in `<main>'
1116
1117 From viroteck@viroteck.net Sat Jul 10 14:53:20 2010
1118 From: viroteck@viroteck.net (Robin Burchell)
1119 Date: Sat, 10 Jul 2010 19:53:20 +0100
1120 Subject: [sup-devel] [PATCH] Fetch the account found from the to/cc info,
1121 don't just use it as-is.
1122 Message-ID: <1278788000-23738-1-git-send-email-robin.burchell@collabora.co.uk>
1123
1124 This prevents people's To: info screwing up my replies to them which is
1125 immensely irritating to me.
1126 ---
1127 lib/sup/modes/reply-mode.rb | 2 +-
1128 1 files changed, 1 insertions(+), 1 deletions(-)
1129
1130 diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb
1131 index bbac922..294bcfa 100644
1132 --- a/lib/sup/modes/reply-mode.rb
1133 +++ b/lib/sup/modes/reply-mode.rb
1134 @@ -76,7 +76,7 @@ EOS
1135 ## otherwise, try and find an account somewhere in the list of to's
1136 ## and cc's.
1137 elsif(b = (@m.to + @m.cc).find { |p| AccountManager.is_account? p })
1138 - b
1139 + AccountManager.account_for(b.email)
1140 ## if all else fails, use the default
1141 else
1142 AccountManager.default_account
1143 --
1144 1.7.0.4
1145
1146
1147 From rlane@club.cc.cmu.edu Wed Jul 14 23:34:58 2010
1148 From: rlane@club.cc.cmu.edu (Rich Lane)
1149 Date: Wed, 14 Jul 2010 23:34:58 -0400
1150 Subject: [sup-devel] maildir branch merged to master
1151 Message-ID: <1279164331-sup-2007@zyrg.net>
1152
1153 The test suite isn't done yet, but I've been running this code for a
1154 while and I think it's stable enough to merge. This will also make
1155 merging the larger patches posted recently easier since next won't be so
1156 far diverged.
1157
1158 From damien.leone@fensalir.fr Sat Jul 17 08:55:56 2010
1159 From: damien.leone@fensalir.fr (Damien Leone)
1160 Date: Sat, 17 Jul 2010 14:55:56 +0200
1161 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1162 In-Reply-To: <1278693172-sup-6247@mailer>
1163 References: <1278693172-sup-6247@mailer>
1164 Message-ID: <1279371142-sup-3470@mailer>
1165
1166 So, any reviewer? I thought backward synchronization was a wanted
1167 feature.
1168
1169 For information I have been testing it with my real account for more
1170 than a week now without noticing any serious issue, I often check my
1171 gmail web interface and everything is synched.
1172
1173 I had once a location trouble after having sent an email but I could
1174 not reproduce and it has been resolved after a sup restart.
1175
1176 --
1177 Damien Leone <damien.leone at fensalir.fr>
1178
1179 Web: http://dleone.fensalir.fr/
1180 GPG: 0x82EB4DDF
1181 -------------- next part --------------
1182 A non-text attachment was scrubbed...
1183 Name: signature.asc
1184 Type: application/pgp-signature
1185 Size: 198 bytes
1186 Desc: not available
1187 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100717/436ae663/attachment.bin>
1188
1189 From bwalton@artsci.utoronto.ca Sat Jul 17 13:05:44 2010
1190 From: bwalton@artsci.utoronto.ca (Ben Walton)
1191 Date: Sat, 17 Jul 2010 13:05:44 -0400
1192 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1193 In-Reply-To: <1279371142-sup-3470@mailer>
1194 References: <1278693172-sup-6247@mailer> <1279371142-sup-3470@mailer>
1195 Message-ID: <1279386307-sup-360@pinkfloyd.chass.utoronto.ca>
1196
1197 Excerpts from Damien Leone's message of Sat Jul 17 08:55:56 -0400 2010:
1198
1199 > So, any reviewer? I thought backward synchronization was a wanted
1200 > feature.
1201
1202 I believe it is (not by me personally as I'm not affected). How does
1203 it play with the recent maildir branch merge from Rich?
1204
1205 Thanks
1206 -Ben
1207 --
1208 Ben Walton
1209 Systems Programmer - CHASS
1210 University of Toronto
1211 C:416.407.5610 | W:416.978.4302
1212
1213
1214 From damien.leone@fensalir.fr Sat Jul 17 13:26:16 2010
1215 From: damien.leone@fensalir.fr (Damien Leone)
1216 Date: Sat, 17 Jul 2010 19:26:16 +0200
1217 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1218 In-Reply-To: <1279386307-sup-360@pinkfloyd.chass.utoronto.ca>
1219 References: <1278693172-sup-6247@mailer> <1279371142-sup-3470@mailer>
1220 <1279386307-sup-360@pinkfloyd.chass.utoronto.ca>
1221 Message-ID: <1279387408-sup-5931@mailer>
1222
1223 Hi Ben,
1224
1225 Excerpts from Ben Walton's message of Sat Jul 17 19:05:44 +0200 2010:
1226 > I believe it is (not by me personally as I'm not affected). How does
1227 > it play with the recent maildir branch merge from Rich?
1228
1229 It should play well since I based my branch on the 'next' branch which
1230 already had the 'maildir' merge.
1231
1232 --
1233 Damien Leone <damien.leone at fensalir.fr>
1234
1235 Web: http://dleone.fensalir.fr/
1236 GPG: 0x82EB4DDF
1237 -------------- next part --------------
1238 A non-text attachment was scrubbed...
1239 Name: signature.asc
1240 Type: application/pgp-signature
1241 Size: 198 bytes
1242 Desc: not available
1243 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100717/130153bb/attachment.bin>
1244
1245 From tero@tilus.net Sun Jul 18 07:19:55 2010
1246 From: tero@tilus.net (Tero Tilus)
1247 Date: Sun, 18 Jul 2010 14:19:55 +0300
1248 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1249 In-Reply-To: <1279371142-sup-3470@mailer>
1250 References: <1278693172-sup-6247@mailer> <1279371142-sup-3470@mailer>
1251 Message-ID: <1279451667-sup-3500@tilus.net>
1252
1253 Damien Leone, 2010-07-17 15:55:
1254 > So, any reviewer?
1255
1256 I haven't had the time yet. I definitely will once the temperature
1257 here in Finland drops below 20 degrees Celcius. ;) For now I'm almost
1258 totally off the net and on the beach.
1259
1260 > I thought backward synchronization was a wanted
1261 > feature.
1262
1263 And you were _very_ much right!
1264
1265 > I often check my gmail web interface and everything is synched.
1266
1267 My setup (once I get there) will be mainly sup + occasional mutt (on
1268 maildirs) and evolution (via dovecot).
1269
1270 --
1271 Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
1272
1273 From ezyang@MIT.EDU Sun Jul 18 13:53:39 2010
1274 From: ezyang@MIT.EDU (Edward Z. Yang)
1275 Date: Sun, 18 Jul 2010 13:53:39 -0400
1276 Subject: [sup-devel] [PATCH] Return nothing between if end index is not
1277 found.
1278 Message-ID: <1279475566-sup-7173@ezyang>
1279
1280 This patch fixed Nil error that occurred when I had a GPG signed
1281 mail with a starting marker but no ending marker.
1282
1283 >From 22d12ffe7caa0d11c91876e2c8c7806854d0b3ab Mon Sep 17 00:00:00 2001
1284 From: Edward Z. Yang <ezyang at mit.edu>
1285 Date: Sun, 18 Jul 2010 03:38:52 -0400
1286 Subject: [PATCH] Return nothing between if end index is not found.
1287
1288 Signed-off-by: Edward Z. Yang <ezyang at mit.edu>
1289 ---
1290 lib/sup/util.rb | 1 +
1291 1 files changed, 1 insertions(+), 0 deletions(-)
1292
1293 diff --git a/lib/sup/util.rb b/lib/sup/util.rb
1294 index d19caca..dad479f 100644
1295 --- a/lib/sup/util.rb
1296 +++ b/lib/sup/util.rb
1297 @@ -479,6 +479,7 @@ module Enumerable
1298
1299 ## returns all the entries which are equal to startline up to endline
1300 def between startline, endline
1301 + return [] if not index(endline)
1302 select { |l| true if l == startline .. l == endline }
1303 end
1304 end
1305 --
1306 1.7.0.4
1307
1308 From ezyang@MIT.EDU Sun Jul 18 18:46:33 2010
1309 From: ezyang@MIT.EDU (Edward Z. Yang)
1310 Date: Sun, 18 Jul 2010 18:46:33 -0400
1311 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1312 In-Reply-To: <1278693172-sup-6247@mailer>
1313 References: <1278693172-sup-6247@mailer>
1314 Message-ID: <1279492496-sup-3638@ezyang>
1315
1316 Sup Damien,
1317
1318 I cut over to your branch, plus one patch of my own making.
1319
1320 THE GOOD NEWS
1321
1322 It works! Whereby, messages are marked read in my webmail client and
1323 deleted messages go away.
1324
1325 THE BAD NEWS
1326
1327 It makes Sup very crashy and there's some strange behavior. This is probably
1328 the sixth time I'm composing this message (yeah, haven't learned my
1329 lesson.) In more detail...
1330
1331 * You want the following OfflineImap patch, because otherwise the massive
1332 changes to labels that will surely be induced by backwards syncing will
1333 cause OfflineImap to CRAWL.
1334
1335 diff --git a/offlineimap/folder/LocalStatus.py b/offlineimap/folder/LocalStatus.py
1336 index 157989d..7f4dc5b 100644
1337 --- a/offlineimap/folder/LocalStatus.py
1338 +++ b/offlineimap/folder/LocalStatus.py
1339 @@ -33,7 +33,7 @@ class LocalStatusFolder(BaseFolder):
1340 self.messagelist = None
1341 self.repository = repository
1342 self.savelock = threading.Lock()
1343 - self.doautosave = 1
1344 + self.doautosave = 0
1345 self.accountname = accountname
1346 BaseFolder.__init__(self)
1347
1348 Though, you probably want to undo this patch when you're done. Autosaving
1349 means partial progress is saved.
1350
1351 * Backwards syncing appears to make old deleted mail show up again; I'm not
1352 sure if it's because touching the Maildir causes Sup to pick up on deleted
1353 tags again or something, but I had to go back and delete lots of deleted mail.
1354
1355 * When Sup is deleting messages, it is /extremely/ unsafe to iterate over
1356 a list of all messages in the index and query them for info: the threading means
1357 that any given message might not exist anymore. I had a hook that kept triggering
1358 this bug, and earlier on in the process drawing functions would also frequently
1359 Nil error. This is probably under-tested codepaths in Sup that we should track
1360 down; unfortunately I didn't have the presence of mind to record traces until
1361 later (and the ones I got all look like my hooks fault).
1362
1363 * In a similar vein, while messages are going away, '@' will occasionally return
1364 no messages (pressing again usually fixes it). Messages that are labelled inbox
1365 will show up in 'U', but not in the inbox view without a Sup restart.
1366
1367 I haven't done a code review yet.
1368
1369 Cheers,
1370 Edward
1371
1372 From ezyang@MIT.EDU Sun Jul 18 18:50:39 2010
1373 From: ezyang@MIT.EDU (Edward Z. Yang)
1374 Date: Sun, 18 Jul 2010 18:50:39 -0400
1375 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1376 In-Reply-To: <1278693172-sup-6247@mailer>
1377 References: <1278693172-sup-6247@mailer>
1378 Message-ID: <1279493200-sup-3095@ezyang>
1379
1380 Here are some suggestions...
1381
1382 Excerpts from Damien Leone's message of Fri Jul 09 12:44:01 -0400 2010:
1383 > - I wrote a "sup-sync-back-maildir" script that will synchronize all
1384 > messages from your sources at once. This should be executed the first
1385 > time BEFORE any polling, otherwise your IMAP server will be synched to
1386 > your Sup index and if you did not used another client to mark your
1387 > emails as read etc. (like me) and to update your IMAP server then you
1388 > will lose all what you did in Sup (labels, etc.);
1389
1390 I would recommend having some sort of flag like 'sync-back'd' programatically
1391 generated by sup-sync-back-maildir so that Sup will refuse to start if
1392 you turned on sync-backs without running this command.
1393
1394 > - However you will probably lose all your remote 'replied' and
1395 > 'forwarded' flags after your first backward synchronization to Maildir
1396 > since Sup dropped these labels when it added your messages to xapian.
1397
1398 It seems to me that merging the Maildir flags and the Sup flags would
1399 let you preserve this, but for heavy Sup users this isn't a big deal.
1400
1401 > - Moving a message from a Maildir source to another is not (yet?)
1402 > supported.
1403
1404 I think this will be a pretty killer feature to have, because it means
1405 we can then assign "primary" tags and use those to have sync-backs move
1406 messages between Maildir folders (on the same account, I imagine), which
1407 would translate into a folder-sorted webmail view, which is about the
1408 best you can do without first-class label support in Maildir. I know of
1409 at least one friend who this would be a deal-maker.
1410
1411 Cheers,
1412 Edward
1413
1414 From ezyang@MIT.EDU Sun Jul 18 18:57:31 2010
1415 From: ezyang@MIT.EDU (Edward Z. Yang)
1416 Date: Sun, 18 Jul 2010 18:57:31 -0400
1417 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1418 In-Reply-To: <1278693172-sup-6247@mailer>
1419 References: <1278693172-sup-6247@mailer>
1420 Message-ID: <1279493829-sup-2931@ezyang>
1421
1422 Here is one trace that I managed to scrounge up
1423
1424 undefined method `content_width' for nil:NilClass
1425 /home/ezyang/Dev/sup/lib/sup/modes/thread-index-mode.rb:953:in `from_width'
1426 /home/ezyang/Dev/sup/lib/sup/modes/thread-index-mode.rb:870:in `text_for_thread_at'
1427 /home/ezyang/Dev/sup/lib/sup/hook.rb:55:in `each_with_index'
1428 /home/ezyang/Dev/sup/lib/sup/modes/thread-index-mode.rb:869:in `each'
1429 /home/ezyang/Dev/sup/lib/sup/modes/thread-index-mode.rb:869:in `each_with_index'
1430 /home/ezyang/Dev/sup/lib/sup/modes/thread-index-mode.rb:869:in `text_for_thread_at'
1431 /home/ezyang/Dev/sup/lib/sup/modes/thread-index-mode.rb:811:in `regen_text'
1432 /home/ezyang/Dev/sup/lib/sup/util.rb:423:in `map_with_index'
1433 /home/ezyang/Dev/sup/lib/sup/hook.rb:55:in `each_with_index'
1434 /home/ezyang/Dev/sup/lib/sup/util.rb:423:in `each'
1435 /home/ezyang/Dev/sup/lib/sup/util.rb:423:in `each_with_index'
1436 /home/ezyang/Dev/sup/lib/sup/util.rb:423:in `map_with_index'
1437 /home/ezyang/Dev/sup/lib/sup/modes/thread-index-mode.rb:811:in `regen_text'
1438 /home/ezyang/Dev/sup/lib/sup/modes/thread-index-mode.rb:262:in `update'
1439 /home/ezyang/Dev/sup/lib/sup/modes/thread-index-mode.rb:217:in `handle_location_deleted_update'
1440 /home/ezyang/Dev/sup/lib/sup/update.rb:26:in `send'
1441 /home/ezyang/Dev/sup/lib/sup/update.rb:26:in `relay'
1442 /home/ezyang/Dev/sup/lib/sup/update.rb:26:in `each'
1443 /home/ezyang/Dev/sup/lib/sup/update.rb:26:in `relay'
1444 /home/ezyang/Dev/sup/lib/sup/util.rb:588:in `send'
1445 /home/ezyang/Dev/sup/lib/sup/util.rb:588:in `method_missing'
1446 /home/ezyang/Dev/sup/lib/sup/poll.rb:197:in `poll_from'
1447 /home/ezyang/Dev/sup/lib/sup/index.rb:258:in `each_message'
1448 /home/ezyang/Dev/sup/lib/sup/index.rb:245:in `each_id'
1449 /home/ezyang/Dev/sup/lib/sup/index.rb:245:in `each'
1450 /home/ezyang/Dev/sup/lib/sup/index.rb:245:in `each_id'
1451 /home/ezyang/Dev/sup/lib/sup/index.rb:257:in `each_message'
1452 /home/ezyang/Dev/sup/lib/sup/util.rb:588:in `send'
1453 /home/ezyang/Dev/sup/lib/sup/util.rb:588:in `method_missing'
1454 [snip]
1455
1456 Cheers,
1457 Edward
1458
1459 From michael+sup@stapelberg.de Mon Jul 19 15:39:31 2010
1460 From: michael+sup@stapelberg.de (Michael Stapelberg)
1461 Date: Mon, 19 Jul 2010 21:39:31 +0200
1462 Subject: [sup-devel] [PATCH] Bugfix: Make sure to use UNIX line-endings for
1463 GPG decrypted payloads
1464 Message-ID: <1279568308-sup-1044@midna.zekjur.net>
1465
1466 Hi,
1467
1468 please find attached a patch for the following issue (quuote from the commit
1469 message):
1470
1471 Bugfix: Make sure to use UNIX line-endings for GPG decrypted payloads
1472
1473 Otherwise, RMail will fail to correctly parse multipart/signed messages
1474
1475 Best regards,
1476 Michael
1477 -------------- next part --------------
1478 A non-text attachment was scrubbed...
1479 Name: 0001-Bugfix-Make-sure-to-use-UNIX-line-endings-for-GPG-de.patch
1480 Type: application/octet-stream
1481 Size: 891 bytes
1482 Desc: not available
1483 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100719/6cef1d48/attachment.obj>
1484
1485 From michael+sup@stapelberg.de Mon Jul 19 17:38:18 2010
1486 From: michael+sup@stapelberg.de (Michael Stapelberg)
1487 Date: Mon, 19 Jul 2010 23:38:18 +0200
1488 Subject: [sup-devel] (REVIEW NEEDED) [PATCH] Recode attachments to UTF-8
1489 when forwarding
1490 Message-ID: <1279575318-sup-7427@midna.zekjur.net>
1491
1492 Hi,
1493
1494 can you please review the attached patch? It recodes attachments from whichever
1495 charset they are encoded in to UTF-8 when forwarding messages in order to
1496 please rmail (it crashes with attachments encoded in Windows-1252 otherwise).
1497
1498 FYI, the crash backtrace is the following (pathes shortened):
1499 --- Encoding::CompatibilityError from thread: main
1500 incompatible character encodings: UTF-8 and ASCII-8BIT
1501 rmail-1.0.0/lib/rmail/serialize.rb:112:in `serialize_low'
1502 rmail-1.0.0/lib/rmail/serialize.rb:99:in `block in serialize_low'
1503 rmail-1.0.0/lib/rmail/message.rb:155:in `block in each_part'
1504 rmail-1.0.0/lib/rmail/message.rb:154:in `each'
1505 rmail-1.0.0/lib/rmail/message.rb:154:in `each_part'
1506 rmail-1.0.0/lib/rmail/serialize.rb:96:in `serialize_low'
1507 rmail-1.0.0/lib/rmail/serialize.rb:63:in `serialize'
1508 rmail-1.0.0/lib/rmail/message.rb:146:in `to_s'
1509 sup/lib/sup/modes/edit-message-mode.rb:344:in `puts'
1510 sup/lib/sup/modes/edit-message-mode.rb:344:in `block in send_message'
1511 sup/lib/sup/modes/edit-message-mode.rb:344:in `popen'
1512 sup/lib/sup/modes/edit-message-mode.rb:344:in `send_message'
1513 sup/lib/sup/mode.rb:59:in `handle_input'
1514 sup/lib/sup/buffer.rb:277:in `handle_input'
1515
1516 So, if you have a better way of handling this, please let us know.
1517
1518 Best regards,
1519 Michael
1520 -------------- next part --------------
1521 A non-text attachment was scrubbed...
1522 Name: 0001-Recode-attachments-to-UTF-8-when-forwarding.patch
1523 Type: application/octet-stream
1524 Size: 3970 bytes
1525 Desc: not available
1526 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100719/2712c0ee/attachment.obj>
1527
1528 From michael+sup@stapelberg.de Mon Jul 19 18:50:37 2010
1529 From: michael+sup@stapelberg.de (Michael Stapelberg)
1530 Date: Tue, 20 Jul 2010 00:50:37 +0200
1531 Subject: [sup-devel] [PATCH] Return nothing between if end index is not
1532 found.
1533 In-Reply-To: <1279475566-sup-7173@ezyang>
1534 References: <1279475566-sup-7173@ezyang>
1535 Message-ID: <1279579814-sup-4745@midna.zekjur.net>
1536
1537 Hi Edward,
1538
1539 Excerpts from Edward Z. Yang's message of 2010-07-18 19:53:39 +0200:
1540 > This patch fixed Nil error that occurred when I had a GPG signed
1541 > mail with a starting marker but no ending marker.
1542 Thanks for the patch, I can confirm it working and necessary.
1543
1544 Best regards,
1545 Michael
1546
1547 From michael+sup@stapelberg.de Mon Jul 19 18:57:18 2010
1548 From: michael+sup@stapelberg.de (Michael Stapelberg)
1549 Date: Tue, 20 Jul 2010 00:57:18 +0200
1550 Subject: [sup-devel] [PATCH] Bugfix: Make sure to use UNIX line-endings
1551 for GPG decrypted payloads
1552 In-Reply-To: <1279568308-sup-1044@midna.zekjur.net>
1553 References: <1279568308-sup-1044@midna.zekjur.net>
1554 Message-ID: <1279580212-sup-1480@midna.zekjur.net>
1555
1556 Hi,
1557
1558 Excerpts from Michael Stapelberg's message of 2010-07-19 21:39:31 +0200:
1559 > please find attached a patch for the following issue (quuote from the commit
1560 > message):
1561 >
1562 > Bugfix: Make sure to use UNIX line-endings for GPG decrypted payloads
1563 >
1564 > Otherwise, RMail will fail to correctly parse multipart/signed messages
1565 Attached you can find the fixed version of this patch.
1566
1567 Best regards,
1568 Michael
1569 -------------- next part --------------
1570 A non-text attachment was scrubbed...
1571 Name: 0001-Bugfix-Make-sure-to-use-UNIX-line-endings-for-GPG-de.patch
1572 Type: application/octet-stream
1573 Size: 957 bytes
1574 Desc: not available
1575 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100720/ba0614ab/attachment.obj>
1576
1577 From damien.leone@fensalir.fr Tue Jul 20 05:39:41 2010
1578 From: damien.leone@fensalir.fr (Damien Leone)
1579 Date: Tue, 20 Jul 2010 11:39:41 +0200
1580 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1581 In-Reply-To: <1279492496-sup-3638@ezyang>
1582 References: <1278693172-sup-6247@mailer> <1279492496-sup-3638@ezyang>
1583 Message-ID: <1279618205-sup-993@mailer>
1584
1585 Sup Edward,
1586
1587 Thank you for your feedback!
1588
1589 Excerpts from Edward Z. Yang's message of Mon Jul 19 00:46:33 +0200 2010:
1590 > It makes Sup very crashy and there's some strange behavior. This is probably
1591 > the sixth time I'm composing this message (yeah, haven't learned my
1592 > lesson.) In more detail...
1593
1594 I'm impressed, I never experienced such crashes, it is quite stable
1595 here but I use only very basic hooks.
1596
1597 > * Backwards syncing appears to make old deleted mail show up again; I'm not
1598 > sure if it's because touching the Maildir causes Sup to pick up on deleted
1599 > tags again or something, but I had to go back and delete lots of deleted mail.
1600
1601 Hmm, strange, do you use the latest commits of the branch? I pushed a
1602 fix for deleted mails about 10 days ago.
1603
1604 The mails that show up again don't have the deleted flag at all?
1605
1606 > * When Sup is deleting messages, it is /extremely/ unsafe to iterate over
1607 > a list of all messages in the index and query them for info: the threading means
1608 > that any given message might not exist anymore. I had a hook that kept triggering
1609 > this bug, and earlier on in the process drawing functions would also frequently
1610 > Nil error. This is probably under-tested codepaths in Sup that we should track
1611 > down; unfortunately I didn't have the presence of mind to record traces until
1612 > later (and the ones I got all look like my hooks fault).
1613
1614 I did not test the code with hooks, what do you suggest for this one?
1615
1616 > * In a similar vein, while messages are going away, '@' will occasionally return
1617 > no messages (pressing again usually fixes it). Messages that are labelled inbox
1618 > will show up in 'U', but not in the inbox view without a Sup restart.
1619
1620 I never use this keybinding but indeed I noticed that pressing '@' two
1621 times in a row was not showing anything.
1622
1623 I will try to track down these bugs.
1624
1625 Thanks again!
1626 Cheers,
1627
1628 --
1629 Damien Leone <damien.leone at fensalir.fr>
1630
1631 Web: http://dleone.fensalir.fr/
1632 GPG: 0x82EB4DDF
1633 -------------- next part --------------
1634 A non-text attachment was scrubbed...
1635 Name: signature.asc
1636 Type: application/pgp-signature
1637 Size: 198 bytes
1638 Desc: not available
1639 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100720/5d457344/attachment.bin>
1640
1641 From damien.leone@fensalir.fr Tue Jul 20 05:45:41 2010
1642 From: damien.leone@fensalir.fr (Damien Leone)
1643 Date: Tue, 20 Jul 2010 11:45:41 +0200
1644 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1645 In-Reply-To: <1279493200-sup-3095@ezyang>
1646 References: <1278693172-sup-6247@mailer> <1279493200-sup-3095@ezyang>
1647 Message-ID: <1279618822-sup-4912@mailer>
1648
1649 Hi,
1650
1651 Excerpts from Edward Z. Yang's message of Mon Jul 19 00:50:39 +0200 2010:
1652 > I would recommend having some sort of flag like 'sync-back'd' programatically
1653 > generated by sup-sync-back-maildir so that Sup will refuse to start if
1654 > you turned on sync-backs without running this command.
1655
1656 Good idea, that might prevent some bad suprises.
1657
1658 > It seems to me that merging the Maildir flags and the Sup flags would
1659 > let you preserve this, but for heavy Sup users this isn't a big deal.
1660
1661 True, and that could be done by sup-sync-back-maildir.
1662
1663 > I think this will be a pretty killer feature to have, because it means
1664 > we can then assign "primary" tags and use those to have sync-backs move
1665 > messages between Maildir folders (on the same account, I imagine), which
1666 > would translate into a folder-sorted webmail view, which is about the
1667 > best you can do without first-class label support in Maildir. I know of
1668 > at least one friend who this would be a deal-maker.
1669
1670 And that doesn't seem hard to implement, we should definitely consider
1671 this feature, maybe after the primary code has been stabilized.
1672
1673 Cheers,
1674
1675 --
1676 Damien Leone <damien.leone at fensalir.fr>
1677
1678 Web: http://dleone.fensalir.fr/
1679 GPG: 0x82EB4DDF
1680 -------------- next part --------------
1681 A non-text attachment was scrubbed...
1682 Name: signature.asc
1683 Type: application/pgp-signature
1684 Size: 198 bytes
1685 Desc: not available
1686 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100720/3baa46e4/attachment.bin>
1687
1688 From eric+sup-devel@gerlach.ca Tue Jul 20 15:15:40 2010
1689 From: eric+sup-devel@gerlach.ca (Eric Gerlach)
1690 Date: Tue, 20 Jul 2010 15:15:40 -0400
1691 Subject: [sup-devel] Crash,
1692 getting "wrong id on nil" when loading new messages
1693 Message-ID: <1279653097-sup-8302@gerlach.ca>
1694
1695 I get the following crash when loading more messages (at a certain
1696 point). I've created an issue for it (111), but I'd like some help
1697 debugging this further. I'm pretty sure it's caused by some sort of
1698 problematic message in my Maildir, but I don't know which one. I'm
1699 pretty good with Ruby, but not so much with the sup codebase.
1700
1701 I've traced it down to ThreadIndexMode#update, particularly the part
1702 where it calls t.first.id. I've used ruby-debug to be able to isolate
1703 the particular thread, and the thread has no children, but then I don't
1704 quite know what to do from there. How can I trace a thread object back
1705 to its origins?
1706
1707 Help?
1708
1709 Cheers,
1710
1711 Eric
1712
1713 wrong id called on nil
1714 /var/lib/gems/1.8/gems/sup-0.11/lib/sup.rb:19:in `id'
1715 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:226:in `update'
1716 /var/lib/gems/1.8/gems/sup-0.11/lib/sup/hook.rb:55:in `sort_by'
1717 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:226:in `each'
1718 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:226:in `sort_by'
1719 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:226:in `update'
1720 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:224:in `synchronize'
1721 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:224:in `update'
1722 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:642:in
1723 `__unprotected_load_n_threads'
1724 (eval):12:in `load_n_threads'
1725 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:614:in
1726 `load_n_threads_background'
1727 /var/lib/gems/1.8/gems/sup-0.11/lib/sup.rb:74:in `reporting_thread'
1728 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:613:in
1729 `load_n_threads_background'
1730 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:684:in
1731 `__unprotected_load_threads'
1732 (eval):12:in `load_threads'
1733 /var/lib/gems/1.8/gems/sup-0.11/lib/sup/mode.rb:59:in `send'
1734 /var/lib/gems/1.8/gems/sup-0.11/lib/sup/mode.rb:59:in `handle_input'
1735 /var/lib/gems/1.8/gems/sup-0.11/lib/sup/buffer.rb:279:in `handle_input'
1736 /var/lib/gems/1.8/gems/sup-0.11/bin/sup:279
1737 /var/lib/gems/1.8/bin/sup:19:in `load'
1738 /var/lib/gems/1.8/bin/sup:19
1739
1740 From sup-bugs@masanjin.net Tue Jul 20 14:49:03 2010
1741 From: sup-bugs@masanjin.net (anonymous)
1742 Date: Tue, 20 Jul 2010 18:49:03 +0000
1743 Subject: [sup-devel] [issue111] wrong id called on nil
1744 In-Reply-To: <1279651743.08.0.100305852621.issue111@masanjin.net>
1745 Message-ID: <1279651743.08.0.100305852621.issue111@masanjin.net>
1746
1747
1748 New submission from anonymous:
1749
1750 I get the following crash when loading more messages. Will start a thread on
1751 sup-devel to get help with debugging.
1752
1753 wrong id called on nil
1754 /var/lib/gems/1.8/gems/sup-0.11/lib/sup.rb:19:in `id'
1755 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:226:in `update'
1756 /var/lib/gems/1.8/gems/sup-0.11/lib/sup/hook.rb:55:in `sort_by'
1757 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:226:in `each'
1758 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:226:in `sort_by'
1759 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:226:in `update'
1760 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:224:in `synchronize'
1761 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:224:in `update'
1762 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:642:in
1763 `__unprotected_load_n_threads'
1764 (eval):12:in `load_n_threads'
1765 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:614:in `load_n_threads_background'
1766 /var/lib/gems/1.8/gems/sup-0.11/lib/sup.rb:74:in `reporting_thread'
1767 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:613:in `load_n_threads_background'
1768 /usr/lib/ruby/1.8/sup/modes/thread-index-mode.rb:684:in `__unprotected_load_threads'
1769 (eval):12:in `load_threads'
1770 /var/lib/gems/1.8/gems/sup-0.11/lib/sup/mode.rb:59:in `send'
1771 /var/lib/gems/1.8/gems/sup-0.11/lib/sup/mode.rb:59:in `handle_input'
1772 /var/lib/gems/1.8/gems/sup-0.11/lib/sup/buffer.rb:279:in `handle_input'
1773 /var/lib/gems/1.8/gems/sup-0.11/bin/sup:279
1774 /var/lib/gems/1.8/bin/sup:19:in `load'
1775 /var/lib/gems/1.8/bin/sup:19
1776
1777 ----------
1778 messages: 256
1779 nosy: anonymous
1780 priority: bug
1781 ruby_version: 1.8.7
1782 status: unread
1783 sup_version: 0.11
1784 title: wrong id called on nil
1785
1786 _________________________________________
1787 Sup issue tracker <sup-bugs at masanjin.net>
1788 <http://masanjin.net/sup-bugs/issue111>
1789 _________________________________________
1790
1791 From bwalton@artsci.utoronto.ca Tue Jul 20 15:37:10 2010
1792 From: bwalton@artsci.utoronto.ca (Ben Walton)
1793 Date: Tue, 20 Jul 2010 15:37:10 -0400
1794 Subject: [sup-devel] Crash,
1795 getting "wrong id on nil" when loading new messages
1796 In-Reply-To: <1279653097-sup-8302@gerlach.ca>
1797 References: <1279653097-sup-8302@gerlach.ca>
1798 Message-ID: <1279654563-sup-816@pinkfloyd.chass.utoronto.ca>
1799
1800 Excerpts from Eric Gerlach's message of Tue Jul 20 15:15:40 -0400 2010:
1801
1802 Hi Eric,
1803
1804 > I get the following crash when loading more messages (at a certain
1805 > point). I've created an issue for it (111), but I'd like some help
1806 > debugging this further. I'm pretty sure it's caused by some sort of
1807 > problematic message in my Maildir, but I don't know which one. I'm
1808 > pretty good with Ruby, but not so much with the sup codebase.
1809
1810 I'm pretty sure that issue is fixed in next. I used to get hit by it
1811 but haven't for some time since Rich committed some fixes for it.
1812
1813 Try running from the git codebase instead of the gem and see if it
1814 goes away.
1815
1816 HTH.
1817 -Ben
1818 --
1819 Ben Walton
1820 Systems Programmer - CHASS
1821 University of Toronto
1822 C:416.407.5610 | W:416.978.4302
1823
1824
1825 From michael+sup@stapelberg.de Tue Jul 20 16:09:39 2010
1826 From: michael+sup@stapelberg.de (Michael Stapelberg)
1827 Date: Tue, 20 Jul 2010 22:09:39 +0200
1828 Subject: [sup-devel] [PATCH] Return nothing between if end index is not
1829 found.
1830 In-Reply-To: <1279579814-sup-4745@midna.zekjur.net>
1831 References: <1279475566-sup-7173@ezyang> <1279579814-sup-4745@midna.zekjur.net>
1832 Message-ID: <1279656544-sup-4931@midna.zekjur.net>
1833
1834 Hi,
1835
1836 Excerpts from Michael Stapelberg's message of 2010-07-20 00:50:37 +0200:
1837 > Thanks for the patch, I can confirm it working and necessary.
1838 I was wrong. I just opened an email and it was no longer verified (it is
1839 GPG-signed). I will post an updated patch soon.
1840
1841 Best regards,
1842 Michael
1843
1844 From eric+sup-devel@gerlach.ca Tue Jul 20 16:11:33 2010
1845 From: eric+sup-devel@gerlach.ca (Eric Gerlach)
1846 Date: Tue, 20 Jul 2010 16:11:33 -0400
1847 Subject: [sup-devel] Crash,
1848 getting "wrong id on nil" when loading new messages
1849 In-Reply-To: <1279654563-sup-816@pinkfloyd.chass.utoronto.ca>
1850 References: <1279653097-sup-8302@gerlach.ca>
1851 <1279654563-sup-816@pinkfloyd.chass.utoronto.ca>
1852 Message-ID: <1279656659-sup-5582@gerlach.ca>
1853
1854 Excerpts from Ben Walton's message of Tue Jul 20 15:37:10 -0400 2010:
1855 > Excerpts from Eric Gerlach's message of Tue Jul 20 15:15:40 -0400 2010:
1856 >
1857 > Hi Eric,
1858 >
1859 > > I get the following crash when loading more messages (at a certain
1860 > > point). I've created an issue for it (111), but I'd like some help
1861 > > debugging this further. I'm pretty sure it's caused by some sort of
1862 > > problematic message in my Maildir, but I don't know which one. I'm
1863 > > pretty good with Ruby, but not so much with the sup codebase.
1864 >
1865 > I'm pretty sure that issue is fixed in next. I used to get hit by it
1866 > but haven't for some time since Rich committed some fixes for it.
1867 >
1868 > Try running from the git codebase instead of the gem and see if it
1869 > goes away.
1870
1871 It went away. I'll go close that bug I created now. Thanks for the
1872 help!
1873
1874 Cheers,
1875
1876 Eric
1877
1878 From ezyang@MIT.EDU Tue Jul 20 20:44:38 2010
1879 From: ezyang@MIT.EDU (Edward Z. Yang)
1880 Date: Tue, 20 Jul 2010 20:44:38 -0400
1881 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1882 In-Reply-To: <1279618205-sup-993@mailer>
1883 References: <1278693172-sup-6247@mailer> <1279492496-sup-3638@ezyang>
1884 <1279618205-sup-993@mailer>
1885 Message-ID: <1279672865-sup-6946@ezyang>
1886
1887 Excerpts from Damien Leone's message of Tue Jul 20 05:39:41 -0400 2010:
1888 > Excerpts from Edward Z. Yang's message of Mon Jul 19 00:46:33 +0200 2010:
1889 > > It makes Sup very crashy and there's some strange behavior. This is probably
1890 > > the sixth time I'm composing this message (yeah, haven't learned my
1891 > > lesson.) In more detail...
1892 >
1893 > I'm impressed, I never experienced such crashes, it is quite stable
1894 > here but I use only very basic hooks.
1895
1896 In retrospect, I'm fairly certain the majority of crashes were from user hooks.
1897
1898 > > * Backwards syncing appears to make old deleted mail show up again; I'm not
1899 > > sure if it's because touching the Maildir causes Sup to pick up on deleted
1900 > > tags again or something, but I had to go back and delete lots of deleted mail.
1901 >
1902 > Hmm, strange, do you use the latest commits of the branch? I pushed a
1903 > fix for deleted mails about 10 days ago.
1904 >
1905 > The mails that show up again don't have the deleted flag at all?
1906
1907 My Sup is running off of f150276f62e263d146fa81ede645b5e90e06a8a1. They don't
1908 appear to have the deleted flag, but I didn't look too closely. It's *possible*
1909 that a regular synchronization would have picked them up, if they accidentally
1910 got dropped from my Sup index but were still inside my Maildir. I suggest not
1911 worrying too much about this unless someone else reproduces.
1912
1913 > I did not test the code with hooks, what do you suggest for this one?
1914
1915 I mentioned this in the id and Nil message; basically, when iterating over all
1916 messages messages might disappear, and some hooks need to check if a message is
1917 Nil before doing anything to it.
1918
1919 > > * In a similar vein, while messages are going away, '@' will occasionally return
1920 > > no messages (pressing again usually fixes it). Messages that are labelled inbox
1921 > > will show up in 'U', but not in the inbox view without a Sup restart.
1922 >
1923 > I never use this keybinding but indeed I noticed that pressing '@' two
1924 > times in a row was not showing anything.
1925
1926 It is possible that this is a bug in vanilla Sup.
1927
1928 Cheers,
1929 Edward
1930
1931 From damien.leone@fensalir.fr Wed Jul 21 04:52:00 2010
1932 From: damien.leone@fensalir.fr (Damien Leone)
1933 Date: Wed, 21 Jul 2010 10:52:00 +0200
1934 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1935 In-Reply-To: <1279672865-sup-6946@ezyang>
1936 References: <1278693172-sup-6247@mailer> <1279492496-sup-3638@ezyang>
1937 <1279618205-sup-993@mailer> <1279672865-sup-6946@ezyang>
1938 Message-ID: <1279702065-sup-7856@mailer>
1939
1940 Sup Edward,
1941
1942 Excerpts from Edward Z. Yang's message of Wed Jul 21 02:44:38 +0200 2010:
1943 > Excerpts from Damien Leone's message of Tue Jul 20 05:39:41 -0400 2010:
1944 > In retrospect, I'm fairly certain the majority of crashes were from user hooks.
1945
1946 Could you paste me these hooks please?
1947
1948 > My Sup is running off of f150276f62e263d146fa81ede645b5e90e06a8a1. They don't
1949 > appear to have the deleted flag, but I didn't look too closely. It's *possible*
1950 > that a regular synchronization would have picked them up, if they accidentally
1951 > got dropped from my Sup index but were still inside my Maildir. I suggest not
1952 > worrying too much about this unless someone else reproduces.
1953
1954 What is your setup? IMAP + offlineimap? Do deleted mails work fine
1955 now?
1956
1957 Cheers,
1958
1959 --
1960 Damien Leone <damien.leone at fensalir.fr>
1961
1962 Web: http://dleone.fensalir.fr/
1963 GPG: 0x82EB4DDF
1964 -------------- next part --------------
1965 A non-text attachment was scrubbed...
1966 Name: signature.asc
1967 Type: application/pgp-signature
1968 Size: 198 bytes
1969 Desc: not available
1970 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100721/abd46324/attachment.bin>
1971
1972 From damien.leone@fensalir.fr Wed Jul 21 04:54:18 2010
1973 From: damien.leone@fensalir.fr (Damien Leone)
1974 Date: Wed, 21 Jul 2010 10:54:18 +0200
1975 Subject: [sup-devel] Adding backward synchronization for Maildir sources
1976 In-Reply-To: <1279702065-sup-7856@mailer>
1977 References: <1278693172-sup-6247@mailer> <1279492496-sup-3638@ezyang>
1978 <1279618205-sup-993@mailer> <1279672865-sup-6946@ezyang>
1979 <1279702065-sup-7856@mailer>
1980 Message-ID: <1279702378-sup-2954@mailer>
1981
1982 Excerpts from Damien Leone's message of Wed Jul 21 10:52:00 +0200 2010:
1983 > What is your setup? IMAP + offlineimap?
1984
1985 My bad, you mentioned offlineimap a few mails ago.
1986
1987 --
1988 Damien Leone <damien.leone at fensalir.fr>
1989
1990 Web: http://dleone.fensalir.fr/
1991 GPG: 0x82EB4DDF
1992 -------------- next part --------------
1993 A non-text attachment was scrubbed...
1994 Name: signature.asc
1995 Type: application/pgp-signature
1996 Size: 198 bytes
1997 Desc: not available
1998 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100721/2df79bdd/attachment.bin>
1999
2000 From sup-bugs@masanjin.net Thu Jul 22 13:34:51 2010
2001 From: sup-bugs@masanjin.net (anonymous)
2002 Date: Thu, 22 Jul 2010 17:34:51 +0000
2003 Subject: [sup-devel] [issue112] wildcard in from: field do not work
2004 In-Reply-To: <1279820091.87.0.35266318432.issue112@masanjin.net>
2005 Message-ID: <1279820091.87.0.35266318432.issue112@masanjin.net>
2006
2007
2008 New submission from anonymous:
2009
2010 A search for from:robe* does not find all the expected emails (eg ones from
2011 people called Robert).
2012
2013 The translated query (line 399 of lib/sup/index.rb) is
2014 (from_email:robe OR from_name:robe)*
2015
2016 I think it should expand to (from_email:robe* OR from_name:robe*)
2017
2018 Indeed, a search for from_name:robe* yields the expected results.
2019
2020 ----------
2021 messages: 257
2022 nosy: anonymous
2023 priority: bug
2024 ruby_version: 1.9.1
2025 status: unread
2026 sup_version: git/debian
2027 title: wildcard in from: field do not work
2028
2029 _________________________________________
2030 Sup issue tracker <sup-bugs at masanjin.net>
2031 <http://masanjin.net/sup-bugs/issue112>
2032 _________________________________________
2033
2034 From rlane@club.cc.cmu.edu Sat Jul 24 17:30:16 2010
2035 From: rlane@club.cc.cmu.edu (Rich Lane)
2036 Date: Sat, 24 Jul 2010 17:30:16 -0400
2037 Subject: [sup-devel] Adding backward synchronization for Maildir sources
2038 In-Reply-To: <1278693172-sup-6247@mailer>
2039 References: <1278693172-sup-6247@mailer>
2040 Message-ID: <1280006159-sup-5717@zyrg.net>
2041
2042 I've rebased this against master and merged it to branch maildir-sync in
2043 the official repo. This is a big change, so help with testing and code
2044 review would be much appreciated.
2045
2046 From ezyang@MIT.EDU Sun Jul 25 18:25:26 2010
2047 From: ezyang@MIT.EDU (Edward Z. Yang)
2048 Date: Sun, 25 Jul 2010 18:25:26 -0400
2049 Subject: [sup-devel] Adding backward synchronization for Maildir sources
2050 In-Reply-To: <1280006159-sup-5717@zyrg.net>
2051 References: <1278693172-sup-6247@mailer> <1280006159-sup-5717@zyrg.net>
2052 Message-ID: <1280096695-sup-2557@ezyang>
2053
2054 Excerpts from Rich Lane's message of Sat Jul 24 17:30:16 -0400 2010:
2055 > I've rebased this against master and merged it to branch maildir-sync in
2056 > the official repo. This is a big change, so help with testing and code
2057 > review would be much appreciated.
2058
2059 Hi Rich,
2060
2061 I've moved my Sup checkout onto this branch. *test test test test*
2062 After a week of usage, I'd say the changes are pretty stable.
2063
2064 Cheers,
2065 Edward
2066
2067 From michael+sup@stapelberg.de Tue Jul 27 08:54:57 2010
2068 From: michael+sup@stapelberg.de (Michael Stapelberg)
2069 Date: Tue, 27 Jul 2010 14:54:57 +0200
2070 Subject: [sup-devel] [PATCH] Use the configured real name combined with the
2071 actual email address as Sender when replying
2072 Message-ID: <1280235249-sup-8730@midna.zekjur.net>
2073
2074 Hi,
2075
2076 quote from the commit message:
2077 For example, mails with "To: michael+sup at stapelberg.de" don't get the
2078 sender "michael+sup <michael+sup at stapelberg.de>" anymore but
2079 "Michael Stapelberg <michael+sup at stapelberg.de>"
2080
2081 Best regards,
2082 Michael
2083 -------------- next part --------------
2084 A non-text attachment was scrubbed...
2085 Name: 0001-Use-the-configured-real-name-combined-with-the-actua.patch
2086 Type: application/octet-stream
2087 Size: 1313 bytes
2088 Desc: not available
2089 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100727/b372afc4/attachment-0001.obj>
2090
2091 From viroteck@viroteck.net Tue Jul 27 12:16:48 2010
2092 From: viroteck@viroteck.net (Robin Burchell)
2093 Date: Tue, 27 Jul 2010 17:16:48 +0100
2094 Subject: [sup-devel] [PATCH] Use the configured real name combined with
2095 the actual email address as Sender when replying
2096 In-Reply-To: <1280235249-sup-8730@midna.zekjur.net>
2097 References: <1280235249-sup-8730@midna.zekjur.net>
2098 Message-ID: <1280247338-sup-5612@virgin>
2099
2100 Hi Michael,
2101
2102 Excerpts from Michael Stapelberg's message of Tue Jul 27 13:54:57 +0100 2010:
2103 > Hi,
2104 >
2105 > quote from the commit message:
2106 > For example, mails with "To: michael+sup at stapelberg.de" don't get the
2107 > sender "michael+sup <michael+sup at stapelberg.de>" anymore but
2108 > "Michael Stapelberg <michael+sup at stapelberg.de>"
2109
2110 I made a similar (though not perfect) fix which, I guess from your mail, never
2111 got through the moderation queue to sup-devel.
2112
2113 See:
2114 http://github.com/rburchell/sup/commit/efd9752fc62d14fbabecf7719c42f13643c21db
2115
2116 > Best regards,
2117 > Michael
2118
2119 --
2120 Robin Burchell
2121 http://rburchell.com
2122
2123 From michael+sup@stapelberg.de Tue Jul 27 12:38:51 2010
2124 From: michael+sup@stapelberg.de (Michael Stapelberg)
2125 Date: Tue, 27 Jul 2010 18:38:51 +0200
2126 Subject: [sup-devel] [PATCH] Use the configured real name combined with
2127 the actual email address as Sender when replying
2128 In-Reply-To: <1280247338-sup-5612@virgin>
2129 References: <1280235249-sup-8730@midna.zekjur.net> <1280247338-sup-5612@virgin>
2130 Message-ID: <1280248685-sup-4691@midna.zekjur.net>
2131
2132 Hi Robin,
2133
2134 Excerpts from Robin Burchell's message of 2010-07-27 18:16:48 +0200:
2135 > I made a similar (though not perfect) fix which, I guess from your mail, never
2136 > got through the moderation queue to sup-devel.
2137 Not sure, at least it did not get merged into mainline as of today. Also, your
2138 patch does not consider the regexes/alternates system but always just uses the
2139 main email address.
2140
2141 Best regards,
2142 Michael
2143
2144 From daniel.schoepe@googlemail.com Thu Jul 29 19:30:19 2010
2145 From: daniel.schoepe@googlemail.com (Daniel Schoepe)
2146 Date: Fri, 30 Jul 2010 01:30:19 +0200
2147 Subject: [sup-devel] [PATCH] Fix crash when sending signed/encrypted
2148 messages with attachments
2149 Message-ID: <1280446020-sup-4762@gilead>
2150
2151 Currently, when trying to send an encrypted or signed message with an
2152 attachment, sup crashes, since it tries to .pack('m') the body of a
2153 multipart message, which is an array of RMail::Messages and thus
2154 crashes.
2155
2156 The attached patch should fix that.
2157 -------------- next part --------------
2158 A non-text attachment was scrubbed...
2159 Name: 0001-Fix-crash-when-sending-signed-encrypted-messages-wit.patch
2160 Type: application/octet-stream
2161 Size: 1415 bytes
2162 Desc: not available
2163 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100730/98154b32/attachment.obj>
2164 -------------- next part --------------
2165 A non-text attachment was scrubbed...
2166 Name: signature.asc
2167 Type: application/pgp-signature
2168 Size: 836 bytes
2169 Desc: not available
2170 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100730/98154b32/attachment.bin>
2171
2172 From alvherre@alvh.no-ip.org Thu Jul 29 23:09:04 2010
2173 From: alvherre@alvh.no-ip.org (Alvaro Herrera)
2174 Date: Thu, 29 Jul 2010 23:09:04 -0400
2175 Subject: [sup-devel] Fix crash when opening attachment with slashes in
2176 filename
2177 Message-ID: <1280459186-sup-8579@alvh.no-ip.org>
2178
2179 Hi,
2180
2181 This patch fixes a crash caused by trying to create a temp file with
2182 forward slashes. The fix is simple -- replace the slashes with a
2183 different char.
2184
2185 I reported this as issue 105 on masanjin.net previously, but that's
2186 apparently dead now.
2187
2188 --
2189 ?lvaro Herrera <alvherre at alvh.no-ip.org>
2190 -------------- next part --------------
2191 A non-text attachment was scrubbed...
2192 Name: msgchunks.diff
2193 Type: application/octet-stream
2194 Size: 748 bytes
2195 Desc: not available
2196 URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100729/3402b837/attachment.obj>
2197
2198 From sup-bugs@masanjin.net Fri Jul 30 14:37:16 2010
2199 From: sup-bugs@masanjin.net (anonymous)
2200 Date: Fri, 30 Jul 2010 18:37:16 +0000
2201 Subject: [sup-devel] [issue113] Error at startup
2202 In-Reply-To: <1280515036.67.0.567575591319.issue113@masanjin.net>
2203 Message-ID: <1280515036.67.0.567575591319.issue113@masanjin.net>
2204
2205
2206 New submission from anonymous:
2207
2208 I received a bug info when I tried to run sup in Archlinux. The contents from
2209 ~.sup/exception-log.txt.
2210
2211 --- RuntimeError from thread: main
2212 can't modify frozen string
2213 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in `force_encoding'
2214 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in `block in
2215 add_account'
2216 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in `each'
2217 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:53:in `add_account'
2218 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/account.rb:37:in `initialize'
2219 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/util.rb:574:in `new'
2220 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/util.rb:574:in `init'
2221 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup.rb:126:in `start'
2222 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/bin/sup:153:in `<module:Redwood>'
2223 /usr/lib/ruby/gems/1.9.1/gems/sup-0.11/bin/sup:68:in `<top (required)>'
2224 /usr/bin/sup:19:in `load'
2225 /usr/bin/sup:19:in `<main>'
2226
2227 ----------
2228 messages: 260
2229 nosy: anonymous
2230 priority: bug
2231 ruby_version: 1.9.1
2232 status: unread
2233 sup_version: 0.11.2
2234 title: Error at startup
2235
2236 _________________________________________
2237 Sup issue tracker <sup-bugs at masanjin.net>
2238 <http://masanjin.net/sup-bugs/issue113>
2239 _________________________________________
2240