commit dfb6c847929e87c8dec5df2aa4b68de0f4b61689
Author: Arkadiusz Miśkiewicz <[email protected]>
Date:   Sat Nov 24 18:53:08 2012 +0100

    - rel 5; tidydb removes old records without freeing space; free space 
manually

 exim.cron.db | 12 +++++++++++-
 exim.spec    |  2 +-
 2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/exim.spec b/exim.spec
index 1564435..54dfebe 100644
--- a/exim.spec
+++ b/exim.spec
@@ -15,7 +15,7 @@ Summary(pl.UTF-8):    Agent Transferu Poczty Uniwersytetu w 
Cambridge
 Summary(pt_BR.UTF-8):  Servidor de correio eletrônico exim
 Name:          exim
 Version:       4.80.1
-Release:       4
+Release:       5
 Epoch:         2
 License:       GPL
 Group:         Networking/Daemons/SMTP
diff --git a/exim.cron.db b/exim.cron.db
index f041c83..9e1ed2b 100644
--- a/exim.cron.db
+++ b/exim.cron.db
@@ -9,12 +9,22 @@ for db in $(/usr/bin/find $SPOOLDIR/db -maxdepth 1 -name 
'*.lockfile' -or -type
        t=
        case "$db" in
                callout)
-                       t="-t 3d"
+                       t="-t 7d"
                        ;;
                *)
                        ;;
        esac
        /usr/bin/exim_tidydb $t $SPOOLDIR $db > /dev/null
+       # Try to lower it's size if it is bigger than 300M. Result still can be 
bigger if the db contains
+       # so much unexpired data.
+       toobig=$(/usr/bin/find $SPOOLDIR/db/$db -size +300M)
+       if [ -n "$toobig" ]; then
+               /usr/bin/exim_dumpdb $SPOOLDIR $db | /usr/bin/exim_dbmbuild 
-nowarn - $SPOOLDIR/db/$db.new > /dev/null
+               chown exim:exim $SPOOLDIR/db/$db.new
+               chmod 640 $SPOOLDIR/db/$db.new
+               mv $SPOOLDIR/db/$db.new $SPOOLDIR/db/$db
+       fi
+
 done
 
 exit 0
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/exim.git/commitdiff/dfb6c847929e87c8dec5df2aa4b68de0f4b61689

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to