Changing timestamps while qmail is running is "fairly" safe.  The only
file you should need to change is the one under /var/qmail/queue/info.
None of the others need to be changed.

I have a small script that does this for me based on the message number
from qmail-qread output.

======= begin script
#! /sbin/sh
dir=`expr $1 % 23`
echo aging $dir/$1
touch -t 197001010000 $dir/$1
======= end script

If you have modified the number of hash directories in qmail you will need
to modify the "dir=" line.  (qmail defaults to 23.)  You will also need to
use the correct path for sh in the first line.  This script runs on a DEC
Alpha box running DEC Unix.

I store the script in /var/qmail/queue/info and run it from there.

On Thu, 24 Jun 1999, Ray Marshall wrote:

> For the curious, I got an answer from Petr Novotny, to my question about
> removing queued messages.  First he said there is no such command.  Then,
> the rest of his message showed me how.
> 
>   1. I used qmail-qread to find out what's in the queue, and made note
>      of the message ID #s.
>   2. touch -t 010100001970 -c `find /var/qmail/queue -name "<message ID #>" -print`
>   3. killall -ALRM qmail-send
> 
> All messages bounced back to me, as undeliverable.
> 
> I should point out that Petr made it VERY clear that I should stop
> qmail-send first.  But one needs a little risk in their life, so I
> decided to attempt the above without stopping it.  Besides, I was just
> changing timestamps, not the files themselves.  Maybe someone who knows
> the internals of qmail-send can tell us if there was any real risk in
> not stopping it before changing the timestamps.
> 
> On Thu, 24 Jun 1999, Petr's answer to the above:
> 
> > This time, you weren't. By messing, I meant renaming, unlinking 
> > etc. touch is safe. On the other side, you're never too careful :-)
> 
> Again, Thanks Petr  /  Ray
> ------------------------------------+------------------------------------
> Ray Marshall <[EMAIL PROTECTED]>        | Unconditional Forgiveness & Love --
> Chapel Hill NC or Sutton Mills NH   |   The corner stones of coexistence.
> Work: [EMAIL PROTECTED]
> 
> 

---------------------------------
Timothy L. Mayo                         mailto:[EMAIL PROTECTED]
Senior Systems Administrator
localconnect(sm)
http://www.localconnect.net/

The National Business Network Inc.      http://www.nb.net/
One Monroeville Center, Suite 850
Monroeville, PA  15146
(412) 810-8888 Phone
(412) 810-8886 Fax

Reply via email to