Error running "tools regen-conf postfix"

My YunoHost server

Hardware: Home server
YunoHost version: 11.0.9.12
I have access to my server : SSH, web UI
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I receive this error each day:

=================================
System configurations (regenconf)
=================================
 
[WARNING] Configuration file /etc/postfix/sasl_passwd.db appears to have been manually modified.
  - This is probably OK if you know what you're doing! YunoHost will stop updating this file automatically... But beware that YunoHost upgrades could contain important recommended changes. If you want to, you can inspect the differences with 'yunohost tools regen-conf postfix --dry-run --with-diff' and force the reset to the recommended configuration with 'yunohost tools regen-conf postfix --force'

When I run the command yunohost tools regen-conf postfix --dry-run --with-diff I get the following error:

admin@yunohost:~$ sudo yunohost tools regen-conf postfix --dry-run --with-diff
Traceback (most recent call last):
  File "/usr/bin/yunohost", line 71, in <module>
    yunohost.cli(
  File "/usr/lib/python3/dist-packages/yunohost/__init__.py", line 25, 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 505, in run
    ret = self.actionsmap.process(args, timeout=timeout)
  File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 586, in process
    return func(**arguments)
  File "/usr/lib/python3/dist-packages/yunohost/tools.py", line 322, in tools_regen_conf
    return regen_conf(names, with_diff, force, dry_run, list_pending)
  File "/usr/lib/python3/dist-packages/yunohost/log.py", line 419, in func_wrapper
    result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/yunohost/regenconf.py", line 251, in regen_conf
    _get_files_diff(system_path, pending_path, True) if with_diff else None
  File "/usr/lib/python3/dist-packages/yunohost/regenconf.py", line 471, in _get_files_diff
    orig_file = orig_file.readlines()
  File "/usr/lib/python3.9/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb8 in position 52: invalid start byte

How can I begin to troubleshoot? Thanks!!

Ah I think the error is because --with-diff won’t like to try show a diff of a “binary” file which are not regular text files (in this case, sasl_passwd.db)

I think you can just force the regen conf and that should be okay (assuming you have no other diff in postfix) :

yunohost tools regen-conf postfix --force

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