return 0
fi
+ # example line:
+ # 2022-02-09 22:08:14.683 [59759] socket bind() to port 25 for address 10.8.0.28 failed: Cannot assign requested address: daemon abandoned
+ if [[ -e /etc/systemd/system/exim4.service.d/backup.conf ]]; then
+ regex="socket bind() to port 25 for address"
+ grep "$regex" $pl >> $pl-archive ||:
+ sed -i "/$regex/d" $pl
+ fi
+
# seems to randomly be caused by
# Starting exim4-base housekeeping, exim4-base.service
regex="^[^ ]* 00:00:0.* Failed writing transport results to pipe: Broken pipe$"
# them. write lock happens less but can fit under the same rule.
if (( count > 20 )); then
cat $pl
- elif ! $newlines; then
+ elif ! $newlines; then
grep "$regex" $pl >>$pl-archive
sed -i "/$regex/d" $pl
- fi
+ fi
fi
## end broken pipe ##