Matt Simerson > Mail-Toaster-5.37 > qqtool.pl

Download:
Mail-Toaster-5.37.tar.gz

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: Mail-Toaster-5.47

Message Expiration

Expiring messages does not remove them from the queue. It merely alters their expiration time. The messages will be removed from the queue after qmail attempts to deliver them one last time.

NAME ^

qqtool.pl - A tool for viewing and purging messages from a qmail queue

SYNOPSIS ^

        -a  action (delete, expire, list)
        -h  header to match (From, To, Subject, Date)
        -q  queue to search (local/remote)
        -s  search  (pattern to search for)
        -v  verbose
        
        If no -h is specified, then the pattern is searched for in any header.
        If no -q is specified, then both queues are searched.

        To list messages in queue from matt:
        qqtool.pl -a list -s matt -h From

        To list messages in queue with string \"foo\" in the headers:
        qqtool.pl -a list -s foo        

DESCRIPTION ^

Qmail Queue Tool (qqtool.pl)

This program will allow you to search and view messages in your qmail queue. It will also allow you to remove them, via expiration or deletion. It was written by Matt Simerson for the toaster users on mail-toaster@simerson.net

ChangeLog - http://www.tnpi.net/internet/mail/qqtool/changelog.shtml

INSTALL ^

Download Mail::Toaster from http://mail-toaster.org/Mail-Toaster.tar.gz

   fetch Mail-Toaster.tar.gz
   tar -xzf Mail-Toaster.tar.gz
   cd Mail-Toaster-x.xx
   perl Makefile.PL
   make install
   rehash

Run the script without any parameters and it will show you a menu of options.

   qqtool.pl

Sample Output

 # qqtool.pl
          Qmail Queue Tool   v 1.9

   -a  action (delete, expire, list)
   -h  header to match (From, To, Subject, Date)
   -q  queue to search (local/remote)
   -s  search  (pattern to search for)
   -v  verbose

If no -h is specified, then the pattern is searched for in any header. If no -q is specified, then both queues are searched.

To list messages in queue from matt:

   ./Mail-Toaster/qqtool.pl -a list -s matt -h From

To list messages in queue with string "foo" in the headers:

   ./Mail-Toaster/qqtool.pl -a list -s foo

User Preferences

There is one settings you can alter:

  $qdir is the path to your qmail queue

If you aren't using the default (/var/qmail/queue), edit qqtool.pl and adjust it.

AUTHOR ^

Matt Simerson <matt@tnpi.net>

CREDITS ^

Idea based on mailRemove.py by Dru Nelson <dru@redwoodsoft.com>, ideas borrowed from qmHandle by Michele Beltrame <mick@io.com>

Community funding was contributed by the following mail-toaster@simerson.net mailing list subscribers:

 erik erik at microcontroller.nl (organizer)
 Rick Romero  rick at valeoinc.com
 Chris Eaton  Chris.Eaton at med.ge.com
 Marius Kirschner marius at agoron.com
 J. Vicente Carrasco carvay at teleline.es
 Chris Odell  chris at redstarnetworks.net
 Pat Hayes pat at pathayes.net
 Dixon Cole dixon at levee.net
 Randy Meyer rjmeyer at humbleguys.net
 kristian kristian at waveit.com
 Michael Andreasen michael at subwire.dk (beer)
 Nathan Nieblas nnieblas at microtosh.net
 Randy Jordan ctech at pcwarp.com

BUGS ^

Report to author. Patches welcome.

TODO ^

In list mode, when showing messages in the queue, show which addresses delivery has failed for, so you know exactly why a message is still in the queue (useful for mailing lists with many recipients)

Interactive mode - step through messages offering to delete/expire/skip each

Clean mode - Leave qmail down after stopping it, useful for multiple invocations

Write the messages into a "inactive" queue before deleting them.

Ability to restore messages from "inactive" to the real queue.

SEE ALSO ^

http://www.mail-toaster.org/

COPYRIGHT ^

Copyright 2003-2010, The Network People, Inc. All Rights Reserved.

syntax highlighting: