aboutsummaryrefslogtreecommitdiff
path: root/gnu/libexec/uucp/contrib/uuclean
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/libexec/uucp/contrib/uuclean')
-rw-r--r--gnu/libexec/uucp/contrib/uuclean23
1 files changed, 23 insertions, 0 deletions
diff --git a/gnu/libexec/uucp/contrib/uuclean b/gnu/libexec/uucp/contrib/uuclean
new file mode 100644
index 000000000000..e9c631c86c3e
--- /dev/null
+++ b/gnu/libexec/uucp/contrib/uuclean
@@ -0,0 +1,23 @@
+# This is a sample uuclean shell script
+# Copyright (C) 1992 Ian Lance Taylor
+# Do whatever you like with this script.
+#
+# Set some variables
+bindir=/usr/local/bin
+spooldir=/usr/spool/uucp
+#
+# Warn about all mail over two days old
+$(bindir)/uustat -c rmail -o 48 -N -Q -W"Unable to deliver; will try up to one week"
+# Return all mail over a week old
+$(bindir)/uustat -c rmail -o 168 -K -M -N -Q -W"Could not be delivered for over one week"
+# Throw away other requests over a week old
+$(bindir)/uustat -o 168 -K -M -N -Q -W"Over one week old"
+# Throw away any executions over three days old
+$(bindir)/uustat -o 72 -M -N -Q -W"Unable to execute for three days"
+#
+# Now delete any old spool files
+find $(spooldir) -ctime +8 -name '[CDX].*' -print -exec rm -f \{\} \;
+# Delete any old temporary files
+find $(spooldir) -atime +1 -ctime +1 -name 'TM.*' -print -exec rm -f \{\} \;
+# Delete any old preserved files
+find $(spooldir)/.Preserve -atime +14 -ctime +14 -print -exec rm -f \{\} \;