Compare commits

..

No commits in common. "a88843669a55bd3ed8b26b6c2f5293b69eb3cfeb" and "d7c4abf2e3f708aab12631c1da900312ee146474" have entirely different histories.

31 changed files with 351 additions and 419 deletions

317
Cargo.lock generated
View file

@ -78,9 +78,9 @@ checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd"
[[package]]
name = "allocator-api2"
version = "0.2.20"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9"
checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
[[package]]
name = "android-tzdata"
@ -152,7 +152,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "367fd0ad87307588d087544707bc5fbf4805ded96c7db922b70d368fa1cb5702"
dependencies = [
"unicode-width 0.1.14",
"unicode-width",
"yansi",
]
@ -206,9 +206,9 @@ dependencies = [
[[package]]
name = "async-io"
version = "2.4.0"
version = "2.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059"
checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8"
dependencies = [
"async-lock",
"cfg-if",
@ -261,7 +261,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -296,7 +296,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -432,17 +432,17 @@ checksum = "e0af050e27e5d57aa14975f97fe47a134c46a390f91819f23a625319a7111bfa"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
name = "bstr"
version = "1.11.0"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22"
checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c"
dependencies = [
"memchr",
"regex-automata 0.4.9",
"regex-automata 0.4.8",
"serde",
]
@ -509,9 +509,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.2.1"
version = "1.1.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47"
checksum = "0f57c4b4da2a9d619dd035f27316d7a426305b75be93d09e92f2b9229c34feaf"
dependencies = [
"jobserver",
"libc",
@ -594,9 +594,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.21"
version = "4.5.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f"
checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
dependencies = [
"clap_builder",
"clap_derive",
@ -604,9 +604,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.21"
version = "4.5.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec"
checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
dependencies = [
"anstream",
"anstyle",
@ -617,9 +617,9 @@ dependencies = [
[[package]]
name = "clap_complete"
version = "4.5.38"
version = "4.5.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01"
checksum = "11611dca53440593f38e6b25ec629de50b14cdfa63adc0fb856115a2c6d97595"
dependencies = [
"clap",
]
@ -633,14 +633,14 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
name = "clap_lex"
version = "0.7.3"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7"
checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
[[package]]
name = "clap_mangen"
@ -697,14 +697,14 @@ dependencies = [
[[package]]
name = "comfy-table"
version = "7.1.3"
version = "7.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24f165e7b643266ea80cb858aed492ad9280e3e05ce24d4a99d7d7b889b6a4d9"
checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7"
dependencies = [
"crossterm 0.28.1",
"crossterm 0.27.0",
"strum",
"strum_macros",
"unicode-width 0.2.0",
"unicode-width",
]
[[package]]
@ -759,9 +759,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "cpufeatures"
version = "0.2.15"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6"
checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0"
dependencies = [
"libc",
]
@ -839,19 +839,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "crossterm"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
dependencies = [
"bitflags 2.6.0",
"crossterm_winapi",
"parking_lot 0.12.3",
"rustix",
"winapi",
]
[[package]]
name = "crossterm_winapi"
version = "0.9.1"
@ -917,7 +904,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -1143,7 +1130,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -1220,7 +1207,7 @@ dependencies = [
[[package]]
name = "email-lib"
version = "0.26.0"
source = "git+https://github.com/pimalaya/core#2f405c35ea6c29a16d127baaa86740b33c06081d"
source = "git+https://github.com/pimalaya/core#afa6403c2c596d3d8c90dee26b57d57a8cce635c"
dependencies = [
"async-trait",
"chrono",
@ -1229,7 +1216,7 @@ dependencies = [
"email_address",
"futures",
"hickory-resolver",
"http-lib",
"http-lib 0.1.0 (git+https://github.com/pimalaya/core)",
"imap-client",
"imap-next",
"keyring-lib",
@ -1240,7 +1227,7 @@ dependencies = [
"mml-lib",
"notify",
"notmuch",
"oauth-lib",
"oauth-lib 1.0.0 (git+https://github.com/pimalaya/core)",
"once_cell",
"ouroboros",
"paste",
@ -1269,7 +1256,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f24a09fd651027f8764f8a12c12358715cb9bab622ab3125ede3dd6ae047c95"
dependencies = [
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -1302,7 +1289,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -1323,7 +1310,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -1375,9 +1362,9 @@ dependencies = [
[[package]]
name = "fastrand"
version = "2.2.0"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4"
checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
[[package]]
name = "ff"
@ -1415,9 +1402,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
[[package]]
name = "flate2"
version = "1.0.35"
version = "1.0.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0"
dependencies = [
"crc32fast",
"miniz_oxide 0.8.0",
@ -1519,9 +1506,9 @@ checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
[[package]]
name = "futures-lite"
version = "2.5.0"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1"
checksum = "3f1fa2f9765705486b33fd2acf1577f8ec449c2ba1f318ae5447697b7c08d210"
dependencies = [
"fastrand",
"futures-core",
@ -1538,7 +1525,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -1830,9 +1817,9 @@ dependencies = [
[[package]]
name = "hoot"
version = "0.2.6"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9faf289df1f00f6daaa1bcce481f6ef7f28f153a8ef985409914d357c9cd57a2"
checksum = "6a018c1f2075066355e95ac5ab7909d35a84c9d14d1fae84c4bacdf6dec188d8"
dependencies = [
"http",
"httparse",
@ -1865,7 +1852,19 @@ dependencies = [
[[package]]
name = "http-lib"
version = "0.1.0"
source = "git+https://github.com/pimalaya/core#2f405c35ea6c29a16d127baaa86740b33c06081d"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "994cbd23c90551cb5821d1c9d9b1e41383f338b31fc122671edc7d1695a61338"
dependencies = [
"thiserror",
"tokio",
"tracing",
"ureq",
]
[[package]]
name = "http-lib"
version = "0.1.0"
source = "git+https://github.com/pimalaya/core#afa6403c2c596d3d8c90dee26b57d57a8cce635c"
dependencies = [
"thiserror",
"tokio",
@ -2017,7 +2016,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -2181,7 +2180,7 @@ dependencies = [
"newline-converter",
"once_cell",
"unicode-segmentation",
"unicode-width 0.1.14",
"unicode-width",
]
[[package]]
@ -2219,9 +2218,9 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "itoa"
version = "1.0.13"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2"
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "jni"
@ -2282,7 +2281,7 @@ dependencies = [
"log",
"secret-service",
"security-framework 2.11.1",
"security-framework 3.0.1",
"security-framework 3.0.0",
"windows-sys 0.59.0",
"zbus",
]
@ -2290,7 +2289,7 @@ dependencies = [
[[package]]
name = "keyring-lib"
version = "1.0.2"
source = "git+https://github.com/pimalaya/core#2f405c35ea6c29a16d127baaa86740b33c06081d"
source = "git+https://github.com/pimalaya/core#afa6403c2c596d3d8c90dee26b57d57a8cce635c"
dependencies = [
"keyring",
"once_cell",
@ -2331,9 +2330,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.164"
version = "0.2.161"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f"
checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
[[package]]
name = "libdbus-sys"
@ -2352,7 +2351,9 @@ checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224"
dependencies = [
"cc",
"libc",
"libssh2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
]
@ -2384,6 +2385,20 @@ dependencies = [
"redox_syscall 0.5.7",
]
[[package]]
name = "libssh2-sys"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee"
dependencies = [
"cc",
"libc",
"libz-sys",
"openssl-sys",
"pkg-config",
"vcpkg",
]
[[package]]
name = "libz-sys"
version = "1.1.20"
@ -2475,7 +2490,7 @@ checksum = "7a575d25cf00ed68e5790b473b29242a47e991c6187785d47b45e31fc5816554"
dependencies = [
"base64 0.22.1",
"gethostname",
"rustls 0.23.17",
"rustls 0.23.16",
"rustls-pki-types",
"smtp-proto",
"tokio",
@ -2600,7 +2615,7 @@ dependencies = [
[[package]]
name = "mml-lib"
version = "1.1.0"
source = "git+https://github.com/pimalaya/core#2f405c35ea6c29a16d127baaa86740b33c06081d"
source = "git+https://github.com/pimalaya/core#afa6403c2c596d3d8c90dee26b57d57a8cce635c"
dependencies = [
"async-recursion",
"chumsky",
@ -2752,7 +2767,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -2799,9 +2814,22 @@ dependencies = [
[[package]]
name = "oauth-lib"
version = "1.0.0"
source = "git+https://github.com/pimalaya/core#2f405c35ea6c29a16d127baaa86740b33c06081d"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d936e2859cd8769d97a035df0886e0a8c487d916415b4ad3802ecd5a86664452"
dependencies = [
"http-lib",
"http-lib 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"oauth2",
"thiserror",
"tokio",
"tracing",
]
[[package]]
name = "oauth-lib"
version = "1.0.0"
source = "git+https://github.com/pimalaya/core#afa6403c2c596d3d8c90dee26b57d57a8cce635c"
dependencies = [
"http-lib 0.1.0 (git+https://github.com/pimalaya/core)",
"oauth2",
"thiserror",
"tokio",
@ -2848,6 +2876,18 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-sys"
version = "0.9.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741"
dependencies = [
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "option-ext"
version = "0.2.0"
@ -3072,11 +3112,11 @@ dependencies = [
[[package]]
name = "pgp-lib"
version = "1.0.0"
source = "git+https://github.com/pimalaya/core#2f405c35ea6c29a16d127baaa86740b33c06081d"
source = "git+https://github.com/pimalaya/core#afa6403c2c596d3d8c90dee26b57d57a8cce635c"
dependencies = [
"async-recursion",
"futures",
"http-lib",
"http-lib 0.1.0 (git+https://github.com/pimalaya/core)",
"pgp",
"rand",
"sha1",
@ -3090,7 +3130,8 @@ dependencies = [
[[package]]
name = "pimalaya-tui"
version = "0.1.0"
source = "git+https://github.com/pimalaya/tui#0423b23520ab93dd65176d0e60a1fcc514848d0f"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d72a8bba0e012700dfb3a7611fffaa6b9ec9dc747134b1a1d34d2fd9f8ddce5"
dependencies = [
"async-trait",
"clap",
@ -3103,7 +3144,7 @@ dependencies = [
"inquire",
"md5",
"mml-lib",
"oauth-lib",
"oauth-lib 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"petgraph",
"process-lib",
"secret-lib",
@ -3173,9 +3214,9 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
[[package]]
name = "polling"
version = "3.7.4"
version = "3.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f"
checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511"
dependencies = [
"cfg-if",
"concurrent-queue",
@ -3239,9 +3280,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.91"
version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "307e3004becf10f5a6e0d59d20f3cd28231b0e0827a96cd3e0ce6d14bc1e4bb3"
checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
dependencies = [
"unicode-ident",
]
@ -3249,7 +3290,7 @@ dependencies = [
[[package]]
name = "process-lib"
version = "1.0.0"
source = "git+https://github.com/pimalaya/core#2f405c35ea6c29a16d127baaa86740b33c06081d"
source = "git+https://github.com/pimalaya/core#afa6403c2c596d3d8c90dee26b57d57a8cce635c"
dependencies = [
"serde",
"thiserror",
@ -3359,7 +3400,7 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata 0.4.9",
"regex-automata 0.4.8",
"regex-syntax 0.8.5",
]
@ -3385,9 +3426,9 @@ dependencies = [
[[package]]
name = "regex-automata"
version = "0.4.9"
version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3"
dependencies = [
"aho-corasick",
"memchr",
@ -3499,9 +3540,9 @@ dependencies = [
[[package]]
name = "rustix"
version = "0.38.41"
version = "0.38.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6"
checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee"
dependencies = [
"bitflags 2.6.0",
"errno",
@ -3524,9 +3565,9 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.23.17"
version = "0.23.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f1a745511c54ba6d4465e8d5dfbd81b45791756de28d4981af70d6dca128f1e"
checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e"
dependencies = [
"log",
"once_cell",
@ -3585,7 +3626,7 @@ dependencies = [
"jni",
"log",
"once_cell",
"rustls 0.23.17",
"rustls 0.23.16",
"rustls-native-certs",
"rustls-platform-verifier-android",
"rustls-webpki 0.102.8",
@ -3645,9 +3686,9 @@ dependencies = [
[[package]]
name = "schannel"
version = "0.1.27"
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1"
dependencies = [
"windows-sys 0.59.0",
]
@ -3685,7 +3726,7 @@ dependencies = [
[[package]]
name = "secret-lib"
version = "1.0.0"
source = "git+https://github.com/pimalaya/core#2f405c35ea6c29a16d127baaa86740b33c06081d"
source = "git+https://github.com/pimalaya/core#afa6403c2c596d3d8c90dee26b57d57a8cce635c"
dependencies = [
"keyring-lib",
"process-lib",
@ -3729,9 +3770,9 @@ dependencies = [
[[package]]
name = "security-framework"
version = "3.0.1"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8"
checksum = "f9d0283c0a4a22a0f1b0e4edca251aa20b92fc96eaa09b84bec052f9415e9d71"
dependencies = [
"bitflags 2.6.0",
"core-foundation 0.10.0",
@ -3742,9 +3783,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
version = "2.12.1"
version = "2.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2"
checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6"
dependencies = [
"core-foundation-sys",
"libc",
@ -3758,9 +3799,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
[[package]]
name = "serde"
version = "1.0.215"
version = "1.0.214"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5"
dependencies = [
"serde_derive",
]
@ -3788,20 +3829,20 @@ dependencies = [
[[package]]
name = "serde_derive"
version = "1.0.215"
version = "1.0.214"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
name = "serde_json"
version = "1.0.133"
version = "1.0.132"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03"
dependencies = [
"itoa",
"memchr",
@ -3827,7 +3868,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -4057,7 +4098,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -4079,9 +4120,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.89"
version = "2.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e"
checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
dependencies = [
"proc-macro2",
"quote",
@ -4096,7 +4137,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -4120,9 +4161,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tempfile"
version = "3.14.0"
version = "3.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b"
dependencies = [
"cfg-if",
"fastrand",
@ -4143,22 +4184,22 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.69"
version = "1.0.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.69"
version = "1.0.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -4198,9 +4239,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.41.1"
version = "1.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33"
checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
dependencies = [
"backtrace",
"bytes",
@ -4222,7 +4263,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -4241,7 +4282,7 @@ version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
dependencies = [
"rustls 0.23.17",
"rustls 0.23.16",
"rustls-pki-types",
"tokio",
]
@ -4299,7 +4340,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -4398,9 +4439,9 @@ checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893"
[[package]]
name = "unicode-ident"
version = "1.0.14"
version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
[[package]]
name = "unicode-normalization"
@ -4423,12 +4464,6 @@ version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
[[package]]
name = "unicode-width"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
[[package]]
name = "untrusted"
version = "0.9.0"
@ -4449,7 +4484,7 @@ dependencies = [
"log",
"once_cell",
"percent-encoding",
"rustls 0.23.17",
"rustls 0.23.16",
"rustls-pemfile 2.2.0",
"rustls-pki-types",
"rustls-platform-verifier",
@ -4581,7 +4616,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
"wasm-bindgen-shared",
]
@ -4603,7 +4638,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -4891,9 +4926,9 @@ dependencies = [
[[package]]
name = "xml-rs"
version = "0.8.23"
version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af310deaae937e48a26602b730250b4949e125f468f11e6990be3e5304ddd96f"
checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26"
[[package]]
name = "yansi"
@ -4921,7 +4956,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
"synstructure",
]
@ -4979,7 +5014,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
"zvariant_utils",
]
@ -5012,7 +5047,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -5032,7 +5067,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
"synstructure",
]
@ -5053,7 +5088,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -5075,7 +5110,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]
[[package]]
@ -5100,7 +5135,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
"zvariant_utils",
]
@ -5112,5 +5147,5 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.89",
"syn 2.0.87",
]

View file

@ -70,10 +70,8 @@ url = "2.2"
uuid = { version = "0.8", features = ["v4"] }
[patch.crates-io]
email-lib = { git = "https://github.com/pimalaya/core" }
imap-client = { git = "https://github.com/pimalaya/imap-client" }
mml-lib = { git = "https://github.com/pimalaya/core" }
oauth-lib = { git = "https://github.com/pimalaya/core" }
pimalaya-tui = { git = "https://github.com/pimalaya/tui" }
email-lib = { git = "https://github.com/pimalaya/core" }
process-lib = { git = "https://github.com/pimalaya/core" }
secret-lib = { git = "https://github.com/pimalaya/core" }
mml-lib = { git = "https://github.com/pimalaya/core" }

252
README.md
View file

@ -234,21 +234,19 @@ You can also manually edit your own configuration, from scratch:
[accounts.proton]
email = "example@proton.me"
backend.type = "imap"
backend.host = "127.0.0.1"
backend.port = 1143
backend.encryption = false
backend.login = "example@proton.me"
backend.auth.type = "password"
backend.auth.raw = "*****"
backend = "imap"
imap.host = "127.0.0.1"
imap.port = 1143
imap.encryption = false
imap.login = "example@proton.me"
imap.passwd.raw = "<bridge-imap-p@ssw0rd>"
message.send.backend.type = "smtp"
message.send.backend.host = "127.0.0.1"
message.send.backend.port = 1025
message.send.backend.encryption = false
message.send.backend.login = "example@proton.me"
message.send.backend.auth.type = "password"
message.send.backend.auth.raw = "*****"
message.send.backend = "smtp"
smtp.host = "127.0.0.1"
smtp.port = 1025
smtp.encryption = false
smtp.login = "example@proton.me"
smtp.passwd.raw = "<bridge-smtp-p@ssw0rd>"
```
Keeping your password inside the configuration file is good for testing purpose, but it is not safe. You have 2 better alternatives:
@ -256,13 +254,13 @@ You can also manually edit your own configuration, from scratch:
- Save your password in any password manager that can be queried via the CLI:
```toml
backend.auth.cmd = "pass show proton"
imap.passwd.cmd = "pass show proton"
```
- Use the global keyring of your system (requires the `keyring` cargo feature):
```toml
backend.auth.keyring = "proton-example"
imap.passwd.keyring = "proton-example"
```
Running `himalaya configure -a proton` will ask for your IMAP password, just paste the one generated previously.
@ -292,19 +290,17 @@ You can also manually edit your own configuration, from scratch:
folder.alias.drafts = "[Gmail]/Drafts"
folder.alias.trash = "[Gmail]/Trash"
backend.type = "imap"
backend.type.host = "imap.gmail.com"
backend.type.port = 993
backend.type.login = "example@gmail.com"
backend.type.auth.type = "password"
backend.type.auth.raw = "*****"
backend = "imap"
imap.host = "imap.gmail.com"
imap.port = 993
imap.login = "example@gmail.com"
imap.passwd.cmd = "pass show gmail"
message.send.backend.type = "smtp"
message.send.backend.host = "smtp.gmail.com"
message.send.backend.port = 465
message.send.backend.login = "example@gmail.com"
message.send.backend.auth.type = "password"
message.send.backend.auth.cmd = "*****"
message.send.backend = "smtp"
smtp.host = "smtp.gmail.com"
smtp.port = 465
smtp.login = "example@gmail.com"
smtp.passwd.cmd = "pass show gmail"
```
Keeping your password inside the configuration file is good for testing purpose, but it is not safe. You have 2 better alternatives:
@ -312,13 +308,13 @@ You can also manually edit your own configuration, from scratch:
- Save your password in any password manager that can be queried via the CLI:
```toml
backend.auth.cmd = "pass show gmail"
imap.passwd.cmd = "pass show gmail"
```
- Use the global keyring of your system (requires the `keyring` cargo feature):
```toml
backend.auth.keyring = "gmail-example"
imap.passwd.keyring = "gmail-example"
```
Running `himalaya configure -a gmail` will ask for your IMAP password, just paste the one generated previously.
@ -338,33 +334,38 @@ You can also manually edit your own configuration, from scratch:
folder.alias.drafts = "[Gmail]/Drafts"
folder.alias.trash = "[Gmail]/Trash"
backend.type = "imap"
backend.host = "imap.gmail.com"
backend.port = 993
backend.login = "example@gmail.com"
backend.auth.type = "oauth2"
backend.auth.client-id = "*****"
backend.auth.client-secret.keyring = "gmail-oauth2-client-secret"
backend.auth.access-token.keyring = "gmail-oauth2-access-token"
backend.auth.refresh-token.keyring = "gmail-oauth2-refresh-token"
backend.auth.auth-url = "https://accounts.google.com/o/oauth2/v2/auth"
backend.auth.token-url = "https://www.googleapis.com/oauth2/v3/token"
backend.auth.pkce = true
backend.auth.scope = "https://mail.google.com/"
backend = "imap"
imap.host = "imap.gmail.com"
imap.port = 993
imap.login = "example@gmail.com"
imap.oauth2.client-id = "<imap-client-id>"
imap.oauth2.auth-url = "https://accounts.google.com/o/oauth2/v2/auth"
imap.oauth2.token-url = "https://www.googleapis.com/oauth2/v3/token"
imap.oauth2.pkce = true
imap.oauth2.scope = "https://mail.google.com/"
message.send.backend.type = "smtp"
message.send.backend.host = "smtp.gmail.com"
message.send.backend.port = 465
message.send.backend.login = "example@gmail.com"
message.send.backend.auth.type = "oauth2"
message.send.backend.auth.client-id = "*****"
message.send.backend.auth.client-secret.keyring = "gmail-oauth2-client-secret"
message.send.backend.auth.access-token.keyring = "gmail-oauth2-access-token"
message.send.backend.auth.refresh-token.keyring = "gmail-oauth2-refresh-token"
message.send.backend.auth.auth-url = "https://accounts.google.com/o/oauth2/v2/auth"
message.send.backend.auth.token-url = "https://www.googleapis.com/oauth2/v3/token"
message.send.backend.auth.pkce = true
message.send.backend.auth.scope = "https://mail.google.com/"
message.send.backend = "smtp"
smtp.host = "smtp.gmail.com"
smtp.port = 465
smtp.login = "example@gmail.com"
smtp.oauth2.client-id = "<smtp-client-id>"
smtp.oauth2.auth-url = "https://accounts.google.com/o/oauth2/v2/auth"
smtp.oauth2.token-url = "https://www.googleapis.com/oauth2/v3/token"
smtp.oauth2.pkce = true
smtp.oauth2.scope = "https://mail.google.com/"
# If you want your SMTP to share the same client id (and so the same access token)
# as your IMAP config, you can add the following:
#
# imap.oauth2.client-id = "<client-id>"
# imap.oauth2.client-secret.keyring = "gmail-oauth2-client-secret"
# imap.oauth2.access-token.keyring = "gmail-oauth2-access-token"
# imap.oauth2.refresh-token.keyring = "gmail-oauth2-refresh-token"
#
# imap.oauth2.client-id = "<client-id>"
# imap.oauth2.client-secret.keyring = "gmail-oauth2-client-secret"
# imap.oauth2.access-token.keyring = "gmail-oauth2-access-token"
# smtp.oauth2.refresh-token.keyring = "gmail-oauth2-refresh-token"
```
Running `himalaya configure -a gmail` will complete your OAuth 2.0 setup and ask for your client secret.
@ -377,38 +378,20 @@ You can also manually edit your own configuration, from scratch:
[accounts.outlook]
email = "example@outlook.com"
backend.type = "imap"
backend.host = "outlook.office365.com"
backend.port = 993
backend.login = "example@outlook.com"
backend.auth.type = "password"
backend.auth.raw = "*****"
backend = "imap"
imap.host = "outlook.office365.com"
imap.port = 993
imap.login = "example@outlook.com"
imap.passwd.cmd = "pass show outlook"
message.send.backend.type = "smtp"
message.send.backend.host = "smtp.mail.outlook.com"
message.send.backend.port = 587
message.send.backend.encryption = "start-tls"
message.send.backend.login = "example@outlook.com"
message.send.backend.auth.type = "password"
message.send.backend.auth.raw = "*****"
message.send.backend = "smtp"
smtp.host = "smtp.mail.outlook.com"
smtp.port = 587
smtp.encryption = "start-tls"
smtp.login = "example@outlook.com"
smtp.passwd.cmd = "pass show outlook"
```
Keeping your password inside the configuration file is good for testing purpose, but it is not safe. You have 2 better alternatives:
- Save your password in any password manager that can be queried via the CLI:
```toml
backend.auth.cmd = "pass show outlook"
```
- Use the global keyring of your system (requires the `keyring` cargo feature):
```toml
backend.auth.keyring = "outlook-example"
```
Running `himalaya configure -a outlook` will ask for your IMAP password, just paste the one generated previously.
### Using OAuth 2.0
This option is the most secure but the hardest to configure. First, you need to get your OAuth 2.0 credentials by following [this guide](https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth). Once you get your client id and your client secret, you can configure your Himalaya account this way:
@ -417,34 +400,39 @@ You can also manually edit your own configuration, from scratch:
[accounts.outlook]
email = "example@outlook.com"
backend.type = "imap"
backend.host = "outlook.office365.com"
backend.port = 993
backend.login = "example@outlook.com"
backend.auth.type = "oauth2"
backend.auth.client-id = "*****"
backend.auth.client-secret.keyring = "outlook-oauth2-client-secret"
backend.auth.access-token.keyring = "outlook-oauth2-access-token"
backend.auth.refresh-token.keyring = "outlook-oauth2-refresh-token"
backend.auth.auth-url = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
backend.auth.token-url = "https://login.microsoftonline.com/common/oauth2/v2.0/token"
backend.auth.pkce = true
backend.auth.scopes = ["https://outlook.office.com/IMAP.AccessAsUser.All", "https://outlook.office.com/SMTP.Send"]
backend = "imap"
imap.host = "outlook.office365.com"
imap.port = 993
imap.login = "example@outlook.com"
imap.oauth2.client-id = "<imap-client-id>"
imap.oauth2.auth-url = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
imap.oauth2.token-url = "https://login.microsoftonline.com/common/oauth2/v2.0/token"
imap.oauth2.pkce = true
imap.oauth2.scope = "https://outlook.office.com/IMAP.AccessAsUser.All"
message.send.backend.type = "smtp"
message.send.backend.host = "smtp.mail.outlook.com"
message.send.backend.port = 587
message.send.backend.starttls = true
message.send.backend.login = "example@outlook.com"
message.send.backend.auth.type = "oauth2"
message.send.backend.auth.client-id = "*****"
message.send.backend.auth.client-secret.keyring = "outlook-oauth2-client-secret"
message.send.backend.auth.access-token.keyring = "outlook-oauth2-access-token"
message.send.backend.auth.refresh-token.keyring = "outlook-oauth2-refresh-token"
message.send.backend.auth.auth-url = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
message.send.backend.auth.token-url = "https://login.microsoftonline.com/common/oauth2/v2.0/token"
message.send.backend.auth.pkce = true
message.send.backend.auth.scopes = ["https://outlook.office.com/IMAP.AccessAsUser.All", "https://outlook.office.com/SMTP.Send"]
message.send.backend = "smtp"
smtp.host = "smtp.mail.outlook.com"
smtp.port = 587
smtp.starttls = true
smtp.login = "example@outlook.com"
smtp.oauth2.client-id = "<smtp-client-id>"
smtp.oauth2.auth-url = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
smtp.oauth2.token-url = "https://login.microsoftonline.com/common/oauth2/v2.0/token"
smtp.oauth2.pkce = true
smtp.oauth2.scope = "https://outlook.office.com/SMTP.Send"
# If you want your SMTP to share the same client id (and so the same access token)
# as your IMAP config, you can add the following:
#
# imap.oauth2.client-id = "<client-id>"
# imap.oauth2.client-secret.keyring = "outlook-oauth2-client-secret"
# imap.oauth2.access-token.keyring = "outlook-oauth2-access-token"
# imap.oauth2.refresh-token.keyring = "outlook-oauth2-refresh-token"
#
# imap.oauth2.client-id = "<client-id>"
# imap.oauth2.client-secret.keyring = "outlook-oauth2-client-secret"
# imap.oauth2.access-token.keyring = "outlook-oauth2-access-token"
# smtp.oauth2.refresh-token.keyring = "outlook-oauth2-refresh-token"
```
Running `himalaya configure -a outlook` will complete your OAuth 2.0 setup and ask for your client secret.
@ -464,37 +452,19 @@ You can also manually edit your own configuration, from scratch:
[accounts.icloud]
email = "johnappleseed@icloud.com"
backend.type = "imap"
backend.host = "imap.mail.me.com"
backend.port = 993
backend.login = "johnappleseed"
backend.auth.type = "password"
backend.auth.raw = "*****"
backend = "imap"
imap.host = "imap.mail.me.com"
imap.port = 993
imap.login = "johnappleseed"
imap.passwd.cmd = "pass show icloud"
message.send.backend.type = "smtp"
message.send.backend.host = "smtp.mail.me.com"
message.send.backend.port = 587
message.send.backend.encryption = "start-tls"
message.send.backend.login = "johnappleseed@icloud.com"
message.send.backend.auth.type = "password"
message.send.backend.auth.raw = "*****"
message.send.backend = "smtp"
smtp.host = "smtp.mail.me.com"
smtp.port = 587
smtp.encryption = "start-tls"
smtp.login = "johnappleseed@icloud.com"
smtp.passwd.cmd = "pass show icloud"
```
Keeping your password inside the configuration file is good for testing purpose, but it is not safe. You have 2 better alternatives:
- Save your password in any password manager that can be queried via the CLI:
```toml
backend.auth.cmd = "pass show icloud"
```
- Use the global keyring of your system (requires the `keyring` cargo feature):
```toml
backend.auth.keyring = "icloud-example"
```
Running `himalaya configure -a icloud` will ask for your IMAP password, just paste the one generated previously.
</details>
## FAQ

View file

@ -2,6 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::backend::BackendBuilder;
#[cfg(feature = "imap")]
use email::imap::ImapContextBuilder;
#[cfg(feature = "maildir")]
@ -12,7 +13,6 @@ use email::notmuch::NotmuchContextBuilder;
use email::sendmail::SendmailContextBuilder;
#[cfg(feature = "smtp")]
use email::smtp::SmtpContextBuilder;
use email::{backend::BackendBuilder, config::Config};
use pimalaya_tui::{
himalaya::config::{Backend, SendingBackend},
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -36,13 +36,11 @@ impl AccountCheckUpCommand {
pub async fn execute(self, printer: &mut impl Printer, config: &TomlConfig) -> Result<()> {
info!("executing check up account command");
let account = self.account.name.as_ref().map(String::as_str);
printer.log("Checking configuration integrity…\n")?;
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
let (toml_account_config, account_config) = config.clone().into_account_configs(account)?;
let account_config = Arc::new(account_config);
match toml_account_config.backend {

View file

@ -4,7 +4,7 @@ use ariadne::{Color, Label, Report, ReportKind, Source};
use clap::Parser;
use color_eyre::Result;
use email::{
backend::feature::BackendFeatureSource, config::Config, email::search_query,
backend::feature::BackendFeatureSource, email::search_query,
envelope::list::ListEnvelopesOptions, search_query::SearchEmailsQuery,
};
use pimalaya_tui::{
@ -142,9 +142,7 @@ impl ListEnvelopesCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let toml_account_config = Arc::new(toml_account_config);

View file

@ -2,7 +2,7 @@ use ariadne::{Label, Report, ReportKind, Source};
use clap::Parser;
use color_eyre::Result;
use email::{
backend::feature::BackendFeatureSource, config::Config, email::search_query,
backend::feature::BackendFeatureSource, email::search_query,
envelope::list::ListEnvelopesOptions, search_query::SearchEmailsQuery,
};
use pimalaya_tui::{
@ -43,9 +43,7 @@ impl ThreadEnvelopesCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);
let folder = &self.folder.name;

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -40,9 +40,7 @@ impl FlagAddCommand {
let (ids, flags) = into_tuple(&self.args.ids_and_flags);
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -40,9 +40,7 @@ impl FlagRemoveCommand {
let (ids, flags) = into_tuple(&self.args.ids_and_flags);
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -40,9 +40,7 @@ impl FlagSetCommand {
let (ids, flags) = into_tuple(&self.args.ids_and_flags);
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),

View file

@ -1,6 +1,6 @@
use clap::Parser;
use color_eyre::{eyre::Context, Result};
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -39,9 +39,7 @@ impl AttachmentDownloadCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -42,9 +42,7 @@ impl MessageCopyCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -41,9 +41,7 @@ impl MessageDeleteCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::{eyre::eyre, Result};
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::{backend::BackendBuilder, editor},
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -49,9 +49,7 @@ impl MessageForwardCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use mail_builder::MessageBuilder;
use pimalaya_tui::{
himalaya::{backend::BackendBuilder, editor},
@ -42,9 +42,7 @@ impl MessageMailtoCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -43,9 +43,7 @@ impl MessageMoveCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use mml::message::FilterParts;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
@ -86,9 +86,7 @@ impl MessageReadCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::{eyre::eyre, Result};
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::{backend::BackendBuilder, editor},
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -51,9 +51,7 @@ impl MessageReplyCommand {
let folder = &self.folder.name;
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);

View file

@ -1,6 +1,6 @@
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -39,9 +39,7 @@ impl MessageSaveCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),

View file

@ -1,6 +1,6 @@
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -32,9 +32,7 @@ impl MessageSendCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use mml::message::FilterParts;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
@ -87,9 +87,7 @@ impl MessageThreadCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);

View file

@ -2,10 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{
config::Config,
{backend::feature::BackendFeatureSource, message::Message},
};
use email::{backend::feature::BackendFeatureSource, message::Message};
use pimalaya_tui::{
himalaya::{backend::BackendBuilder, editor},
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -42,9 +39,7 @@ impl MessageWriteCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::{eyre::eyre, Result};
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -48,9 +48,7 @@ impl TemplateForwardCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::{eyre::eyre, Result};
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -53,9 +53,7 @@ impl TemplateReplyCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);

View file

@ -1,6 +1,6 @@
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use mml::MmlCompilerBuilder;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
@ -43,9 +43,7 @@ impl TemplateSaveCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);

View file

@ -1,16 +1,15 @@
use std::{
io::{self, BufRead, IsTerminal},
sync::Arc,
};
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config};
use email::backend::feature::BackendFeatureSource;
use mml::MmlCompilerBuilder;
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
};
use std::{
io::{self, BufRead, IsTerminal},
sync::Arc,
};
use tracing::info;
use crate::{
@ -38,9 +37,7 @@ impl TemplateSendCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let account_config = Arc::new(account_config);

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{config::Config, message::Message};
use email::message::Message;
use pimalaya_tui::terminal::{cli::printer::Printer, config::TomlConfig as _};
use tracing::info;
@ -33,9 +33,7 @@ impl TemplateWriteCommand {
let (_, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let tpl = Message::new_tpl_builder(Arc::new(account_config))
.with_headers(self.headers.raw)

View file

@ -2,10 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{
config::Config,
{backend::feature::BackendFeatureSource, folder::add::AddFolder},
};
use email::{backend::feature::BackendFeatureSource, folder::add::AddFolder};
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -37,9 +34,7 @@ impl AddFolderCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),

View file

@ -2,10 +2,7 @@ use std::{process, sync::Arc};
use clap::Parser;
use color_eyre::Result;
use email::{
config::Config,
{backend::feature::BackendFeatureSource, folder::delete::DeleteFolder},
};
use email::{backend::feature::BackendFeatureSource, folder::delete::DeleteFolder};
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _, prompt},
@ -44,9 +41,7 @@ impl FolderDeleteCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),

View file

@ -2,9 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{
backend::feature::BackendFeatureSource, config::Config, folder::expunge::ExpungeFolder,
};
use email::{backend::feature::BackendFeatureSource, folder::expunge::ExpungeFolder};
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _},
@ -36,9 +34,7 @@ impl FolderExpungeCommand {
let folder = &self.folder.name;
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),

View file

@ -2,10 +2,7 @@ use std::sync::Arc;
use clap::Parser;
use color_eyre::Result;
use email::{
config::Config,
{backend::feature::BackendFeatureSource, folder::list::ListFolders},
};
use email::{backend::feature::BackendFeatureSource, folder::list::ListFolders};
use pimalaya_tui::{
himalaya::{
backend::BackendBuilder,
@ -40,9 +37,7 @@ impl FolderListCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let toml_account_config = Arc::new(toml_account_config);

View file

@ -2,7 +2,7 @@ use std::{process, sync::Arc};
use clap::Parser;
use color_eyre::Result;
use email::{backend::feature::BackendFeatureSource, config::Config, folder::purge::PurgeFolder};
use email::{backend::feature::BackendFeatureSource, folder::purge::PurgeFolder};
use pimalaya_tui::{
himalaya::backend::BackendBuilder,
terminal::{cli::printer::Printer, config::TomlConfig as _, prompt},
@ -41,9 +41,7 @@ impl FolderPurgeCommand {
let (toml_account_config, account_config) = config
.clone()
.into_account_configs(self.account.name.as_deref(), |c: &Config, name| {
c.account(name).ok()
})?;
.into_account_configs(self.account.name.as_deref())?;
let backend = BackendBuilder::new(
Arc::new(toml_account_config),