Processed greylist.db by cron job only if it has non zero size

Resolves: rhbz#1689211
This commit is contained in:
Jaroslav Škarvada 2019-03-19 12:48:29 +01:00
parent 2600fcec66
commit 0fb4478e2e
2 changed files with 6 additions and 2 deletions

View File

@ -14,7 +14,7 @@
Summary: The exim mail transfer agent
Name: exim
Version: 4.92
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv2+
Url: http://www.exim.org/
Provides: MTA smtpd smtpdaemon server(smtp)
@ -577,6 +577,10 @@ test "$1" = 0 || %{_initrddir}/clamd.exim condrestart >/dev/null 2>&1 || :
%{_sysconfdir}/cron.daily/greylist-tidy.sh
%changelog
* Tue Mar 19 2019 Jaroslav Škarvada <jskarvad@redhat.com> - 4.92-5
- Processed greylist.db by cron job only if it has non zero size
Resolves: rhbz#1689211
* Mon Mar 4 2019 Jaroslav Škarvada <jskarvad@redhat.com> - 4.92-4
- Fixed greylist-conf patch
Related: rhbz#1679274

View File

@ -1,6 +1,6 @@
#!/bin/bash
if [ -r /var/spool/exim/db/greylist.db ]; then
if [ -s /var/spool/exim/db/greylist.db ]; then
sqlite3 /var/spool/exim/db/greylist.db <<EOF
.timeout 5000
DELETE FROM greylist WHERE expire < $((`date +%s` - 604800));