You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mailet-api@james.apache.org by Patrick Ruhkopf <pa...@gmail.com> on 2009/04/30 05:40:56 UTC
Access ImapSession from Mailet
Hi,
I would like to develop a Mailet that depends on the ImapState of the
current ImapSession. How do I access the ImapSession object from
within a mailet?
Thanks
Patrick
Re: Access ImapSession from Mailet
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Thu, Apr 30, 2009 at 3:36 PM, Patrick Ruhkopf
<pa...@gmail.com> wrote:
> Hey Robert,
>
> Thanks for the prompt response.
>
> On Thu, Apr 30, 2009 at 6:50 AM, Robert Burrell Donkin
> <ro...@gmail.com> wrote:
>> it would be useful to understand more about your use case
>> in particular which mail process would the mailet execute?
>
> Sure, here's basically what I would like to achieve: Mailet that
> intercepts all reads and writes of a message's body. The catch: Mailet
> needs to access the user name of the current imap session. Does this
> qualify for a mailet use case or am I better off with customizing the
> imap project?
ok - i think i understand a little better now
the easiest way to do this would be by creating a proxy Mailbox to
intercept calls to the data store (rather than using a mailet). some
development would be needed (bringing forward some planned work) but
that shouldn't be a major issue. if you could subscribe to the
server-dev list (don't worry - the traffic isn't high) and restart
this thread over there, then we can discuss the details.
cheers
- robert
Re: Access ImapSession from Mailet
Posted by Patrick Ruhkopf <pa...@gmail.com>.
Hey Robert,
Thanks for the prompt response.
On Thu, Apr 30, 2009 at 6:50 AM, Robert Burrell Donkin
<ro...@gmail.com> wrote:
> it would be useful to understand more about your use case
> in particular which mail process would the mailet execute?
Sure, here's basically what I would like to achieve: Mailet that
intercepts all reads and writes of a message's body. The catch: Mailet
needs to access the user name of the current imap session. Does this
qualify for a mailet use case or am I better off with customizing the
imap project?
Thanks
Patrick
Re: Access ImapSession from Mailet
Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Thu, Apr 30, 2009 at 4:40 AM, Patrick Ruhkopf
<pa...@gmail.com> wrote:
> Hi,
hi patrick
(this is a general list for mailets. i think this question raises
broader API questions so it's fine on here but just FYI - in general -
the server-dev is the best list to post questions the specifics of the
James IMAP implementation.)
> I would like to develop a Mailet that depends on the ImapState of the
> current ImapSession.
(for those who don't know, IMAPSession is used to store information
about the logical client connection)
> How do I access the ImapSession object from
> within a mailet?
a good question
it would be useful to understand more about your use case
in particular which mail process would the mailet execute?
(for example, the spooled processing queue in James server)
- robert