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

Re: exim "Frozen" messages?



On Fri, Mar 05, 2004 at 12:04:01PM -0500, S.D.A. wrote:
| On Fri, Mar 05, 2004 at 11:44:30AM -0500 or thereabouts, Derrick 'dman' Hudson wrote:
| > On Fri, Mar 05, 2004 at 10:40:31AM -0500, S.D.A. wrote:
| 
| > | 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. 
| 
| I agree, and I'm intent on learning those tools. Thanks to you, and also
| Mark McRitchie, who helped me offlist with a sed script. I need to learn
| both sed and grep. Regular expressions should be fun to learn.

Regular expressions are not difficult and come in very handy.  Just
bear in mind that they aren't applicable in every situation nor will a
single regex solve eveyr problem.  If you try to use a single regex to
solve every problem in the world, you'll fry your mind.  But if you
apply them in contexts where they are appropriate and keep them
simple, you'll enjoy using them and letting them take a lot of work
off your hands.

If you want a book to read, "Learning Regular Expressions" (or
something similar to that) by Jeffrey Friedl, published by O'Reilly,
is a very good introduction.  The old revision I have is out of date
when it refers to python's regex engine, and maybe some others too,
however the general idea is still sound and I've heard that a new
edition is available.

-D

-- 
The Lord detests all the proud of heart.
Be sure of this: They will not go unpunished.
        Proverbs 16:7
 
www: http://dman13.dyndns.org/~dman/            jabber: dman@dman13.dyndns.org

Attachment: signature.asc
Description: Digital signature


Reply to: