Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cumulative greeting message for custom greetings #3446

Merged
merged 3 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
- fix(outbound): in outbound hook_delivered, when mx.exchange contains
an IP, use mx.from_dns
- fix(bin/haraka): fix for finding path to config/docs/Plugins.md
- fix(connections): fix for infinitely expanding custom greeting #3446

### [3.0.5] - 2024-09-27

Expand Down
5 changes: 3 additions & 2 deletions connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -783,10 +783,11 @@
});
break;
default: {
let greeting = cfg.message.greeting;
if (greeting?.length) {
let greeting;
if (cfg.message.greeting?.length) {
// RFC5321 section 4.2
// Hostname/domain should appear after the 220
greeting = [...cfg.message.greeting];

Check warning on line 790 in connection.js

View check run for this annotation

Codecov / codecov/patch

connection.js#L790

Added line #L790 was not covered by tests
greeting[0] = `${this.local.host} ESMTP ${greeting[0]}`;
if (cfg.uuid.banner_chars) {
greeting[0] += ` (${this.uuid.substr(0, cfg.uuid.banner_chars)})`;
Expand Down
Loading