so spake David Champion [2004.06.04 @ 15:43]: > * On 2004.06.04, in <20040604201916.GA26043@xxxxxxx>, > * "steVe" <steve@xxxxxxx> wrote: > > > > anyone know the best way to have mutt automatically flag messages when > > they come in? i know you can do some things like this in procmail and > > have them sent to a certain place, or add a special header or > > whatever, but how can one make mutt flag messages ONLY if the search > > A mutt "flag" is indicated in the on-disk mail file, in the X-Status: > header. So you can flag them with procmail, if you like. For example, I > have this: > > :0 f > * ^(Importance: High|Priority: Urgent) > | formail -I "X-Status: F" this is good to know! thanks! > > succeeds? i thought me's user-defined macro patch might help, but it > > only seems to just name certain macros. there still seems to be no > > ability to do simple if-then kind of conditions. > > > > folder-hook blah push "/~s (plumbing\|linux) ~b 'steve\|poop'\nF" > > That patch lets you name a macro with a symbol. But you can do what you > want with a macro or a hook, with or without the patch. > > With a macro (this is all one line): > macro index \;f "<tag-pattern>~s '(plumbing\|linux)' ~b > 'steve\|poop'<enter><tag-prefix><set-flag>!" > > or with a hook (likewise): > folder-hook blah "push <tag-pattern>~s '(plumbing\|linux)' ~b > 'steve\|poop'<enter><tag-prefix><set-flag>!" der...of course! silly me for forgetting to tag first. thanks! > -- > -D. dgc@xxxxxxxxxxxx NSIT::ENSS > No money, no book. No book, no study. No study, no pass. > No pass, no graduate. No graduate, no job. No job, no money. > T h e U n i v e r s i t y o f C h i c a g o so spake Nicolas Rachinsky [2004.06.04 @ 15:45]: > * steVe <steve@xxxxxxx> [2004-06-04 15:19 -0500]: > > folder-hook blah push "/~s (plumbing\|linux) ~b 'steve\|poop'\nF" > > > > will work fine, however, if no message matches the above condition of > > having a subject line containing 'plumbing' or 'linux' and 'steve' or > > 'poop' in the body, the first new message or last message in the mailbox > > blah will always be flagged. any ideas? > > Use '<tag-prefix-cond>F' instead of 'F'. > > Nicolas thanks. i haven't looked into this yet as i think David's suggestion will work for me, but i'll check it out. cheers, -- *------------------------* // ste\/e || 0x44288D05 // *------------------------*
Attachment:
pgpxR6b5hA1lq.pgp
Description: PGP signature