[Dovecot] is there a script to find a message from a given username easily?

Patrick Nagel patrick.nagel at star-group.net
Fri Nov 27 10:19:48 EET 2009


Hi Gary,

On Thu, 26 Nov 2009 23:53:53 -0800, Gary Kline wrote:
> 	I used primarily mutt and sendmail for many years.  (And elm
> 	before mutt.)  All my mail was saved into ~/Mail.  Messages
> 	from, say, smith at foo.ber were stored in ~/Mail/smith; all mail
> 	from smith was catenated into one file, and if I wanted to
> 	find something that smith had written, I would just cd to
> 	~/Mail and grep or egrep on a likely word or phrase.
> 
> 	Is there a script that can reach into my server into My
> 	maildirectory and cp or symlink (say) ~/Maildir/smith's files:
> 
>  2 -rw-------  1 kline  kline   780 Apr 18  2008
>  1208585354.91013_3.aristotle:2,S
>  2 -rw-------  1 kline  kline   731 May 15  2008
>  1210901757.55602_4.aristotle:2,S
>  2 -rw-------  1 kline  kline   566 May 18  2008
>  1211140486.77700_3.aristotle:2,S
>  2 -rw-------  1 kline  kline   578 May 20  2008
>  1211326880.95596_4.aristotle:2,S
>  2 -rw-------  1 kline  kline   578 May 21  2008
>  1211393732.2283_3.aristotle:2,S
>  2 -rw-------  1 kline  kline   673 Apr 13  2009
>  1239636788.1457_3.aristotle:2,S
>  6 -rw-------  1 kline  kline  4242 Apr 14  2009
>  1239748901.16354_4.aristotle:2,S
> 
> 	into somthing named ~/Mail/smith, with all files catted
> 	together?  

I don't see the connection to Dovecot here.
It sounds to me as if you could profit from Dovecot's Virtual mailbox
plugin [1] though. Create a 'smith' virtual mailbox with the search
condition you formerly used with grep. You can then access this virtual
mailbox via IMAP like any other mailbox.

Patrick.

[1]: http://wiki.dovecot.org/Plugins/Virtual

-- 
STAR Software (Shanghai) Co., Ltd.            http://www.star-group.net/
Phone:    +86 (21) 3462 7688 x 826             Fax:   +86 (21) 3462 7779

PGP key E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc
Fingerprint:           E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005


More information about the dovecot mailing list