Hide the current server version (closes #1435)

This commit is contained in:
mdecimus
2025-04-27 11:23:07 +02:00
parent ee7c953279
commit e10e94325f
12 changed files with 97 additions and 59 deletions

View File

@@ -64,9 +64,7 @@ impl<T: SessionStream> Session<T> {
.with_tag(request.tag)
.serialize(
concat!(
"* ID (\"name\" \"Stalwart IMAP\" \"version\" \"",
env!("CARGO_PKG_VERSION"),
"\" \"vendor\" \"Stalwart Labs Ltd.\" ",
"* ID (\"name\" \"Stalwart\" \"version\" \"1.0.0\" \"vendor\" \"Stalwart Labs Ltd.\" ",
"\"support-url\" \"https://stalw.art\")\r\n"
)
.as_bytes()

View File

@@ -14,15 +14,8 @@ impl<T: SessionStream> Session<T> {
pub async fn handle_logout(&mut self, request: Request<Command>) -> trc::Result<()> {
let op_start = Instant::now();
let mut response = StatusResponse::bye(
concat!(
"Stalwart IMAP4rev2 v",
env!("CARGO_PKG_VERSION"),
" bids you farewell."
)
.to_string(),
)
.into_bytes();
let mut response =
StatusResponse::bye("Stalwart IMAP4rev2 bids you farewell.".to_string()).into_bytes();
trc::event!(
Imap(trc::ImapEvent::Logout),