HELO host check
#3489
-
|
Is there a way in Haraka to check HELO host and close the connection if the HELO host is not a valid ASCII string? |
Beta Was this translation helpful? Give feedback.
Answered by
NickOvt
Oct 13, 2025
Replies: 1 comment 3 replies
-
|
I'm not sure if that's a good idea, but you could create a simple plugin for it. Just adjust the following code, which we use to reject unwanted connections from botnets: 'use strict';
exports.register = function () {
plugin.register_hook('helo', 'check_ymlf');
plugin.register_hook('ehlo', 'check_ymlf');
};
exports.check_ymlf = function (next, connection, helo) {
if (helo.trim().toLowerCase() === 'ylmf-pc') {
next(DENYDISCONNECT, 'I don\'t want talk to you ylmf');
} else {
next();
}
}; |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Indeed a simple plugin that just check for valid ascii string would suffice. I am more wondering whether that is built-in somewhere in Haraka or if it would be a good idea to build that in Haraka. As any normal email client/server would never send/accept a non-ascii HELO host (punycode is fine as it is ASCII)