Comment 1 for bug 1935559

Revision history for this message
Joshua Powers (powersj) wrote :

# Steps to reproduce

1. $ multipass launch bionic --name b1
2. $ multipass exec b1 bash
3. $ sudo apt update
4. $ sudo apt install aide
5. At the MTA configuration select "No configuration"
6. $ sudo run-parts /etc/cron.daily
7. $ sudo run-parts /etc/cron.daily
8. $ sudo ls /run/aide

At this point, the /run/aide directory will have a cron.daily and cron.daily.old* folder

It appears that the aide crontab will fail if an MTA is not configured or is not even running. Instead of selecting "No configuration" stopping the postfix process will cause the same failure.

# Possible workarounds/fixes

1. Remove `set -e` from /etc/cron.daily/aide or add `set +e` around the postfix section to ensure the cronjob completes even if the MTA is down

2. If this is due to a unconfigured MTA, then ensure that it is configured For example, set the MTA to a local configuration:

$ sudo debconf-set-selections <<< "postfix postfix/main_mailer_type select 'Local only'"
$ sudo dpkg-reconfigure -f noninteractive postfix