parent
24b4c117e7
commit
bcca9abe66
|
@ -171,7 +171,7 @@ To search in specific fields, prepend your search keyword with "field:" like so:
|
||||||
.Pp
|
.Pp
|
||||||
.D1 not ((from:unrealistic and (to:complex or not "query")) or flags:seen,draft)
|
.D1 not ((from:unrealistic and (to:complex or not "query")) or flags:seen,draft)
|
||||||
.Pp
|
.Pp
|
||||||
.D1 alladdresses:mailing@list.tld and cc:me@domain.tld
|
.D1 alladdresses:mailing@example.com and cc:me@example.com
|
||||||
.Pp
|
.Pp
|
||||||
Boolean operators are
|
Boolean operators are
|
||||||
.Em or Ns
|
.Em or Ns
|
||||||
|
|
|
@ -78,7 +78,7 @@ example configuration
|
||||||
root_mailbox = "/path/to/root/folder"
|
root_mailbox = "/path/to/root/folder"
|
||||||
format = "Maildir"
|
format = "Maildir"
|
||||||
index_style = "Compact"
|
index_style = "Compact"
|
||||||
identity="email@address.tld"
|
identity="email@example.com"
|
||||||
subscribed_mailboxes = ["folder", "folder/Sent"] # or [ "*", ] for all mailboxes
|
subscribed_mailboxes = ["folder", "folder/Sent"] # or [ "*", ] for all mailboxes
|
||||||
display_name = "Name"
|
display_name = "Name"
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ script = "notify-send"
|
||||||
[composing]
|
[composing]
|
||||||
# required for sending e-mail
|
# required for sending e-mail
|
||||||
send_mail = 'msmtp --read-recipients --read-envelope-from'
|
send_mail = 'msmtp --read-recipients --read-envelope-from'
|
||||||
#send_mail = { hostname = "smtp.mail.tld", port = 587, auth = { type = "auto", username = "user", password = { type = "command_eval", value = "gpg2 --no-tty -q -d ~/.passwords/user.gpg" } }, security = { type = "STARTTLS" } }
|
#send_mail = { hostname = "smtp.example.com", port = 587, auth = { type = "auto", username = "user", password = { type = "command_eval", value = "gpg2 --no-tty -q -d ~/.passwords/user.gpg" } }, security = { type = "STARTTLS" } }
|
||||||
editor_command = 'vim +/^$'
|
editor_command = 'vim +/^$'
|
||||||
|
|
||||||
[shortcuts]
|
[shortcuts]
|
||||||
|
@ -152,7 +152,7 @@ plain:shows one row per mail, regardless of threading
|
||||||
.Bl -tag -width 36n
|
.Bl -tag -width 36n
|
||||||
.It Ic display_name Ar String
|
.It Ic display_name Ar String
|
||||||
.Pq Em optional
|
.Pq Em optional
|
||||||
A name which can be combined with your address: "Name <email@address.tld>".
|
A name which can be combined with your address: "Name <email@example.com>".
|
||||||
.It Ic read_only Ar boolean
|
.It Ic read_only Ar boolean
|
||||||
Attempt to not make any changes to this account.
|
Attempt to not make any changes to this account.
|
||||||
.Pq Em false
|
.Pq Em false
|
||||||
|
@ -199,14 +199,14 @@ format = "notmuch"
|
||||||
[accounts.notmuch.mailboxes]
|
[accounts.notmuch.mailboxes]
|
||||||
"INBOX" = { query="tag:inbox", subscribe = true }
|
"INBOX" = { query="tag:inbox", subscribe = true }
|
||||||
"Drafts" = { query="tag:draft", subscribe = true }
|
"Drafts" = { query="tag:draft", subscribe = true }
|
||||||
"Sent" = { query="from:username@server.tld from:username2@server.tld", subscribe = true }
|
"Sent" = { query="from:username@example.com from:username2@example.com", subscribe = true }
|
||||||
.Ed
|
.Ed
|
||||||
.Ss IMAP only
|
.Ss IMAP only
|
||||||
IMAP specific options are:
|
IMAP specific options are:
|
||||||
.Bl -tag -width 36n
|
.Bl -tag -width 36n
|
||||||
.It Ic server_hostname Ar String
|
.It Ic server_hostname Ar String
|
||||||
example:
|
example:
|
||||||
.Qq mail.example.tld
|
.Qq mail.example.com
|
||||||
.It Ic server_username Ar String
|
.It Ic server_username Ar String
|
||||||
Server username
|
Server username
|
||||||
.It Ic server_password Ar String
|
.It Ic server_password Ar String
|
||||||
|
@ -295,7 +295,7 @@ JMAP specific options
|
||||||
.Bl -tag -width 36n
|
.Bl -tag -width 36n
|
||||||
.It Ic server_hostname Ar String
|
.It Ic server_hostname Ar String
|
||||||
example:
|
example:
|
||||||
.Qq mail.example.tld
|
.Qq mail.example.com
|
||||||
.It Ic server_username Ar String
|
.It Ic server_username Ar String
|
||||||
Server username
|
Server username
|
||||||
.It Ic server_password Ar String
|
.It Ic server_password Ar String
|
||||||
|
@ -403,9 +403,9 @@ and
|
||||||
\&.
|
\&.
|
||||||
Example:
|
Example:
|
||||||
.Bd -literal
|
.Bd -literal
|
||||||
[accounts."imap.domain.tld".mailboxes."INBOX"]
|
[accounts."imap.example.com".mailboxes."INBOX"]
|
||||||
index_style = "plain"
|
index_style = "plain"
|
||||||
[accounts."imap.domain.tld".mailboxes."INBOX".pager]
|
[accounts."imap.example.com".mailboxes."INBOX".pager]
|
||||||
filter = ""
|
filter = ""
|
||||||
.Ed
|
.Ed
|
||||||
.El
|
.El
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#root_mailbox = "/path/to/root/mailbox"
|
#root_mailbox = "/path/to/root/mailbox"
|
||||||
#format = "Maildir"
|
#format = "Maildir"
|
||||||
#index_style = "Conversations" # or [plain, threaded, compact]
|
#index_style = "Conversations" # or [plain, threaded, compact]
|
||||||
#identity="email@address.tld"
|
#identity="email@example.com"
|
||||||
#display_name = "Name"
|
#display_name = "Name"
|
||||||
#subscribed_mailboxes = ["INBOX", "INBOX/Sent", "INBOX/Drafts", "INBOX/Junk"]
|
#subscribed_mailboxes = ["INBOX", "INBOX/Sent", "INBOX/Drafts", "INBOX/Junk"]
|
||||||
#
|
#
|
||||||
|
@ -33,14 +33,14 @@
|
||||||
#[accounts."imap"]
|
#[accounts."imap"]
|
||||||
#root_mailbox = "INBOX"
|
#root_mailbox = "INBOX"
|
||||||
#format = "imap"
|
#format = "imap"
|
||||||
#server_hostname="mail.server.tld"
|
#server_hostname="mail.example.com"
|
||||||
#server_password="pha2hiLohs2eeeish2phaii1We3ood4chakaiv0hien2ahie3m"
|
#server_password="pha2hiLohs2eeeish2phaii1We3ood4chakaiv0hien2ahie3m"
|
||||||
#server_username="username@server.tld"
|
#server_username="username@example.com"
|
||||||
#server_port="993" # imaps
|
#server_port="993" # imaps
|
||||||
#server_port="143" # STARTTLS
|
#server_port="143" # STARTTLS
|
||||||
#use_starttls=true #optional
|
#use_starttls=true #optional
|
||||||
#index_style = "Conversations"
|
#index_style = "Conversations"
|
||||||
#identity = "username@server.tld"
|
#identity = "username@example.com"
|
||||||
#display_name = "Name Name"
|
#display_name = "Name Name"
|
||||||
### match every mailbox:
|
### match every mailbox:
|
||||||
#subscribed_mailboxes = ["*" ]
|
#subscribed_mailboxes = ["*" ]
|
||||||
|
@ -52,13 +52,13 @@
|
||||||
#root_mailbox = "/path/to/folder" # where .notmuch/ directory is located
|
#root_mailbox = "/path/to/folder" # where .notmuch/ directory is located
|
||||||
#format = "notmuch"
|
#format = "notmuch"
|
||||||
#index_style = "conversations"
|
#index_style = "conversations"
|
||||||
#identity="username@server.tld"
|
#identity="username@example.com"
|
||||||
#display_name = "Name Name"
|
#display_name = "Name Name"
|
||||||
# # notmuch mailboxes are virtual, they are defined by their alias and the notmuch query that corresponds to their content.
|
# # notmuch mailboxes are virtual, they are defined by their alias and the notmuch query that corresponds to their content.
|
||||||
# [accounts.notmuch.mailboxes]
|
# [accounts.notmuch.mailboxes]
|
||||||
# "INBOX" = { query="tag:inbox", subscribe = true }
|
# "INBOX" = { query="tag:inbox", subscribe = true }
|
||||||
# "Drafts" = { query="tag:draft", subscribe = true }
|
# "Drafts" = { query="tag:draft", subscribe = true }
|
||||||
# "Sent" = { query="from:username@server.tld from:username2@server.tld", subscribe = true }
|
# "Sent" = { query="from:username@example.com from:username2@example.com", subscribe = true }
|
||||||
#
|
#
|
||||||
## Setting up a Gmail account
|
## Setting up a Gmail account
|
||||||
#[accounts."gmail"]
|
#[accounts."gmail"]
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
#server_username="username@gmail.com"
|
#server_username="username@gmail.com"
|
||||||
#server_port="993"
|
#server_port="993"
|
||||||
#index_style = "Conversations"
|
#index_style = "Conversations"
|
||||||
#identity = "username@server.tld"
|
#identity = "username@gmail.com"
|
||||||
#display_name = "Name Name"
|
#display_name = "Name Name"
|
||||||
### match every mailbox:
|
### match every mailbox:
|
||||||
#subscribed_mailboxes = ["*" ]
|
#subscribed_mailboxes = ["*" ]
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
#[composing]
|
#[composing]
|
||||||
##required for sending e-mail
|
##required for sending e-mail
|
||||||
#send_mail = 'msmtp --read-recipients --read-envelope-from'
|
#send_mail = 'msmtp --read-recipients --read-envelope-from'
|
||||||
##send_mail = { hostname = "smtp.mail.tld", port = 587, auth = { type = "auto", username = "user", password = { type = "command_eval", value = "gpg2 --no-tty -q -d ~/.passwords/user.gpg" } }, security = { type = "STARTTLS" } }
|
##send_mail = { hostname = "smtp.example.com", port = 587, auth = { type = "auto", username = "user", password = { type = "command_eval", value = "gpg2 --no-tty -q -d ~/.passwords/user.gpg" } }, security = { type = "STARTTLS" } }
|
||||||
#editor_command = 'vim +/^$' # optional, by default $EDITOR is used.
|
#editor_command = 'vim +/^$' # optional, by default $EDITOR is used.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
|
@ -29,11 +29,11 @@ and body structure. Addresses in `To`, `From` fields etc are parsed into
|
||||||
```rust
|
```rust
|
||||||
use melib::{Attachment, Envelope};
|
use melib::{Attachment, Envelope};
|
||||||
|
|
||||||
let raw_mail = r#"From: "some name" <some@address.com>
|
let raw_mail = r#"From: "some name" <some@example.com>
|
||||||
To: "me" <myself@i.tld>
|
To: "me" <myself@example.com>
|
||||||
Cc:
|
Cc:
|
||||||
Subject: =?utf-8?Q?gratuitously_encoded_subject?=
|
Subject: =?utf-8?Q?gratuitously_encoded_subject?=
|
||||||
Message-ID: <h2g7f.z0gy2pgaen5m@address.com>
|
Message-ID: <h2g7f.z0gy2pgaen5m@example.com>
|
||||||
MIME-Version: 1.0
|
MIME-Version: 1.0
|
||||||
Content-Type: multipart/mixed; charset="utf-8";
|
Content-Type: multipart/mixed; charset="utf-8";
|
||||||
boundary="bzz_bzz__bzz__"
|
boundary="bzz_bzz__bzz__"
|
||||||
|
@ -74,7 +74,7 @@ ouiijDaaCCGQRgrpH3q4QYYXWDihxBE+7KCDDjnUIEVAADs=
|
||||||
|
|
||||||
let envelope = Envelope::from_bytes(raw_mail.as_bytes(), None).expect("Could not parse mail");
|
let envelope = Envelope::from_bytes(raw_mail.as_bytes(), None).expect("Could not parse mail");
|
||||||
assert_eq!(envelope.subject().as_ref(), "gratuitously encoded subject");
|
assert_eq!(envelope.subject().as_ref(), "gratuitously encoded subject");
|
||||||
assert_eq!(envelope.message_id_display().as_ref(), "<h2g7f.z0gy2pgaen5m@address.com>");
|
assert_eq!(envelope.message_id_display().as_ref(), "<h2g7f.z0gy2pgaen5m@example.com>");
|
||||||
|
|
||||||
let body = envelope.body_bytes(raw_mail.as_bytes());
|
let body = envelope.body_bytes(raw_mail.as_bytes());
|
||||||
assert_eq!(body.content_type().to_string().as_str(), "multipart/mixed");
|
assert_eq!(body.content_type().to_string().as_str(), "multipart/mixed");
|
||||||
|
|
|
@ -30,11 +30,11 @@
|
||||||
* ```
|
* ```
|
||||||
* use melib::{Attachment, Envelope};
|
* use melib::{Attachment, Envelope};
|
||||||
*
|
*
|
||||||
* let raw_mail = r#"From: "some name" <some@address.com>
|
* let raw_mail = r#"From: "some name" <some@example.com>
|
||||||
* To: "me" <myself@i.tld>
|
* To: "me" <myself@example.com>
|
||||||
* Cc:
|
* Cc:
|
||||||
* Subject: =?utf-8?Q?gratuitously_encoded_subject?=
|
* Subject: =?utf-8?Q?gratuitously_encoded_subject?=
|
||||||
* Message-ID: <h2g7f.z0gy2pgaen5m@address.com>
|
* Message-ID: <h2g7f.z0gy2pgaen5m@example.com>
|
||||||
* MIME-Version: 1.0
|
* MIME-Version: 1.0
|
||||||
* Content-Type: multipart/mixed; charset="utf-8";
|
* Content-Type: multipart/mixed; charset="utf-8";
|
||||||
* boundary="bzz_bzz__bzz__"
|
* boundary="bzz_bzz__bzz__"
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
*
|
*
|
||||||
* let envelope = Envelope::from_bytes(raw_mail.as_bytes(), None).expect("Could not parse mail");
|
* let envelope = Envelope::from_bytes(raw_mail.as_bytes(), None).expect("Could not parse mail");
|
||||||
* assert_eq!(envelope.subject().as_ref(), "gratuitously encoded subject");
|
* assert_eq!(envelope.subject().as_ref(), "gratuitously encoded subject");
|
||||||
* assert_eq!(envelope.message_id_display().as_ref(), "<h2g7f.z0gy2pgaen5m@address.com>");
|
* assert_eq!(envelope.message_id_display().as_ref(), "<h2g7f.z0gy2pgaen5m@example.com>");
|
||||||
*
|
*
|
||||||
* let body = envelope.body_bytes(raw_mail.as_bytes());
|
* let body = envelope.body_bytes(raw_mail.as_bytes());
|
||||||
* assert_eq!(body.content_type().to_string().as_str(), "multipart/mixed");
|
* assert_eq!(body.content_type().to_string().as_str(), "multipart/mixed");
|
||||||
|
|
|
@ -8,7 +8,7 @@ This crate holds a collection of small binaries used for meli development. Of no
|
||||||
cd tools/
|
cd tools/
|
||||||
cargo build --bin imapshell
|
cargo build --bin imapshell
|
||||||
# Usage: imap_conn server_hostname server_username server_password server_port
|
# Usage: imap_conn server_hostname server_username server_password server_port
|
||||||
rlwrap ./target/debug/imapshell "mail.domain.tld" "epilys@domain.tld" "hunter2" 143
|
rlwrap ./target/debug/imapshell "mail.example.com" "epilys@example.com" "hunter2" 143
|
||||||
```
|
```
|
||||||
|
|
||||||
Example session:
|
Example session:
|
||||||
|
@ -18,7 +18,7 @@ First, the IMAP connections performs its own non-interactive setup:
|
||||||
```text
|
```text
|
||||||
[2020-08-27 17:11:33]["main"] melib/src/backends/imap/connection.rs:459_25: sent: M1 CAPABILITY
|
[2020-08-27 17:11:33]["main"] melib/src/backends/imap/connection.rs:459_25: sent: M1 CAPABILITY
|
||||||
[2020-08-27 17:11:33]["main"] melib/src/backends/imap/connection.rs:408_33: &ret[last_line_idx..] = "M1 OK Pre-login capabilities listed, post-login capabilities have more.\r\n"
|
[2020-08-27 17:11:33]["main"] melib/src/backends/imap/connection.rs:408_33: &ret[last_line_idx..] = "M1 OK Pre-login capabilities listed, post-login capabilities have more.\r\n"
|
||||||
[2020-08-27 17:11:33]["main"] melib/src/backends/imap/connection.rs:459_25: sent: M2 LOGIN "epilys@domain.tld" "hunter2"
|
[2020-08-27 17:11:33]["main"] melib/src/backends/imap/connection.rs:459_25: sent: M2 LOGIN "epilys@example.com" "hunter2"
|
||||||
[2020-08-27 17:11:34]["main"] melib/src/backends/imap/connection.rs:459_25: sent: M3 CAPABILITY
|
[2020-08-27 17:11:34]["main"] melib/src/backends/imap/connection.rs:459_25: sent: M3 CAPABILITY
|
||||||
[2020-08-27 17:11:34]["main"] melib/src/backends/imap/connection.rs:408_33: &ret[last_line_idx..] = "M3 OK Capability completed (0.000 + 0.120 + 0.119 secs).\r\n"
|
[2020-08-27 17:11:34]["main"] melib/src/backends/imap/connection.rs:408_33: &ret[last_line_idx..] = "M3 OK Capability completed (0.000 + 0.120 + 0.119 secs).\r\n"
|
||||||
[2020-08-27 17:11:34]["main"] melib/src/backends/imap/connection.rs:459_25: sent: M4 ENABLE CONDSTORE
|
[2020-08-27 17:11:34]["main"] melib/src/backends/imap/connection.rs:459_25: sent: M4 ENABLE CONDSTORE
|
||||||
|
|
Loading…
Reference in New Issue