mail: cannot send message: Process exited with a non-zero status

Bug #2018193 reported by Moses Moore
6
This bug affects 1 person
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.daily/integrit`

Expect to see:
 - large email with all the changes

What I saw instead:
 - ```
   /etc/cron.daily/integrit:
   mail: cannot send message: Process exited with a non-zero status
   run-parts: /etc/cron.daily/integrit exited with return code 1
   ```

Also seen:
 - in /var/log/mail.err
   "postfix/sendmail[]: fatal: root@thismachine(0): message file too big
 - 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.daily/integrit]
ProcVersionSignature: Ubuntu 5.15.0-70.77-generic 5.15.92
Uname: Linux 5.15.0-70-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.4
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Sun Apr 30 15:01:07 2023
ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: integrit
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.cron.daily.integrit: [modified]
modified.conffile..etc.integrit.integrit.conf: [inaccessible: [Errno 13] Permission denied: '/etc/integrit/integrit.conf']
modified.conffile..etc.integrit.integrit.debian.conf: [inaccessible: [Errno 13] Permission denied: '/etc/integrit/integrit.debian.conf']
mtime.conffile..etc.cron.daily.integrit: 2023-04-30T15:00:46.103883

Revision history for this message
Moses Moore (moses-ubuntu) wrote :
Revision history for this message
Moses Moore (moses-ubuntu) wrote :

What I did in the meantime:
- 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.daily/integrit:
  ```
  reportsize=$(stat -c %s "$REPORT")
  if [ $reportsize -gt 8388608 ]; then
      echo >&2 "$REPORT is $((reportsize / 1048576))MB email may not send"
  fi
  ```

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.