From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 739650830336 X-Gmail-Labels: Topic type: DISCUSSION X-Google-Groups: supmua X-Google-Thread: 3030fda1bf,545a92579e5dbaca X-Google-Attributes: gid3030fda1bf,domainid0,public,googlegroup X-Google-NewGroupId: yes X-Received: by 10.180.106.10 with SMTP id gq10mr3140175wib.0.1431788646110; Sat, 16 May 2015 08:04:06 -0700 (PDT) X-BeenThere: supmua@googlegroups.com Received: by 10.180.109.69 with SMTP id hq5ls130463wib.7.gmail; Sat, 16 May 2015 08:04:05 -0700 (PDT) X-Received: by 10.180.98.130 with SMTP id ei2mr3145979wib.0.1431788645445; Sat, 16 May 2015 08:04:05 -0700 (PDT) Return-Path: Received: from mout.web.de (mout.web.de. [212.227.17.12]) by gmr-mx.google.com with ESMTPS id u10si90859wif.1.2015.05.16.08.04.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 May 2015 08:04:05 -0700 (PDT) Received-SPF: pass (google.com: domain of ruthard.baudach@web.de designates 212.227.17.12 as permitted sender) client-ip=212.227.17.12; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ruthard.baudach@web.de designates 212.227.17.12 as permitted sender) smtp.mail=ruthard.baudach@web.de Received: from localhost ([92.74.107.222]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0LxwiW-1ZEcQC2rDA-015HXb for ; Sat, 16 May 2015 17:04:04 +0200 From: Ruthard Baudach To: supmua Subject: Re: [sup] Editing names before they're indexed In-reply-to: <1743381a-df32-477b-82fb-266f3bed8099@googlegroups.com> References: <1743381a-df32-477b-82fb-266f3bed8099@googlegroups.com> Date: Mon, 11 May 2015 21:59:02 +0200 Message-Id: <1431373485-sup-608@ruthard-lappi> User-Agent: Sup/0.21.0 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=-1431374346-409472-4161-3257-2-=" X-Provags-ID: V03:K0:MChsWqpf/xtMLBfilJqq5ssycXe6v/q5toItZv9kKbyhIcQuNCw ErU3Vxg3VSp7oUQTloJs+/8KxJFl+dn7HhZcCE0i66xYDiRuVJppCChNorwgQhT4xx16SW0 UEO3V0MuJCN1AM8sQBKECu9FSBtWHToSDy3AwdgZroIxGd5XU4Mv5ObxGkItTfmf/GEV/jw 5QGd6FLwjKlBsOQgbTe2g== X-UI-Out-Filterresults: notjunk:1; --=-1431374346-409472-4161-3257-2-= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Again I'm afraid this is not a sup problem, but a RMail related one. As far as I was able to decifer the source code of sup, sup never sees the raw email data, but uses RMail to read the sources, building a Redwood::Message object wrapping a RMail::Message object. Thus I see the following possibilities to solve this problem a) fix the chain "Horrible exchange server -> Davmail -> Offlineimap" b) file a bug with RMail (I'm not shure -- did the sup team took responsibility for RMail a few years ago?) c) create a script reformatting the emails in your local maildir and call this from the before-poll hook d) If you got a working solution to parse these crippeled address lines, contribute it to RMail Ruthard Baudach >=3D=3D Ausz=C3=BCge aus der Nachricht von Michael Parks vom 2015-05-11 = 10:50: > Me again - thanks for the previous help on that indexing thing. Hooks a= re = > 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 su= p. > = > Not at all confusing, right? > = > Horrible exchange server -> Davmail -> Offlineimap -> Sup > = > What's happening is somewhere along the line, the header lines containi= ng = > 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 bog= us): > = > To: : "Lockman, Xavier" , #Engineering > , "Medhurst, Louisa" > , "Koss, Lucius" > , "Mufeeda-Nazari, Judi" > , "Tranter, Lilian" > , "Kingsmill, Jeremy" = > , "Rowan, > Mary" , "Abdullahi, Abraham" > , "McMinn, > Matthew" > = > = > 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 i= t's = > processed and broken down into its component people. I've got a regex w= hich = > I can use with String#split to rewrite the names into a more sane forma= t = > (and by "more sane", I mean "with newlines after each name pair"= ). > = > However, it looks like all of Sup's hooks take effect after this proces= sing = > has already been completed. > = > Is there a supported way to tweak the incoming messages before they're = > processed? -- Emails bitte verschl=C3=BCsseln und signieren. Meine PGP-Id: 0xAC5AC6C2 --=-1431374346-409472-4161-3257-2-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVUQoGAAoJEA852hysWsbCy6cIAK4Lbbc6MjQKB48ywTQ7JFSY RoQtIwgCxOkmJnwV1778/JI4wxwhomRasE6p25UYJ8QdPp+TG/O+Rmo6qozoK1Pd aK3KmxyB0i6a2Olkyfsv4fBjuuyfV1s74onpigQttK5t4fnlpFFQMFpEbSQBj7s8 rco0bprdLIZEZUQOXQTrubnbGDUS/WUdmokIWKFyq/xbus7fgUUDL6R57DijgX84 +Om0B9RKPygSS2mxupq0CX4EsMaVGQ1AXRJTqntyaOtBuoG7wAO8jWe212IyQTNp NytLtsco1ea6xY+jWm5hTOUoDrP+tzGG4YIftdWIKk03jdSuvEFKwN/7d8jIh/A= =CDsG -----END PGP SIGNATURE----- --=-1431374346-409472-4161-3257-2-=--