[package] edition = "2021" name = "vsmtp" version = "2.2.1" license = "GPL-3.0-only" authors = ["Team viridIT "] description = "Next-gen Mail Transfer Agent (MTA) written in Rust." homepage = "https://github.com/viridIT/vSMTP" repository = "https://github.com/viridIT/vSMTP" documentation = "https://docs.rs/crate/vsmtp/" readme = "../../../README.md" keywords = ["vsmtp", "mta", "smtp", "server", "mail"] categories = ["email"] rust-version = "1.66.1" build = "build.rs" [build-dependencies] vsmtp-rule-engine = { path = "../vsmtp-rule-engine", version = "2.0.1-rc.1" } vsmtp-config = { path = "../vsmtp-config", version = "2.0.1-rc.1" } rhai-autodocs = "0.1.6" [package.metadata.release] tag = true pre-release-commit-message = "chore: Release {{crate_name}} version {{version}}" pre-release-replacements = [ { file = "../../../CHANGELOG.md", search = "Unreleased", replace = "{{version}}", prerelease = true }, { file = "../../../CHANGELOG.md", search = "ReleaseDate", replace = "{{date}}", prerelease = true }, { file = "../../../CHANGELOG.md", search = "", replace = "\n\n## [Unreleased] - ReleaseDate", exactly = 1, prerelease = true }, { file = "Cargo.toml", prerelease = true, search = "server\\]\nversion = .*", replace = "server]\nversion = \"={{version}}\"" }, { file = "Cargo.toml", prerelease = true, search = "common\\]\nversion = .*", replace = "common]\nversion = \"={{version}}\"" }, { file = "Cargo.toml", prerelease = true, search = "config\\]\nversion = .*", replace = "config]\nversion = \"={{version}}\"" }, { file = "Cargo.toml", prerelease = true, search = "rule-engine\\]\nversion = .*", replace = "rule-engine]\nversion = \"={{version}}\"" }, # Update plugins paths in packages. { file = "Cargo.toml", prerelease = true, search = "/usr/lib/vsmtp/[a-z0-9\\.-]+", replace = "/usr/lib/vsmtp/{{version}}" }, ] [features] #! # Features flags #! Customize the build with the following [features flags](https://doc.rust-lang.org/cargo/reference/features.html): default = [] #! ## Logging system ## Enable the tracing layer implemtation for the [`journald`](https://docs.rs/tracing-journald) backend. ## ## * build the project using `cargo build --features journald`. journald = ["dep:tracing-journald", "vsmtp-config/journald"] ## Enable the tracing layer implemtation for the [`syslog`](https://docs.rs/tracing-rfc-5424) backend. ## ## * build the project using `cargo build --features syslog`. syslog = ["dep:tracing-rfc-5424", "vsmtp-config/syslog"] #! ## Debugging & Monitoring ## Enable the [`console-subscriber`](https://docs.rs/console-subscriber) layer to collect and aggregate the runtime's ## [`tracing`](https://docs.rs/tracing) data, and use a gRPC server to exports telemetry to clients. ## ## * build the project using `RUSTFLAGS="--cfg tokio_unstable" cargo build --features tokio_console`. ## * add `tokio=trace,runtime=trace` to the log level. ## * run [`tokio-console`](https://docs.rs/tokio-console). tokio_console = ["dep:console-subscriber"] ## Enable the [`tracing-opentelemetry`](https://docs.rs/tracing-opentelemetry) layer, ## and the [`opentelemetry-jaeger`](https://docs.rs/opentelemetry-jaeger) exporter. ## ## * `cargo build --features telemetry` telemetry = ["dep:tracing-opentelemetry", "dep:opentelemetry-jaeger"] #! ## Documentation ## Enable [document-features](https://docs.rs/document-features) to generate ## the documentation of the dependencies and features flags. document-features = ["dep:document-features"] [dependencies.vsmtp-common] version = "=2.2.1" path = "../vsmtp-common" [dependencies.vsmtp-server] version = "=2.2.1" path = "../vsmtp-server" [dependencies.vsmtp-config] version = "=2.2.1" path = "../vsmtp-config" [dependencies.vsmtp-rule-engine] version = "=2.2.1" path = "../vsmtp-rule-engine" [dependencies] clap = { version = "4.2.0", default-features = false, features = ["std", "derive", "cargo", "usage", "help", "color"] } dotenv = { version = "0.15.0", default-features = false } diff = { version = "0.1.13", default-features = false } serde_json = { version = "1.0.95", default-features = false, features = ["std"] } cfg-if = { version = "1.0.0" } anyhow = { version = "1.0.69", default-features = false, features = ["std"] } either = { version = "1.8.1", default-features = false, features = ["use_std"] } humantime = { version = "2.1.0", default-features = false } tracing = { version = "0.1.37", default-features = false, features = ["std", "attributes", "release_max_level_info"] } tracing-subscriber = { version = "0.3.16", default-features = false, features = ["smallvec", "fmt", "ansi", "std"] } tracing-appender = { version = "0.2.2", default-features = false } tracing-journald = { version = "0.3.0", optional = true, default-features = false } tracing-rfc-5424 = { version = "0.1.0", optional = true, default-features = false } console-subscriber = { version = "0.1.7", optional = true, default-features = false } tracing-opentelemetry = { version = "0.18.0", optional = true, default-features = false, features = [ "tracing-log", "metrics", ] } opentelemetry-jaeger = { version = "0.17.0", optional = true, default-features = false, features = ["rt-tokio"] } document-features = { version = "0.2.7", optional = true } [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] # # DEBIAN PACKAGING # # Note that as the postinst script uses the adduser there's a # dependency on the adduser package to keep the lintian tool happy. # [package.metadata.deb] name = "vsmtp" maintainer = "Pag " copyright = "Copyright (c) 2022, viridIT SAS. All rights reserved." extended-description = "High performance MTA written in RUST." changelog = "../../../tools/install/deb/changelog" depends = "$auto, adduser" section = "mail" priority = "optional" assets = [ ["target/release/vsmtp", "/usr/sbin/", "755"], ["target/release/vqueue", "/usr/sbin/", "755"], [ # https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#shared-library-support-files "target/release/*.so", "/usr/lib/vsmtp/2.2.1/", "755", ], ["../../../tools/install/deb/lintian-overrides", "/usr/share/lintian/overrides/vsmtp", "644"], ["../../../tools/install/man/*", "/usr/share/man/man1", "644"], ["../../../README.md", "/usr/share/doc/vsmtp/README", "644"], ] maintainer-scripts = "../../../tools/install/deb/" systemd-units = { unit-name = "vsmtp", enable = true, start = false } features = ["journald"] # # RPM PACKAGING # # [package.metadata.generate-rpm] name = "vsmtp" post_install_script = "../../../tools/install/deb/postinst" post_uninstall_script = "../../../tools/install/deb/postrm" assets = [ { source = "target/release/vsmtp", dest = "/usr/sbin/vsmtp", mode = "755" }, { source = "target/release/vqueue", dest = "/usr/sbin/vqueue", mode = "755" }, { source = "target/release/*.so", dest = "/usr/lib/vsmtp/2.2.1/", mode = "755" }, { source = "../../../tools/install/man/*", dest = "/usr/share/man/man1/", mode = "644", doc = true }, { source = "../../../README.md", dest = "/usr/share/doc/vsmtp/", mode = "644", doc = true }, ]