Compare commits
2 Commits
64a38e024d
...
dee6ff9ba0
| Author | SHA1 | Date | |
|---|---|---|---|
| dee6ff9ba0 | |||
| 73bdcd5441 |
10
Cargo.lock
generated
10
Cargo.lock
generated
@ -2469,7 +2469,7 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "letterbox"
|
name = "letterbox"
|
||||||
version = "0.0.35"
|
version = "0.0.36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"build-info",
|
"build-info",
|
||||||
"build-info-build",
|
"build-info-build",
|
||||||
@ -2988,7 +2988,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "notmuch"
|
name = "notmuch"
|
||||||
version = "0.0.35"
|
version = "0.0.36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itertools 0.10.5",
|
"itertools 0.10.5",
|
||||||
"log",
|
"log",
|
||||||
@ -3625,7 +3625,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "procmail2notmuch"
|
name = "procmail2notmuch"
|
||||||
version = "0.0.35"
|
version = "0.0.36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
]
|
]
|
||||||
@ -4547,7 +4547,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "server"
|
name = "server"
|
||||||
version = "0.0.35"
|
version = "0.0.36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ammonia",
|
"ammonia",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@ -4646,7 +4646,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "shared"
|
name = "shared"
|
||||||
version = "0.0.35"
|
version = "0.0.36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"build-info",
|
"build-info",
|
||||||
"notmuch",
|
"notmuch",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "notmuch"
|
name = "notmuch"
|
||||||
version = "0.0.35"
|
version = "0.0.36"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "procmail2notmuch"
|
name = "procmail2notmuch"
|
||||||
version = "0.0.35"
|
version = "0.0.36"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "server"
|
name = "server"
|
||||||
version = "0.0.35"
|
version = "0.0.36"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
default-run = "server"
|
default-run = "server"
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,7 @@ use crate::{
|
|||||||
const TEXT_PLAIN: &'static str = "text/plain";
|
const TEXT_PLAIN: &'static str = "text/plain";
|
||||||
const TEXT_HTML: &'static str = "text/html";
|
const TEXT_HTML: &'static str = "text/html";
|
||||||
const IMAGE_JPEG: &'static str = "image/jpeg";
|
const IMAGE_JPEG: &'static str = "image/jpeg";
|
||||||
|
const IMAGE_PJPEG: &'static str = "image/pjpeg";
|
||||||
const IMAGE_PNG: &'static str = "image/png";
|
const IMAGE_PNG: &'static str = "image/png";
|
||||||
const MULTIPART_ALTERNATIVE: &'static str = "multipart/alternative";
|
const MULTIPART_ALTERNATIVE: &'static str = "multipart/alternative";
|
||||||
const MULTIPART_MIXED: &'static str = "multipart/mixed";
|
const MULTIPART_MIXED: &'static str = "multipart/mixed";
|
||||||
@ -467,6 +468,7 @@ fn extract_mixed(m: &ParsedMail, part_addr: &mut Vec<String>) -> Result<Body, Se
|
|||||||
TEXT_HTML,
|
TEXT_HTML,
|
||||||
TEXT_PLAIN,
|
TEXT_PLAIN,
|
||||||
IMAGE_JPEG,
|
IMAGE_JPEG,
|
||||||
|
IMAGE_PJPEG,
|
||||||
IMAGE_PNG,
|
IMAGE_PNG,
|
||||||
];
|
];
|
||||||
let mut unhandled_types: Vec<_> = m
|
let mut unhandled_types: Vec<_> = m
|
||||||
@ -487,7 +489,7 @@ fn extract_mixed(m: &ParsedMail, part_addr: &mut Vec<String>) -> Result<Body, Se
|
|||||||
MULTIPART_ALTERNATIVE => parts.push(extract_alternative(sp, part_addr)?),
|
MULTIPART_ALTERNATIVE => parts.push(extract_alternative(sp, part_addr)?),
|
||||||
TEXT_PLAIN => parts.push(Body::text(sp.get_body()?)),
|
TEXT_PLAIN => parts.push(Body::text(sp.get_body()?)),
|
||||||
TEXT_HTML => parts.push(Body::html(sp.get_body()?)),
|
TEXT_HTML => parts.push(Body::html(sp.get_body()?)),
|
||||||
IMAGE_JPEG | IMAGE_PNG => {
|
IMAGE_PJPEG | IMAGE_JPEG | IMAGE_PNG => {
|
||||||
let pcd = sp.get_content_disposition();
|
let pcd = sp.get_content_disposition();
|
||||||
let filename = pcd
|
let filename = pcd
|
||||||
.params
|
.params
|
||||||
@ -556,6 +558,7 @@ fn extract_related(m: &ParsedMail, part_addr: &mut Vec<String>) -> Result<Body,
|
|||||||
TEXT_HTML,
|
TEXT_HTML,
|
||||||
TEXT_PLAIN,
|
TEXT_PLAIN,
|
||||||
IMAGE_JPEG,
|
IMAGE_JPEG,
|
||||||
|
IMAGE_PJPEG,
|
||||||
IMAGE_PNG,
|
IMAGE_PNG,
|
||||||
];
|
];
|
||||||
let mut unhandled_types: Vec<_> = m
|
let mut unhandled_types: Vec<_> = m
|
||||||
@ -570,7 +573,10 @@ fn extract_related(m: &ParsedMail, part_addr: &mut Vec<String>) -> Result<Body,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i, sp) in m.subparts.iter().enumerate() {
|
for (i, sp) in m.subparts.iter().enumerate() {
|
||||||
if sp.ctype.mimetype == IMAGE_PNG || sp.ctype.mimetype == IMAGE_JPEG {
|
if sp.ctype.mimetype == IMAGE_PNG
|
||||||
|
|| sp.ctype.mimetype == IMAGE_JPEG
|
||||||
|
|| sp.ctype.mimetype == IMAGE_PJPEG
|
||||||
|
{
|
||||||
info!("sp.ctype {:#?}", sp.ctype);
|
info!("sp.ctype {:#?}", sp.ctype);
|
||||||
//info!("sp.headers {:#?}", sp.headers);
|
//info!("sp.headers {:#?}", sp.headers);
|
||||||
if let Some(cid) = sp.headers.get_first_value("Content-Id") {
|
if let Some(cid) = sp.headers.get_first_value("Content-Id") {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "shared"
|
name = "shared"
|
||||||
version = "0.0.35"
|
version = "0.0.36"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
version = "0.0.35"
|
version = "0.0.36"
|
||||||
name = "letterbox"
|
name = "letterbox"
|
||||||
repository = "https://github.com/seed-rs/seed-quickstart"
|
repository = "https://github.com/seed-rs/seed-quickstart"
|
||||||
authors = ["Bill Thiede <git@xinu.tv>"]
|
authors = ["Bill Thiede <git@xinu.tv>"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user