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

E-mail address parser from config #3422

Open
polarismail opened this issue Dec 27, 2024 · 1 comment
Open

E-mail address parser from config #3422

polarismail opened this issue Dec 27, 2024 · 1 comment

Comments

@polarismail
Copy link

When adding an address such as: [email protected] in rcpt_to.routes.ini it fails to load it with error:

Invalid line in config file '/usr/local/haraka/config/rcpt_to.routes.ini'

This stems from haraka-config/lib/readers/ini.js which makes use of

module.exports = {
section: /^\s*[\s*([^\]]?)\s]\s*$/,
param: /^\s*([\w@:._-/[]]+)\s*(?:=\s*(.?)\s)?$/,
comment: /^\s*[;#].$/,
line: /^\s
(.?)\s$/,
blank: /^\s*$/,
continuation: /\[ \t]*$/,
is_integer: /^-?\d+$/,
is_float: /^-?\d+.\d+$/,
is_truth: /^(?:true|yes|ok|enabled|on|1)$/i,
is_array: /(.+)[]$/,
}

...

match = regex.param.exec(line)
if (!match) {
  exports.logger(`Invalid line in config file '${name}': ${line}`)
  continue
}

The param regex doesn't allow + signs. This can easily be changed, but will it break something else ?

@msimerson
Copy link
Member

Presuming that you've also changed the qmail config to use + as the extension delimiter, I can't immediately think of anything else it would break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants