Me again - thanks for the previous help on that indexing thing. Hooks are definitely the way to go!
I've got another issue which I think i've tracked down the reason for. I currently get my work email (hosted on an Exchange server) via Davmail, which provides the IMAP port I use with offlineimap which pulls into sup.
Not at all confusing, right?
Horrible exchange server -> Davmail -> Offlineimap -> Sup
What's happening is somewhere along the line, the header lines containing the from/to/cc/etc addresses are getting mangled. I'm not sure where in the chain this is happening, but it manifests in the headers as random applications of newline characters. What this means is that Sup sees people's names as something like, for my name, 'Michael"'.
Here's one of the crocked headers (don't worry, these names are all bogus):
In this case, Mary Rowan and Matthew McMinn's names would be indexed as 'Mary"' and 'Matthew"', with their last names being lost entirely.
What i'd like to be able to do is play with the message header before it's processed and broken down into its component people. I've got a regex which I can use with String#split to rewrite the names into a more sane format (and by "more sane", I mean "with newlines after each name<email> pair").
However, it looks like all of Sup's hooks take effect after this processing has already been completed.
Is there a supported way to tweak the incoming messages before they're processed?