[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"resubmit" when crowded /deferred
Another smallish thing that I have in my bag is a cure for a trouble
that happens if your "deferred" directory becomes so crowded that shell
fails to expand "*". It happend several times here when the server that
provides getpwnam() information went down for some time. After it
happens, "resubmit" does not work anymore, forever.
I tried to make my solution as portable as I could; if you have GNU "mv"
the same thing can be done more elegant through "xargs".
Index: proto/zmailer.sh.in
===================================================================
RCS file: /cvsroot/zmailer/proto/zmailer.sh.in,v
retrieving revision 1.20
diff -u -r1.20 zmailer.sh.in
--- proto/zmailer.sh.in 2003/05/01 11:00:41 1.20
+++ proto/zmailer.sh.in 2003/05/06 14:09:27
@@ -271,7 +271,15 @@
esac
;;
resubmit)
- (cd $POSTOFFICE/deferred && mv -i [0-9]* ../router) 2> /dev/null
+ (cd $POSTOFFICE/deferred && \
+ while :; do
+ FILES=`ls -f|grep '^[0-9]'|head -1000`
+ if [ "X$FILES" = "X" ]; then
+ break
+ else
+ mv $FILES ../router || exit 1;
+ fi
+ done) 2> /dev/null
;;
bootclean)
rm -f $POSTOFFICE/.pid.* 2> /dev/null
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi