Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: daniel@electricrain.com (Dan Sully)
Subject: [sup-talk] sup-sync & missing message-ids
Date: Tue, 24 Jul 2007 11:13:58 -0700	[thread overview]
Message-ID: <20070724181358.GA20393@electricrain.com> (raw)
In-Reply-To: <1185299593-sup-1596@south>

* William Morgan shaped the electrons to say...

>> For whatever reason, there are messages in my Maildir that don't have
>> message-ids in their headers. sup-sync bitches about that rather
>> loudly..  would it be better to artificially construct a message-id?
>
>If this really is a prevalent thing, then yes, I'm happy to fake a
>message-id.

Yeah - I see it a lot. Also seeing mail with missing Date: headers. Most (but
not all) is sent from automated systems, ie: order confirmation, etc.

I've attached a patch which is working for me with message-id.. a bit of a
hack.

>This has nothing to do with RubyMail; Sup simply doesn't play well with
>other clients. Part of the tradeoff I made with Sup was to assume by
>default that the source never changes except through Sup. If that
>assumption fails, Sup should detect it and ask you to run sup-sync
>--changed, which should bring everything back in sync.

Yeah.. just a little inconvient if I'm checking mail via my iPhone then have
to sup-sync before reading when I'm back in front of a terminal. Any issues
with running sup-sync via cron ?

-D
--
<dsully> please describe web 2.0 to me in 2 sentences or less.
<jwb> you make all the content. they keep all the revenue.
-------------- next part --------------
--- message.rb.orig	2007-07-23 11:16:12.000000000 -0700
+++ message.rb	2007-07-23 11:42:15.000000000 -0700
@@ -107,7 +107,8 @@
   def read_header header
     header.each { |k, v| header[k.downcase] = v }
 
-    %w(message-id date).each do |f|
+    #%w(message-id date).each do |f|
+    %w(date).each do |f|
       raise MessageFormatError, "no #{f} field in header #{header.inspect} (source #@source offset #@source_info)" unless header.include? f
       raise MessageFormatError, "nil #{f} field in header #{header.inspect} (source #@source offset #@source_info)" unless header[f]
     end
@@ -124,7 +125,7 @@
     @to = PersonManager.people_for header["to"]
     @cc = PersonManager.people_for header["cc"]
     @bcc = PersonManager.people_for header["bcc"]
-    @id = header["message-id"]
+    @id = header["message-id"] || header["from"].match(/\b(\S+?@\S+)\b/).captures.to_s + "." + @date.to_i.to_s
     @refs = (header["references"] || "").gsub(/[<>]/, "").split(/\s+/).flatten
     @replytos = (header["in-reply-to"] || "").scan(/<(.*?)>/).flatten
     @replyto = PersonManager.person_for header["reply-to"]


  reply	other threads:[~2007-07-24 18:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 17:48 Dan Sully
2007-07-24 17:56 ` William Morgan
2007-07-24 18:13   ` Dan Sully [this message]
2007-07-25  0:05     ` William Morgan

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20070724181358.GA20393@electricrain.com \
    --to=daniel@electricrain.com \
    /path/to/YOUR_REPLY

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

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