mail: cannot send message: Process exited with a non-zero status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
integrit (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Steps to reproduce:
- install postfix (any MTA?) for local mail only, and mailutils for `/usr/bin/mail`
- install integrit, default config
- run it once to set the "known" values
- `apt get upgrade`
- launch `/etc/cron.
Expect to see:
- large email with all the changes
What I saw instead:
- ```
/etc/
mail: cannot send message: Process exited with a non-zero status
run-parts: /etc/cron.
```
Also seen:
- in /var/log/mail.err
"postfix/
- adding `stat -c %s "$REPORT"` to the cronjob it says the $REPORT file size is 12MB
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: integrit 4.1-1.1 [modified: etc/cron.
ProcVersionSign
Uname: Linux 5.15.0-70-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.4
Architecture: amd64
CasperMD5CheckR
Date: Sun Apr 30 15:01:07 2023
ProcEnviron:
TERM=screen-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: integrit
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
modified.
modified.
mtime.conffile.
What I did in the meantime: daily/integrit:
- see if the report tempfile is still in /var/lib/integrit
- cd /var/lib/integrit ; mv {current,known}.cdb # and pray to the divine for protection
- add this before the 'mail' line at the bottom of /etc/cron.
```
reportsize=$(stat -c %s "$REPORT")
if [ $reportsize -gt 8388608 ]; then
echo >&2 "$REPORT is $((reportsize / 1048576))MB email may not send"
fi
```