- Fix potential security issue with logfile rotation CVE-2025-53881 (bsc#1246457) OBS-URL: https://build.opensuse.org/request/show/1307168 OBS-URL: https://build.opensuse.org/package/show/server:mail/exim?expand=0&rev=305
57 lines
1.3 KiB
Plaintext
57 lines
1.3 KiB
Plaintext
/var/log/exim/main.log {
|
|
su mail mail
|
|
compress
|
|
dateext
|
|
notifempty
|
|
missingok
|
|
create 640 mail mail
|
|
rotate 99
|
|
weekly
|
|
#maxage 365
|
|
prerotate
|
|
logdir=/var/log/exim
|
|
cd $logdir
|
|
test -f /etc/sysconfig/exim && source /etc/sysconfig/exim
|
|
if test "$EXIM_REPORT_WEEKLY" = yes; then
|
|
day=`date +%Y%m%d`
|
|
report=weekly_report-$day
|
|
eximstatsdir=/srv/www/eximstats/$day
|
|
tempdir=`mktemp -d`
|
|
touch $tempdir/$report; chmod 640 $tempdir/$report; chown :mail $tempdir/$report
|
|
eximstats main.log > $tempdir/$report
|
|
if test "$EXIM_REPORT_WEEKLY_HTML" = yes; then
|
|
mkdir $eximstatsdir
|
|
eximstats -html -charts -chartdir $eximstatsdir main.log > $eximstatsdir/index.html
|
|
fi
|
|
if ! test -e no_report_mail && test "$EXIM_REPORT_WEEKLY_SEND" = yes; then mail -s "$(sed -n '2{p;q;}' < $tempdir/$report) ($(hostname))" postmaster < $tempdir/$report; fi
|
|
if test -f $report.gz; then old $report.gz; fi
|
|
gzip -f -9 $tempdir/$report && mv -n $tempdir/$report.gz $logdir/ && rmdir $tempdir
|
|
fi
|
|
endscript
|
|
}
|
|
|
|
/var/log/exim/reject.log {
|
|
su mail mail
|
|
compress
|
|
dateext
|
|
notifempty
|
|
missingok
|
|
create 640 mail mail
|
|
rotate 99
|
|
size 4M
|
|
#maxage 365
|
|
}
|
|
|
|
/var/log/exim/panic.log {
|
|
su mail mail
|
|
compress
|
|
dateext
|
|
notifempty
|
|
missingok
|
|
create 640 mail mail
|
|
rotate 99
|
|
size 1M
|
|
#maxage 365
|
|
}
|
|
|