[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

Add connection close message #2730

Merged
merged 3 commits into from
Nov 10, 2019
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
2 changes: 2 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### New features

* connection_close_message: added ability to override close connection message replacing `closing connection. Have a jolly good day.`

### Fixes

* TLS: don't abort loading certs in config/tls dir when an error is encountered.
Expand Down
1 change: 1 addition & 0 deletions config/connection_close_message
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
closing connection. Have a jolly good day.
5 changes: 3 additions & 2 deletions connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ class Connection {
this.transaction = null;
this.tran_count = 0;
this.capabilities = null;
this.ehlo_hello_message = config.get('ehlo_hello_message') || 'Haraka is at your service.'
this.ehlo_hello_message = config.get('ehlo_hello_message') || 'Haraka is at your service.';
this.connection_close_message = config.get('connection_close_message') || 'closing connection. Have a jolly good day.';
this.banner_includes_uuid = !!config.get('banner_includes_uuid');
this.deny_includes_uuid = config.get('deny_includes_uuid') || null;
this.early_talker = false;
Expand Down Expand Up @@ -925,7 +926,7 @@ class Connection {
}
quit_respond (retval, msg) {
const self = this;
this.respond(221, msg || `${this.local.host} closing connection. Have a jolly good day.`, () => {
this.respond(221, msg || `${this.local.host} ${this.connection_close_message}`, () => {
self.disconnect();
});
}
Expand Down
4 changes: 4 additions & 0 deletions docs/CoreConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,7 @@ The list of plugins to load
Defaults to 1000. There's a potential denial of service in large numbers of
MIME parts in carefully crafted emails. If this limit is too low for some
reason you can increase it by setting a value in this file.

* connection\_close\_message

Defaults to `closing connection. Have a jolly good day.` can be overrridden with custom text