[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: exim "Frozen" messages?



On Fri, Mar 05, 2004 at 10:40:31AM -0500, S.D.A. wrote:
| On Wed, Mar 03, 2004 at 06:47:23PM -0500 or thereabouts, Derrick 'dman' Hudson wrote:
| > On Wed, Mar 03, 2004 at 11:20:51PM +0100, David Jardine wrote:
| 
| <cut>
| 
| > | to prevent some embarrassingly old stuff getting out. 
| > 
| > Deleting the information cache like that doesn't delete any messages
| > from the queue.  Old messages on the queue will still be sent.  See
| > what is on the queue by running 'mailq'.  Remove a message by running
| > 'exim -Mrm <id>' where <id> is a message id obtained from 'mailq' or
| > the log file.
| 
| Dman -- Is there a way to do this with all the que'ed messages at once?
| 
| I just looked and I have almost 50 messages in the mailq. Very time
| consuming to do each one by one.

Something similar to :

    exim -Mrm `mailq | grep '^[^- ]' | cut -d ' ' -f 1`

BEWARE - I have not tested this on a system with exim because the exim
system has no mail on its queue.  You may need (or want) to adjust the
patterns for your system.  (I did force a message to get stuck on a
postfix system so I would have something listed in 'mailq')

Tools like grep, cut, sed, and awk (as well as the shell itself) are
essential for a unix/linux administrator.  With a working knowledge of
those tools you can easily automate many tasks, with a solution
talilored to your needs, using the information already available. 

-D

-- 
Love is not affectionate feeling, but a steady wish for the loved
person's ultimate good as far as it can be obtained.
    --C.S. Lewis
 
www: http://dman13.dyndns.org/~dman/            jabber: dman@dman13.dyndns.org

Attachment: signature.asc
Description: Digital signature


Reply to: