Lines Matching +full:a +full:- +full:oq +full:- +full:z
3 # re-mqueue -- requeue messages from queueA to queueB based on age.
8 # Usage: re-mqueue [-d] queueA queueB seconds
10 # -d enable debugging
15 # Example: re-mqueue /var/spool/mqueue /var/spool/mqueue2 2700
17 # Moves the qf* and df* files for a message from /var/spool/mqueue to
20 # The qf* file can't be used for age checking as it's partially re-written
23 # Rationale: With a limited number of sendmail processes allowed to run,
34 # four hours. Messages more than a day old are moved to /var/spool/mqueue4
35 # where sendmail runs three times a day. The idea is that a message is
37 # old-age ghetto.
39 # (Each must be re-formed into a single line before using in crontab)
41 # 08 * * * * /usr/local/libexec/re-mqueue /var/spool/mqueue ## /var/spool/mqueue2 2700
42 # 11 * * * * /usr/lib/sendmail -oQ/var/spool/mqueue2 -q > ## > /var/log/mqueue2 2>&1
43 # 38 * * * * /usr/local/libexec/re-mqueue /var/spool/mqueue2
45 # 41 1,5,9,13,17,21 * * * /usr/lib/sendmail -oQ/var/spool/mqueue3 -q ## > /var/log/mqueue3 2>…
46 # 48 * * * * /usr/local/libexec/re-mqueue /var/spool/mqueue3
48 #53 3,11,19 * * * /usr/lib/sendmail -oQ/var/spool/mqueue4 -q > ## > /var/log/mqueue4 2>&1
77 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
87 # @(#)$OrigId: re-mqueue,v 1.3 1995/05/25 18:14:53 p-pomes Exp $
93 # Allow zero-length df files (empty message body)
98 # Improve handling of race between re-mqueue and sendmail
115 die "Usage: $0 [-d] queueA queueB seconds\n" if ($#ARGV < 2);
117 while ($_ = $ARGV[0], /^-/) {
119 last if /^--$/;
120 /^-d/ && $debug++;
127 die "$0: $queueA not a directory\n" if (! -d $queueA);
128 die "$0: $queueB not a directory\n" if (! -d $queueB);
129 die "$0: $age isn't a valid number of seconds for age\n" if ($age =~ /\D/);
131 # chdir to $queueA and read the directory. When a df* file is found, stat it.
135 # Otherwise re-link the qf* and df* files into $queueB then release the lock.
150 if (! -e $qfile || -z $qfile) {
151 print "$qfile is gone or zero bytes - skipping\n" if ($debug);
158 print "$dfile is gone - skipping\n" if ($debug);
164 printf ("%s is %d seconds old - skipping\n", $dfile, $now-$mtime) if ($debug);
169 if (-e "$queueB/$dfile") {
170 print "$queueb/$dfile already exists - skipping\n" if ($debug);
173 if (-e "$queueB/$qfile") {
174 print "$queueb/$qfile already exists - skipping\n" if ($debug);
177 if (-e "$queueB/$xfile") {
178 print "$queueb/$xfile already exists - skipping\n" if ($debug);
187 $retval = flock(QF, $LOCK_EX|$LOCK_NB) || ($retval = -1);
188 if ($retval == -1) {
189 print "$qfile already flock()ed - skipping\n" if ($debug);
196 if (! -e $dfile) {
197 print "$mfile sent - skipping\n" if ($debug);
199 if (-z $qfile) {
220 if (-e "$xfile") {
246 if (-e "$xfile") {