Discussions of development and use of the Sup email client
 help / color / mirror / Atom feed
* Editing names before they're indexed
@ 2015-05-11 17:50 Michael Parks
  2015-05-11 19:59 ` [sup] " Ruthard Baudach
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Parks @ 2015-05-11 17:50 UTC (permalink / raw)
  To: supmua


[-- Attachment #1.1: Type: text/plain, Size: 1985 bytes --]

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):

To: : "Lockman, Xavier" <Xavier.Lockman@company.com>, #Engineering
    <Engineering@company.com>, "Medhurst, Louisa"
    <Louisa.Medhurst@company.com>, "Koss, Lucius"
    <Lucius.Koss@company.com>, "Mufeeda-Nazari, Judi"
    <Judi.Mufeedanazari@company.com>, "Tranter, Lilian"
    <Lilian.Tranter@company.com>, "Kingsmill, Jeremy" 
<Jeremy.Kingsmill@company.com>, "Rowan,
 Mary" <Mary.Rowan@company.com>, "Abdullahi, Abraham"
    <Abraham.Abdullahi@company.com>, "McMinn,
 Matthew" <Matthew.Mcminn@company.com>


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?

[-- Attachment #1.2: Type: text/html, Size: 3242 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-16 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-11 17:50 Editing names before they're indexed Michael Parks
2015-05-11 19:59 ` [sup] " Ruthard Baudach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox