[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-talk] multiple accounts



Excerpts from d.t.k's message of Mi Mai 11 12:41:14 +0200 2011:
> Excerpts from Patrick Totzke's message of Mi Mai 11 11:41:44 +0200 2011:
> > I agree: a single send-sink seems totally unnatural.
> > In fact, we have the same problem with drafts.
> yeah, actually I can think of some more situations in which I would wish for
> account specific sources: I'd love to add a :spam_source (e.g. 'Junk') and a :ham_source (e.g. INBOX) where mails
> are moved when the 'spam' label is set/removed, so that operation is mapped onto
> folders (I use a server side spamassassin to automagically learn from specified
> folders)
>
> > I recently mentioned both shortcomings on sup-devel
> > (http://rubyforge.org/pipermail/sup-devel/2011-May/001095.html).
> > As you say: a quick glance at the code confirms that one can only
> > specify one send-sink, as well as draft-sink.
> > However, there is some sort of "DraftManager" object. I guess one can
> > play with that..
> actually, as a dirty hack it shouldn't be too hard to do: message objects know
> about their sources. Now we could reference the account a source belongs to in
> every source in addition to fields like labels, usual, archived, etc. Et voila.
> From the related account we could then get any required sink: draft, sent, spam,
> ham, ...
uah, what was I thinking? Actually, for the first two cases (draft, sent), it
should be /way/ easier. There already /is/ a mechanism for correllating those
messages to an account. I think it is acceptable to assume that sent mails as
well as drafts have the from: header (which is most probably where the acct
correllation hooks in) set (this may not be true for the spam/ham scenario). So
since there is a mechanism to get the account to such a mail, all we would need
to do is to provide account objects with a :sent_source and a :draft_source of
type location. Case solved.

Now that's gonna be easy ;)
dtk

PS depending on the direction this discussion is taking, I wonder whether I
should subscribe to and include sup-devel :|
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk