Commit Graph

34 Commits (e35a93336a2c0ce081cd05f64986c6f6cdc59077)

Author SHA1 Message Date
Manos Pitsidianakis e35a93336a
Add GPG signing and sig verifying 2019-09-28 12:19:22 +03:00
Manos Pitsidianakis 250129665b
Pass attachment names through decoding
Attachment names in Content-Type parameters can be encoded (eg
=?UTF-8...), so try decoding with phrase() first
2019-09-27 22:21:35 +03:00
Manos Pitsidianakis 68c40a2920
melib: return Result with error when an IO operation fails
Don't unwrap anything because this might be temporary, for example a
short IMAP disconnection.
2019-09-27 13:40:02 +03:00
Manos Pitsidianakis c44056a9ff
melib: fix bug in parser::parts
At a certain point when expecting a line terminator parts() checks for
'\n' but not '\r\n'. This resulted in all multipart attachments coming
from b"\r\n" sources like IMAP having only one part when parsed.
2019-09-26 13:11:54 +03:00
Manos Pitsidianakis 91ae539de1
Small fixes 2019-09-26 13:11:49 +03:00
Manos Pitsidianakis f27b815aa7
Add verification of GPG signed messages 2019-09-26 13:11:08 +03:00
Manos Pitsidianakis 9305e543cf
melib: add a `body` field to Attachment
Attachment needs to know the range of bytes where the body part of the
attachment is located. The Attachment.raw field contains the entire
attachment, headers and body. The new Attachment.body fields contains a
`StrBuilder` which contains the offset and length of the body part inside
`raw`.
2019-09-26 13:10:06 +03:00
Manos Pitsidianakis 6e75160b70
melib: turn unicode algos and backends into features 2019-09-21 21:29:33 +03:00
Manos Pitsidianakis f066f35410
melib: add get_tags to support subaddressing 2019-09-20 21:35:45 +03:00
Manos Pitsidianakis bee1502499
melib: make References public 2019-09-20 10:47:51 +03:00
Manos Pitsidianakis 32fe8a8b9b
melib: move email.rs back 2019-09-20 10:39:24 +03:00
Manos Pitsidianakis 7accae1774
melib: split address.rs from email.rs 2019-09-20 10:38:29 +03:00
Manos Pitsidianakis b08001ca5d
melib: create address.rs from email.rs 2019-09-20 10:37:51 +03:00
Manos Pitsidianakis ecb3fd7f3d
Add dyn keyword to Trait objects
And fix some unused var warnings as well
2019-09-15 13:21:14 +03:00
Manos Pitsidianakis 0812242f60
Add IMAP backend
TODOs: new message events (untagged responses)
2019-09-15 13:21:13 +03:00
Matthias Beyer 79becdcc42
Fix: This comment is not a proper rustdoc comment and probably should not be one anyways
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-02 01:00:54 +03:00
Matthias Beyer fb36dc58c8
Remove unused variable
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-02 01:00:53 +03:00
Manos Pitsidianakis 2492bc91b2
melib: add attachment_from_file() 2019-08-02 01:00:52 +03:00
Manos Pitsidianakis c87ed5012d
melib: add attachment support in email/compose.rs 2019-08-02 00:24:35 +03:00
Manos Pitsidianakis 391e5b5d13
melib: tighten bounds check in email/parser.rs 2019-08-02 00:22:27 +03:00
Manos Pitsidianakis d73069bc80
melib: add Other and OctetStream content types 2019-08-02 00:22:20 +03:00
Manos Pitsidianakis c17bb24f0d
melib: refactor attachments and attachment_types interfaces 2019-07-30 21:33:15 +03:00
Manos Pitsidianakis 572944e917
melib: add version from Cargo manifest to User-Agent field 2019-07-30 19:23:55 +03:00
Manos Pitsidianakis d84ceca88e
create text_processing crate 2019-07-27 01:41:04 +03:00
Manos Pitsidianakis 8ab79d5829
fix missing grapheme in mime encoded string 2019-07-11 17:52:51 +03:00
Manos Pitsidianakis 6906142278
melib: don't exclude whitespaces in mime encoded words 2019-07-06 00:19:25 +03:00
Manos Pitsidianakis f33594fba8
melib: reply to In-Reply-To address if available 2019-06-25 10:37:19 +03:00
Manos Pitsidianakis ba1d0c42e0
melib: add struct and parser for mailto: links 2019-06-18 21:59:50 +03:00
Manos Pitsidianakis 24831b3c13
Fix warnings, lints, and 2018 errors 2019-06-18 21:14:14 +03:00
Manos Pitsidianakis 5a9ee50bbc
don't add newlines in encoded words 2019-06-10 19:40:51 +03:00
Manos Pitsidianakis f0bd999f8c
parser: fix empty header value when header is last or when prefixed with
'\n'

when an empty header is last, the rest of the body keeps getting parsed
as headers. when header starts with '\n' because the value is long, the
value gets parsed as a name and the header parser fails.

closes #100

closes #101

closes #122
2019-06-10 19:40:51 +03:00
Manos Pitsidianakis 8a07087393
add testing crate with emailparse bin 2019-06-10 19:40:51 +03:00
Manos Pitsidianakis d0039740b0
melib: add has_attachments property to Envelope
Check subattachments in has_attachments check.

Instead of getting a flattened attachment view of multipart/mixed (eg
[multipart/mixed, text/plain, text/plain]) get only the subattachments
(eg [text/plain, text/plain]). Don't count text-only multipart/mixed as attachments
2019-06-10 19:40:50 +03:00
Manos Pitsidianakis c6674a294d
melib: unwrap mailbox module 2019-06-10 19:40:50 +03:00