Re: procmail log tailing (was Re: mutt and noatime partitions)

2002-03-05 Thread David T-G

Cameron, et al --

...and then Cameron Simpson said...
% 
% On 17:15 02 Mar 2002, christophe barbé [EMAIL PROTECTED] wrote:
% | It seems there is no option to avoid the use of the access time.
...
% 
% Instead, I have my procmail recipe write a line to a log file when
% interesting email arrives (i.e. only when one of a few recipes fires).
% And I have a small window which tails that logfile. If I were in text mode I
% could just tail that log in the background.

I like this, and I've been looking for something this simple.  Can you
post or send your config for me to blatantly copy? :-)


TIA  HAND

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg25045/pgp0.pgp
Description: PGP signature


Re: mutt and noatime partitions

2002-03-05 Thread David T-G

Cameron, et al --

...and then Cameron Simpson said...
% 
...
% have the folder open in one mutt at a time (which I suppose is desirable
% anyway - I enforce that in my wrapper script).

I've heard this before and I still haven't seen a reason to worry about
having multiple mutts open.  Can anyone illustrate a scenario (mbox is
fine, since that's what I use and what I imagine to be most vulnerable,
but any format to explain will do) where having two mutts open on a
well-configured system would cause a problem?


TIA  HAND

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg25046/pgp0.pgp
Description: PGP signature


Re: procmail log tailing (was Re: mutt and noatime partitions)

2002-03-05 Thread Christopher S. Swingley

David,

 % Instead, I have my procmail recipe write a line to a log file when
 % interesting email arrives (i.e. only when one of a few recipes fires).
 % And I have a small window which tails that logfile. If I were in text mode I
 % could just tail that log in the background.
 
 I like this, and I've been looking for something this simple.  Can you
 post or send your config for me to blatantly copy? :-)

I don't actually use this anymore (since someone mentioned
gkrellm-mailcheck), but this is the sort of thing I tried:

# Here's how we send the subject to the logfile
:0
* Subject: test
{
:0 c: logger.lock
| formail -X Subject: | logger -p kern.warn

:0:
/var/mail/cswingle
}

kern.warn probably isn't exactly the right facility and level to
use, but I wanted to make sure it showed up on my syslog server.
Maybe mail.info, or something.

Test first, I'm far from a procmail wizard.

Chris
-- 
Christopher S. Swingley   phone: 907-474-2689
Computer Systems Manager  email: [EMAIL PROTECTED]
IARC -- Frontier Program  GPG and PGP keys at my web page:
University of Alaska Fairbankswww.frontier.iarc.uaf.edu/~cswingle



Re: mutt and noatime partitions

2002-03-05 Thread Cameron Simpson

On 15:39 05 Mar 2002, David T-G [EMAIL PROTECTED] wrote:
| ...and then Cameron Simpson said...
| % have the folder open in one mutt at a time (which I suppose is desirable
| % anyway - I enforce that in my wrapper script).
| 
| I've heard this before and I still haven't seen a reason to worry about
| having multiple mutts open.  Can anyone illustrate a scenario (mbox is
| fine, since that's what I use and what I imagine to be most vulnerable,
| but any format to explain will do) where having two mutts open on a
| well-configured system would cause a problem?

Well, I guess it depend on locking and rewrite policies.

Open folder in two mutts. Delete a few in one, read few other.
Delete some others in the second mutt, read some more.
Sync each.

Unless the two mutts have some psychic connection to each other, aren't
new and read flags going to get dropped? Aren't items deleted on
one side going to survive if the other side is synched second?
-- 
Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/

Dawn, V8, miles, breakfast, miles, gas, miles, miles, gas, miles,
miles, milkshake, miles, shop, miles, park, M and G, happy hour,
freeze-dried dinner, journals, bunk, dawn, miles, miles, ...
Bruce W. Robinson [EMAIL PROTECTED]



Re: procmail log tailing (was Re: mutt and noatime partitions)

2002-03-05 Thread Mike Schiraldi

 I like this, and I've been looking for something this simple  Can you
 post or send your config for me to blatantly copy? :-)

I use a modified version of a program called root-tail
(wwwvarcx/root-tail) to tail -f my procmail log, /var/log/secure, and a
few other files Each one is displayed in a different color, directly onto
my root window (in other words, my desktop wallpaper)

If you're interested, reply directly to me and i'll send you my
modifications


-- 
Mike Schiraldi
VeriSign Applied Research



msg25053/pgp0.pgp
Description: PGP signature


Re: procmail log tailing (was Re: mutt and noatime partitions)

2002-03-05 Thread Cameron Simpson

On 15:37 05 Mar 2002, David T-G [EMAIL PROTECTED] wrote:
| % On 17:15 02 Mar 2002, christophe barb? [EMAIL PROTECTED] wrote:
| % | It seems there is no option to avoid the use of the access time.
| ...
| % Instead, I have my procmail recipe write a line to a log file when
| % interesting email arrives (i.e. only when one of a few recipes fires).
| % And I have a small window which tails that logfile. If I were in text mode I
| % could just tail that log in the background.
| 
| I like this, and I've been looking for something this simple.  Can you
| post or send your config for me to blatantly copy? :-)

Sure. Here's an example recipe:

: 0
* ^(to|cc|bcc):.*cs@zip\.com\.au
{

  : 0hc
  | mhdrs | { while read hdr body; do eval HDR_$hdr=\$body; done; alert -c 
yellow `timecode` +attn $HDR_FROM; $HDR_SUBJECT; }

  :0 whf
  | formail -A X-Label: Personal 

  : 0w
  | /usr/lib/nmh/rcvstore +attn -unseen
}

This catches email to me.

The internal part does 3 things: writes the logfile line, tags the message
with an X-Label header, and drops in into my Attention mailbox with MH.

You want the first bit.

Mhdrs is this script:

http://www.zip.com.au/~cs/scripts/mhdrs

which just recites the message headers in a shell-friendly form. For
example, this message gets:

FROM Cameron Simpson [EMAIL PROTECTED]
TO David T-G [EMAIL PROTECTED]
CC Mutt Users' List [EMAIL PROTECTED]
BCC 
SUBJECT Re: procmail log tailing (was Re: mutt and noatime partitions)
REPLY_TO [EMAIL PROTECTED]
IN_REPLY_TO [EMAIL PROTECTED]

and the while loop just picks these up and sets $HDR_FROM, $HDR_TO etc
to match.  After the while loop you do whatever you like. Which could
be as simple as:

echo $HDR_FROM; $HDR_SUBJECT your-log-filename-here

As you can see I pass it to yyet another script, but it's core purpose
it to write it to my alert logfile, in yellow.

Then my FVWM setup have a 3 line xterm running what is essentially
tail -f of this log file.
-- 
Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/

This article could be hazardous to your credulity.
- Jim Brown [EMAIL PROTECTED]



Re: mutt and noatime partitions

2002-03-03 Thread Petri Kaukasoina

On Sat, Mar 02, 2002 at 05:15:04PM -0500, christophe barbé wrote:
 Is there a way to use mutt on a noatime partitions ?
 It seems there is no option to avoid the use of the access time.

Yes, configure with flag --enable-buffy-size.



Re: mutt and noatime partitions

2002-03-02 Thread Cameron Simpson

On 17:15 02 Mar 2002, christophe barbé [EMAIL PROTECTED] wrote:
| Is there a way to use mutt on a noatime partitions ?
| It seems there is no option to avoid the use of the access time.
| How does other laptop user ?
| I recently added the noatime option to my root partition to extend my
| battery lifetime but mutt is not really usable this way.

Well, the core issue is now you are being notified of new email.
It may be necessary to change your setup or habits.

For myself, I don't keep mutt up all the time - I open it to read
email and quit when done. So I'm not using mutt's new mail monitor.

Also, I'm not using the shell's $MAIL monitor (which depends on atime,
pronouncing new email with atime($MAIL)  mtime($MAIL)).

Instead, I have my procmail recipe write a line to a log file when
interesting email arrives (i.e. only when one of a few recipes fires).
And I have a small window which tails that logfile. If I were in text mode I
could just tail that log in the background.

In this way I am not dependent on atime. It may be you can adapt these
notions to your needs.

Cheers,
-- 
Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/

I think there is a world market for maybe five computers.
  --Thomas Watson, chairman of IBM, 1943



Re: mutt and noatime partitions

2002-03-02 Thread christophe barb

On Sat, Mar 02, 2002 at 08:36:00PM -0500, christophe barbé wrote:
 if I quit mutt after reading and relaunch each later (which is not a big
s/each/it/

sorry

-- 
Christophe Barbé [EMAIL PROTECTED]
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8  F67A 8F45 2F1E D72C B41E

Cats are rather delicate creatures and they are subject to a good
many ailments, but I never heard of one who suffered from insomnia.
--Joseph Wood Krutch



msg24914/pgp0.pgp
Description: PGP signature


Re: mutt and noatime partitions

2002-03-02 Thread Cameron Simpson

On 20:36 02 Mar 2002, christophe barbé [EMAIL PROTECTED] wrote:
|  For myself, I don't keep mutt up all the time - I open it to read
|  email and quit when done. So I'm not using mutt's new mail monitor.
|  Also, I'm not using the shell's $MAIL monitor (which depends on atime,
|  pronouncing new email with atime($MAIL)  mtime($MAIL)).
|  Instead, I have my procmail recipe write a line to a log file when
|  interesting email arrives (i.e. only when one of a few recipes fires).
|  And I have a small window which tails that logfile. [...]
| 
| Thank you for you answer, happy to not be alone ;-).
| For my main inbox I have my gkrellm Mailwatch Plugin that keep track of
| new mail without atime.
| My problem is with mailing lists. As I understand it (but I haven't tried it, 
| if I quit mutt after reading and relaunch each later (which is not a big
| overhead) mutt will reports new mails in mailing-list boxes even if I
| have already read all mails.

Shouldn't. Except for MH folders, mutt keeps message status in a header,
and so will recognise new messages reliably because they will either
lack the header line altogether or have the header line with an N flag.

| I was thinking about an mutt option to detect new mails without
| depending on atime (something like keeping an internal atime and
| checking mbox content when mtime  internal atime).

If you keep it open all the time it may work, provided you only ever
have the folder open in one mutt at a time (which I suppose is desirable
anyway - I enforce that in my wrapper script).

However, I think you'll find it unnecessary.
-- 
Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/

What's a pencil? Is that like a PDA stylus?
- [EMAIL PROTECTED] (Elizabeth Schwartz)