
| Current Path : /proc/thread-self/root/usr/share/apport/package-hooks/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //proc/thread-self/root/usr/share/apport/package-hooks/amavisd-new.py |
'''Apport package hook for amavisd-new.
(c) 2019 Canonical Ltd.
Contributors:
Christian Ehrhardt <christian.ehrhardt@canonical.com>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version. See http://www.gnu.org/copyleft/gpl.html for
the full text of the license.
'''
import re
import apport
import apport.hookutils
def add_info(report, ui):
out = apport.hookutils.command_output(['systemctl', 'status',
'amavis']).strip()
fqdnbug = re.search("You must explicitly assign a FQDN of this host", out)
if fqdnbug:
ui.information("Your amavisd service fails to start as you have not \n"
"configured hostname to be a Fully Qualified Domain \n"
"Name. You will see the same reported by amavis, see \n"
" $ systemctl status amavis\n"
"Consider fixing either your hostname or set the \n"
"desired value at /etc/amavis/conf.d/05-node_id")
report['UnreportableReason'] = 'Known local configuation issue'
return