unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Question : Tag mail according to it directory path ?
@ 2011-12-12 20:59 emmanuel.leblond
  2011-12-20 22:14 ` Jameson Graef Rollins
  0 siblings, 1 reply; 3+ messages in thread
From: emmanuel.leblond @ 2011-12-12 20:59 UTC (permalink / raw)
  To: notmuch

Hi there !
I'm looking for using notmuch as my regular MUA, but I have a trouble so far.

I have a 4000+ mail collection already sorted in folders. The point is I would 
like to tag those mails through the notmuch database according to those 
folders. (i.g. the mails in the friend/foo directory will be tagged as friend 
and foo)

Is there any way to do this easily or should I make a quick'n dirty script to 
do the job ? (i.e. cat each mail of a folder, sed to get subject/receivers ect 
and do a notmuch search and tag with those arguments)

Regards

-- 

G.bleu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question : Tag mail according to it directory path ?
  2011-12-12 20:59 Question : Tag mail according to it directory path ? emmanuel.leblond
@ 2011-12-20 22:14 ` Jameson Graef Rollins
  2011-12-23 18:12   ` Emmanuel Leblond
  0 siblings, 1 reply; 3+ messages in thread
From: Jameson Graef Rollins @ 2011-12-20 22:14 UTC (permalink / raw)
  To: emmanuel.leblond, notmuch

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

On Mon, 12 Dec 2011 21:59:09 +0100, emmanuel.leblond@gmail.com wrote:
> 
> I have a 4000+ mail collection already sorted in folders. The point is I would 
> like to tag those mails through the notmuch database according to those 
> folders. (i.g. the mails in the friend/foo directory will be tagged as friend 
> and foo)

Hi, Emanuel.  There is already the ability to search for messages by
path with the "folder:" search prefix.  From "notmuch help search-terms":

	The folder: prefix can be used to search for email message
	files that are contained within particular directories within
	the mail store. Only the directory components below the top-level
	mail database path are available to be searched.

You can then easily apply arbitrary tags with something like:

notmuch tag +foo -- folder:foo

hth.

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question : Tag mail according to it directory path ?
  2011-12-20 22:14 ` Jameson Graef Rollins
@ 2011-12-23 18:12   ` Emmanuel Leblond
  0 siblings, 0 replies; 3+ messages in thread
From: Emmanuel Leblond @ 2011-12-23 18:12 UTC (permalink / raw)
  To: notmuch

Thanks for the answer, it's exactly what I was looking for !

Regards

-- 

G.bleu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-23 18:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-12 20:59 Question : Tag mail according to it directory path ? emmanuel.leblond
2011-12-20 22:14 ` Jameson Graef Rollins
2011-12-23 18:12   ` Emmanuel Leblond

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).