Commit Graph

558 Commits

Author SHA1 Message Date
Manos Pitsidianakis
7bbfd188ef
melib/imap: move current_mailbox to ImapStream
ImapStream holds the connection state (current command id), so it makes
sense to move current_mailbox state there. That way, when a connection
drops for whatever reason the old current_mailbox is dropped and not
carried over to new connections.
2020-07-27 15:06:56 +03:00
Manos Pitsidianakis
32b4c30fee
melib/email.rs: use SmallVec for Address fields 2020-07-27 15:06:56 +03:00
Manos Pitsidianakis
52cec59215
melib/error: add From<&MeliError> for MeliError 2020-07-27 15:04:29 +03:00
Manos Pitsidianakis
cc119c19b0
melib/maildir: send NewFlags events 2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
031e81ac8f
imap: add UntaggedResponse::UIDFetch 2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
f41a1ffe3a
imap: remove FLAGS.SILENT from STOREs
Flag updates were not received, because FLAGS.SILENT was used.
2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
3f8aa560f0
melib/MailBackend: add MailBackendCapabilities struct 2020-07-25 17:53:04 +03:00
Manos Pitsidianakis
5a5408ecd5
imap: small fixes 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
00acba7717
melib/MailBackend: add copy_messages,set_flags,delete_messages methods 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
246ac4b84a
Update smallvec dependency to 1.4.1 2020-07-25 15:19:52 +03:00
Manos Pitsidianakis
1b8529c59c
melib/imap: use LITERAL+ with APPEND
Closes #50
2020-07-25 15:17:35 +03:00
Manos Pitsidianakis
99fbac3806
Remove unused variables/functions 2020-07-23 13:39:58 +03:00
Manos Pitsidianakis
0ee3a0bf79
imap: clear mesage totals when fetching entire mailbox
Totals might have been set after a STATUS response, meaning we know the
totals without knowing exactly what message UIDs are there. Clear the
totals, and start inserting UIDs instead.
2020-07-23 13:23:24 +03:00
Manos Pitsidianakis
6121f77853
imap: support LIST-STATUS 2020-07-23 13:23:24 +03:00
Manos Pitsidianakis
350c8033b1
imap: use ImapLineIterator in imap_mailboxes() 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
e49c293b01
imap: impl DoubleEndedIterator for ImapLineIterator 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
b9343dfb32
imap: update supported capabilities 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
0882dbbad0
melib/Collection: put all fields behind a mutex 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
1112ef4717
melib/Collection: remove unused fields 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
fadb3634e0
melib: take MailboxHash instead of &Mailbox in fetch*() 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
9103d05617
melib: s/get/fetch in MailBackend methods 2020-07-18 12:34:13 +03:00
Manos Pitsidianakis
0a7f283582
imap: prevent deadlock in watch::examine_updates
uid_store.mailboxes was locked before calling examine_updates, which
calls examine_mailbox() which also attempts to lock uid_store.mailboxes
2020-07-17 22:45:25 +03:00
Manos Pitsidianakis
c6c2865a54
melib/thread/iterators: remove recursion in favor of loops 2020-07-17 13:33:40 +03:00
Manos Pitsidianakis
32f196143e
melib: add supports_search() method to MailBackend 2020-07-17 00:02:02 +03:00
Manos Pitsidianakis
d3391e96c0
mbox: send envelope payload in chunks 2020-07-16 17:59:27 +03:00
Manos Pitsidianakis
77dc1d74bf
Add smtp client support for sending mail in UI
`mailer_command` was removed, and a new setting `send_mail` was added.

Its possible values are a string, consisting of a shell command to
execute, or settings to configure an smtp server connection. The
configuration I used for testing this is:

  [composing]
  send_mail = { hostname = "smtp.mail.tld", port = 587, auth = { type = "auto", username = "yoshi", password = { type = "command_eval", value = "gpg2 --no-tty -q -d ~/.passwords/msmtp/yoshi.gpg" } }, security = { type = "STARTTLS" } }

For local smtp server:
  [composing]
  send_mail = { hostname = "localhost", port = 25, auth = { type = "none" }, security = { type = "none" } }
2020-07-15 15:24:01 +03:00
Manos Pitsidianakis
08c462801d
melib/mbox: fix not updating mailbox_index on new envelope 2020-07-15 15:22:33 +03:00
Manos Pitsidianakis
e1c9967260
melib: Small documentation fixes for smtp, thread 2020-07-15 15:22:33 +03:00
Manos Pitsidianakis
4b27ae2b91
melib: Add experimental SMTP client 2020-07-15 15:22:33 +03:00
Manos Pitsidianakis
97c76cc6a1
melib/error: add ErrorKind struct 2020-07-13 21:36:55 +03:00
Manos Pitsidianakis
c7bbf7ed7e
melib: move lookup_ipv4() to connection module 2020-07-13 21:36:55 +03:00
Manos Pitsidianakis
9db6b07b71
Remove some needless clones and stuff (thanks to Clippy) 2020-07-13 21:36:55 +03:00
Manos Pitsidianakis
931863436d
imap: remove blocking imap backend, replace with async 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis
b5748c247a
MailBackend: remove connect() method 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis
f48343ca89
conf/accounts: add is_{async,remote} fields 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis
231471fa8c
MailBackend: add is_{async,online} methods 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis
94e0aa4fe7
MailBackend: change get() ret type to Result<_> 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis
a7e177586a
Fix clippy lints 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis
bbedeed3e3
More imap async fixes 2020-07-06 15:27:06 +03:00
Manos Pitsidianakis
391058a59c
BackendOp: add copy_to() method 2020-07-06 15:26:39 +03:00
Manos Pitsidianakis
b3876113aa
BackendOp: return future in as_bytes() 2020-07-06 15:26:39 +03:00
Manos Pitsidianakis
1ddde9ccba
BackendOp: change fetch_flags() retval to future 2020-07-06 15:26:35 +03:00
Manos Pitsidianakis
ed3e66cedf
BackendOp: remove description() method 2020-07-06 15:26:03 +03:00
Manos Pitsidianakis
e06308fed2
MailBackend: change more methods to Futures 2020-07-06 15:26:00 +03:00
Manos Pitsidianakis
03522c0298
melib: Fixup warnings in imap_async, maildir 2020-07-06 15:25:17 +03:00
Manos Pitsidianakis
6553d8ec44
imap_saync: fix max_uid invariant violation 2020-07-06 15:13:01 +03:00
Manos Pitsidianakis
adb9061adc
imap_async: add force parameter to {examine,select}_mailbox() 2020-07-06 15:13:01 +03:00
Manos Pitsidianakis
42419327f8
imap_async: add operations 2020-07-06 15:13:01 +03:00
Manos Pitsidianakis
c82367e00d
BackendOp: Change set_{flag,tag} methods 2020-07-06 15:12:33 +03:00
Manos Pitsidianakis
8c1fc031e5
BackendOp: change fetch_flags retval to Result<Flag> 2020-07-06 15:12:11 +03:00