Re: persistant URI for Mail::Box::Maildir
Mark Overmeer <[email protected]> Wed, 22 Jun 2005 19:33:06 +0200
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Organization | MARKOV Solutions |
| Message-ID | <[email protected]> |
* Florian Lohoff ([email protected]) [050622 19:20]: > i am looking for a way to describe a persistant mailmessages URI without > the use of the MessageID which is in my case not unique (A lot of Spam > uses fixed Message-IDs). In case of libetpan i get the unique id from > the filename of the storage. With MailBox as well: print $msg->filename Depends how you want to use the unique-id. A filename is unique, on unix a (device,inode) combination is unique, in a database you can easily create a record-sequence number. Within your Perl program, Scalar::Util::refaddr will be unique. The best choice depends on the length of time you wish to guarantee that the numbers do not change. Besides, not all unique keys work both ways (like dev/inode: cannot easily find the file back) -- MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net