Include server hostname in SMTP greetings (closes #448)

This commit is contained in:
mdecimus
2024-05-20 16:15:32 +02:00
parent d8140dd0e1
commit faf34ecde2
2 changed files with 3 additions and 3 deletions

View File

@@ -566,7 +566,7 @@ impl Default for SessionConfig {
greeting: IfBlock::new::<()>(
"session.connect.greeting",
[],
"'Stalwart ESMTP at your service'",
"key_get('default', 'hostname') + ' Stalwart ESMTP at your service'",
),
},
ehlo: Ehlo {

View File

@@ -225,7 +225,7 @@ impl Message {
if params.is_smtp {
// Handle SMTP response
match read_smtp_data_respone(&mut smtp_client, params.hostname, &bdat_cmd).await {
match read_smtp_data_response(&mut smtp_client, params.hostname, &bdat_cmd).await {
Ok(response) => {
// Mark recipients as delivered
if response.code() == 250 {
@@ -485,7 +485,7 @@ pub async fn read_greeting<T: AsyncRead + AsyncWrite + Unpin>(
.map_err(|err| Status::from_smtp_error(hostname, "", err))
}
pub async fn read_smtp_data_respone<T: AsyncRead + AsyncWrite + Unpin>(
pub async fn read_smtp_data_response<T: AsyncRead + AsyncWrite + Unpin>(
smtp_client: &mut SmtpClient<T>,
hostname: &str,
bdat_cmd: &Option<String>,