Unable to set up SMTP relay

I am on Yunohost 11.1.11.2.

I’m trying to use the guide here on setting up an email relay: Configure SMTP relay | Yunohost Documentation

However, starting I get this:

root@apps:/home/agger# sudo yunohost settings set smtp.relay.host -v mail539.pair.com
Traceback (most recent call last):
  File "/usr/bin/yunohost", line 77, in <module>
    yunohost.cli(
  File "/usr/lib/python3/dist-packages/yunohost/__init__.py", line 41, in cli
    ret = moulinette.cli(
  File "/usr/lib/python3/dist-packages/moulinette/__init__.py", line 111, in cli
    Cli(
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 507, in run
    ret = self.actionsmap.process(args, timeout=timeout)
  File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 584, in process
    return func(**arguments)
  File "/usr/lib/python3/dist-packages/yunohost/log.py", line 410, in func_wrapper
    result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/yunohost/settings.py", line 87, in settings_set
    return settings.set(key, value, args, args_file, operation_logger=operation_logger)
  File "/usr/lib/python3/dist-packages/yunohost/utils/config.py", line 424, in set
    self._ask()
  File "/usr/lib/python3/dist-packages/yunohost/utils/config.py", line 736, in _ask
    questions = ask_questions_and_parse_answers(
  File "/usr/lib/python3/dist-packages/yunohost/utils/config.py", line 1609, in ask_questions_and_parse_answers
    new_values = question.ask_if_needed()
  File "/usr/lib/python3/dist-packages/yunohost/utils/config.py", line 901, in ask_if_needed
    if self.visible and not evaluate_simple_js_expression(
  File "/usr/lib/python3/dist-packages/yunohost/utils/config.py", line 190, in evaluate_simple_js_expression
    return evaluate_simple_ast(node, context)
  File "/usr/lib/python3/dist-packages/yunohost/utils/config.py", line 78, in evaluate_simple_ast
    return context[node.id]
KeyError: 'smtp_relay_enabled'

There seems to be some sort of compatibility error in the Python code. Can I work around this or something similar?

1 Like

Seems to be a bug in the new global config panel mechanism.

Have you tried to do this first as a work around ?

yunohost settings set smtp.relay.smtp_relay_enabled -v yes
1 Like

Thanks a lot, that fixed it!

Plus précisément, c’est :
sudo yunohost settings set email.smtp.smtp_relay_enabled -v yes

I had to manually correct the error flagged in this topic : SMTP Forwards Not Working [Solved]
Shouldn’t it be already updated in Yunohost ?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.