Overview
Comment: | v0.2.2: drop env_logger due to security issues |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b311abee466cdc34240e518dd64a7d0c |
User & Date: | arcade on 2024-06-13 07:53:59.521 |
Other Links: | manifest | tags |
Context
2024-06-13
| ||
08:36 | v0.2.3: import less from samotop (removes security issue) check-in: 3ce249c1a4 user: arcade tags: trunk | |
07:53 | v0.2.2: drop env_logger due to security issues check-in: b311abee46 user: arcade tags: trunk | |
2024-06-11
| ||
18:39 | v0.2.1: bump, add rustls and some throttling check-in: ce79786e06 user: arcade tags: trunk | |
Changes
Modified Cargo.lock
from [2cca6c7d2e]
to [952cb03814].
︙ | ︙ | |||
13 14 15 16 17 18 19 | [[package]] name = "adler" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" | < < < < < < < < < | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | [[package]] name = "adler" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "anyhow" version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] |
︙ | ︙ | |||
297 298 299 300 301 302 303 | [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" | < < < < < < < < < < < | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] |
︙ | ︙ | |||
563 564 565 566 567 568 569 | dependencies = [ "heck", "proc-macro2", "quote", "syn 1.0.109", ] | < < < < < < < < < < < < < | 543 544 545 546 547 548 549 550 551 552 553 554 555 556 | dependencies = [ "heck", "proc-macro2", "quote", "syn 1.0.109", ] [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] |
︙ | ︙ | |||
877 878 879 880 881 882 883 | [[package]] name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" | < < < < < < < < < | 844 845 846 847 848 849 850 851 852 853 854 855 856 857 | [[package]] name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] |
︙ | ︙ | |||
933 934 935 936 937 938 939 | "bytes", "http", "pin-project-lite 0.2.14", ] [[package]] name = "httparse" | | | < < < < < < < < < | 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 | "bytes", "http", "pin-project-lite 0.2.14", ] [[package]] name = "httparse" version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0e7a4dd27b9476dc40cb050d3632d3bba3a70ddbff012285f7f8559a1e7e545" [[package]] name = "httpdate" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ "bytes", |
︙ | ︙ | |||
1175 1176 1177 1178 1179 1180 1181 | [[package]] name = "io-lifetimes" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ | | | 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 | [[package]] name = "io-lifetimes" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi", "libc", "windows-sys 0.48.0", ] [[package]] name = "ipconfig" version = "0.2.2" |
︙ | ︙ | |||
1454 1455 1456 1457 1458 1459 1460 | [[package]] name = "num_cpus" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ | | | 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 | [[package]] name = "num_cpus" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ "hermit-abi", "libc", ] [[package]] name = "object" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" |
︙ | ︙ | |||
1663 1664 1665 1666 1667 1668 1669 | name = "polling" version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" dependencies = [ "cfg-if", "concurrent-queue", | | | 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 | name = "polling" version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi", "pin-project-lite 0.2.14", "rustix 0.38.34", "tracing", "windows-sys 0.52.0", ] [[package]] |
︙ | ︙ | |||
1791 1792 1793 1794 1795 1796 1797 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "regex" | | < < < < < < < < | < < < < < | | < < < < < < < < < | 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "regex" version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "regex-automata", "regex-syntax", ] [[package]] name = "regex-automata" version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "regex-syntax", ] [[package]] name = "regex-syntax" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" |
︙ | ︙ | |||
2022 2023 2024 2025 2026 2027 2028 | [[package]] name = "samotop" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6eb682bb98a1f3f2a909e292c0e08293e541bdf2854b2b61449cffdc085374e9" dependencies = [ "log", | | | 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 | [[package]] name = "samotop" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6eb682bb98a1f3f2a909e292c0e08293e541bdf2854b2b61449cffdc085374e9" dependencies = [ "log", "regex", "samotop-core", "samotop-delivery", "samotop-parser", "samotop-smime", "samotop-with-rustls", "samotop-with-spf", ] |
︙ | ︙ | |||
2281 2282 2283 2284 2285 2286 2287 | [[package]] name = "smtp2tg" version = "0.2.1" dependencies = [ "anyhow", "async-std", "config", | < | 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 | [[package]] name = "smtp2tg" version = "0.2.1" dependencies = [ "anyhow", "async-std", "config", "mail-parser", "samotop", "teloxide", ] [[package]] name = "socket2" |
︙ | ︙ | |||
2495 2496 2497 2498 2499 2500 2501 | dependencies = [ "cfg-if", "fastrand 2.1.0", "rustix 0.38.34", "windows-sys 0.52.0", ] | < < < < < < < < < < < < < < < < < < | 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 | dependencies = [ "cfg-if", "fastrand 2.1.0", "rustix 0.38.34", "windows-sys 0.52.0", ] [[package]] name = "thiserror" version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", ] [[package]] name = "tinystr" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ "displaydoc", |
︙ | ︙ | |||
2714 2715 2716 2717 2718 2719 2720 | [[package]] name = "try-lock" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" | < < < < < < | 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 | [[package]] name = "try-lock" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "unicase" version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", |
︙ | ︙ | |||
2780 2781 2782 2783 2784 2785 2786 | [[package]] name = "utf16_iter" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" | < < < < < < | 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 | [[package]] name = "utf16_iter" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" [[package]] name = "utf8_iter" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] |
︙ | ︙ | |||
3015 3016 3017 3018 3019 3020 3021 | [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" | < < < < < < < < < | 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 | [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ "windows-targets 0.48.5", |
︙ | ︙ |
Modified Cargo.toml
from [0b1a68fb8c]
to [54c6d6f847].
1 2 3 4 5 6 7 8 9 10 | [package] name = "smtp2tg" version = "0.2.1" authors = [ "arcade" ] edition = "2021" [dependencies] anyhow = "*" async-std = { version = "*", features = [ "tokio1" ] } config = { version = "*", default-features = false, features = [ "toml" ] } | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | [package] name = "smtp2tg" version = "0.2.1" authors = [ "arcade" ] edition = "2021" [dependencies] anyhow = "*" async-std = { version = "*", features = [ "tokio1" ] } config = { version = "*", default-features = false, features = [ "toml" ] } teloxide = { version = "*", features = [ "rustls", "throttle" ] } mail-parser = { version = "*", features = ["serde", "serde_support"] } samotop = "*" [profile.release] lto = true codegen-units = 1 |
Modified src/main.rs
from [5f32e40450]
to [30f21fcc68].
︙ | ︙ | |||
280 281 282 283 284 285 286 | .expect("[smtp2tg.toml] missing \"maildir\" parameter.\n").into(); let listen_on = settings.get_string("listen_on") .expect("[smtp2tg.toml] missing \"listen_on\" parameter.\n"); let core = TelegramTransport::new(settings); let sink = Builder + Name::new("smtp2tg") + DebugService + my_prudence() + MailDir::new(maildir.clone()).unwrap(); | < < | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | .expect("[smtp2tg.toml] missing \"maildir\" parameter.\n").into(); let listen_on = settings.get_string("listen_on") .expect("[smtp2tg.toml] missing \"listen_on\" parameter.\n"); let core = TelegramTransport::new(settings); let sink = Builder + Name::new("smtp2tg") + DebugService + my_prudence() + MailDir::new(maildir.clone()).unwrap(); task::spawn(async move { loop { // relay mails if let Err(err) = relay_mails(&maildir, &core).await { // in case that fails - inform default recipient if let Err(err) = core.debug(format!("Sending emails failed:\n{:?}", err)).await { // in case that also fails - write some logs and bail |
︙ | ︙ |