Add tracing-subscriber and test STARTTLS workflow

Co-authored-by: setoelkahfi <1797197+setoelkahfi@users.noreply.github.com>

copilot-swe-agent[bot] committed Oct 9, 2025 at 12:51 UTC db715bdc0a4d05d89ff7513944b1e73932e168c7
3 files changed +87 -3
Cargo.lock
+84 -3
@@ -98,7 +98,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
98 checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
99 dependencies = [
100 "libc",
101 - "windows-sys 0.59.0",
101 + "windows-sys 0.61.2",
102 ]
103
104 [[package]]
@@ -246,6 +246,12 @@ dependencies = [
246 "libc",
247 ]
248
249 +[[package]]
250 +name = "lazy_static"
251 +version = "1.5.0"
252 +source = "registry+https://github.com/rust-lang/crates.io-index"
253 +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
254 +
255 [[package]]
256 name = "libc"
257 version = "0.2.176"
@@ -307,6 +313,15 @@ dependencies = [
313 "tempfile",
314 ]
315
316 +[[package]]
317 +name = "nu-ansi-term"
318 +version = "0.50.1"
319 +source = "registry+https://github.com/rust-lang/crates.io-index"
320 +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399"
321 +dependencies = [
322 + "windows-sys 0.52.0",
323 +]
324 +
325 [[package]]
326 name = "object"
327 version = "0.37.3"
@@ -453,7 +468,7 @@ dependencies = [
468 "errno",
469 "libc",
470 "linux-raw-sys",
456 - "windows-sys 0.59.0",
471 + "windows-sys 0.61.2",
472 ]
473
474 [[package]]
@@ -488,6 +503,15 @@ dependencies = [
503 "libc",
504 ]
505
506 +[[package]]
507 +name = "sharded-slab"
508 +version = "0.1.7"
509 +source = "registry+https://github.com/rust-lang/crates.io-index"
510 +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
511 +dependencies = [
512 + "lazy_static",
513 +]
514 +
515 [[package]]
516 name = "shlex"
517 version = "1.3.0"
@@ -500,6 +524,12 @@ version = "0.4.11"
524 source = "registry+https://github.com/rust-lang/crates.io-index"
525 checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
526
527 +[[package]]
528 +name = "smallvec"
529 +version = "1.15.1"
530 +source = "registry+https://github.com/rust-lang/crates.io-index"
531 +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
532 +
533 [[package]]
534 name = "smbcloud-mail"
535 version = "0.1.0"
@@ -513,6 +543,7 @@ dependencies = [
543 "tokio-native-tls",
544 "tokio-util",
545 "tracing",
546 + "tracing-subscriber",
547 ]
548
549 [[package]]
@@ -546,7 +577,16 @@ dependencies = [
577 "getrandom",
578 "once_cell",
579 "rustix",
549 - "windows-sys 0.59.0",
580 + "windows-sys 0.61.2",
581 +]
582 +
583 +[[package]]
584 +name = "thread_local"
585 +version = "1.1.9"
586 +source = "registry+https://github.com/rust-lang/crates.io-index"
587 +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
588 +dependencies = [
589 + "cfg-if",
590 ]
591
592 [[package]]
@@ -630,6 +670,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
670 checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678"
671 dependencies = [
672 "once_cell",
673 + "valuable",
674 +]
675 +
676 +[[package]]
677 +name = "tracing-log"
678 +version = "0.2.0"
679 +source = "registry+https://github.com/rust-lang/crates.io-index"
680 +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
681 +dependencies = [
682 + "log",
683 + "once_cell",
684 + "tracing-core",
685 +]
686 +
687 +[[package]]
688 +name = "tracing-subscriber"
689 +version = "0.3.20"
690 +source = "registry+https://github.com/rust-lang/crates.io-index"
691 +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5"
692 +dependencies = [
693 + "nu-ansi-term",
694 + "sharded-slab",
695 + "smallvec",
696 + "thread_local",
697 + "tracing-core",
698 + "tracing-log",
699 ]
700
701 [[package]]
@@ -638,6 +704,12 @@ version = "1.0.19"
704 source = "registry+https://github.com/rust-lang/crates.io-index"
705 checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
706
707 +[[package]]
708 +name = "valuable"
709 +version = "0.1.1"
710 +source = "registry+https://github.com/rust-lang/crates.io-index"
711 +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
712 +
713 [[package]]
714 name = "vcpkg"
715 version = "0.2.15"
@@ -674,6 +746,15 @@ version = "0.2.1"
746 source = "registry+https://github.com/rust-lang/crates.io-index"
747 checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
748
749 +[[package]]
750 +name = "windows-sys"
751 +version = "0.52.0"
752 +source = "registry+https://github.com/rust-lang/crates.io-index"
753 +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
754 +dependencies = [
755 + "windows-targets",
756 +]
757 +
758 [[package]]
759 name = "windows-sys"
760 version = "0.59.0"
Cargo.toml
+1
@@ -10,6 +10,7 @@ tokio-native-tls = "0.3"
10 native-tls = "0.2"
11 anyhow = "1"
12 tracing = "0.1"
13 +tracing-subscriber = "0.3"
14 regex = "1"
15 futures = "0.3"
16 openssl = "0.10"
src/main.rs
+2
@@ -3,5 +3,7 @@ use smbcloud_mail::listen::listen;
3
4 #[tokio::main]
5 async fn main() -> Result<()> {
6 + // Initialize tracing subscriber for logging
7 + tracing_subscriber::fmt::init();
8 listen().await
9 }