aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rfc822
Commit message (Collapse)AuthorAgeFilesLines
* rfc822: properly parse address listsRobin Jarry2024-06-291-10/+7
| | | | | | | | | | | | | | | | h.Text() parses blobs of encoded text without taking into account specific handling for email addresses. h.AddressList(key) uses mail.ParseAddressList(h.Get(key)) already deals with charsets and quoted-printable stuff. Pass it the raw header value. In some cases, mail.ParseAddressList will return a list of addresses *and* an UnknownCharset error. In this specific case, ignore the error. Fixes: https://todo.sr.ht/~rjarry/aerc/257 Reported-by: Inwit <inwit@sindominio.net> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Inwit <inwit@sindominio.net> Reviewed-by: Tristan Partin <tristan@partin.io>
* log: move package to libRobin Jarry2024-02-141-1/+1
| | | | | | | This has nothing to do at the root of the source tree. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
* rfc822: modify unit tests for message date parsingVitaly Ovchinnikov2024-01-171-6/+21
| | | | | | | | | | | Modify the message date parser tests so they accept all the possible parsing results, depending on the user's locale settings. Fixes: 49a8cf10935f ("rfc822: improve dates parsing") Reported-by: Jason Cox <me@jasoncarloscox.com> Signed-off-by: Vitaly Ovchinnikov <v@ovch.ru> Tested-by: Jason Cox <me@jasoncarloscox.com> Acked-by: Robin Jarry <robin@jarry.cc>
* rfc822: improve dates parsingVitaly Ovchinnikov2023-12-302-10/+91
| | | | | | | | Provide better parsing of email dates with timezone names, but without numeric offsets. Add unit tests to check the new behaviour. Signed-off-by: Vitaly Ovchinnikov <v@ovch.ru> Acked-by: Robin Jarry <robin@jarry.cc>
* worker: move shared code to libRobin Jarry2023-10-284-0/+538
Avoid importing code from worker/lib into lib. It should only be the other way around. Move the message parsing code used by maildir, notmuch, mbox and the eml viewer into a lib/rfc822 package. Adapt imports accordingly. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Koni Marti <koni.marti@gmail.com> Tested-by: Moritz Poldrack <moritz@poldrack.dev> Tested-by: Inwit <inwit@sindominio.net>