[File] [PATCH] of Magdir/database for Mozilla Mork database: update+mime+extensions *.mab *.msf *.dat
Jörg Jenderek
joerg.jen.der.ek at gmx.net
Sun Mar 17 19:37:22 UTC 2019
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
some days ago had some trouble with my thunderbird email address
books. So i run file command version 5.36 on such files and similar
samples. All examples are recognized by Magdir/database as but no
extension or mime type is shown.
Some information about that file format is found on web site, now
expressed by additional comment line like
# URL: http://fileformats.archiveteam.org/wiki/Mork
Depending on file content name extension is "mab", "msf" or "dat".
I do not fully understand the mork format, but the required keyword
phrase seems to describe the table kind according to Thunderbird
sources. So for my inspected samples this is done by additional lines
like:
>>28 search/996 ns:addrbk:db:table:kind:pab \b, address book
!:mime text/x-mork-mab
!:ext mab
Such mork samples seen to be just plain text files. So mime
"text/plain" can be displayed. But this makes no sense to me, because
such message would trigger the start of a text editor. In my opinion
more useful is the triggering of something like a converter from mork
format. This can be achieved by showing a specific user defined text
mime type.
Second sub class is now done by
>>28 search/996 ns:msg:db:table:kind:msgs \b, mail summary file
!:mime text/x-mork-msf
!:ext msf
Third sub class always describe file with name panacea.dat by
additional lines:
>>28 search/996 ns:msg:db:table:kind:folders \b, mail folder cache
!:mime text/x-mork-dat
!:ext dat
I do not know if mork database is used for other purposes. So catch
remaining possible samples like UNKNOWN-mork.txt by lines
>>28 default x \b, unknown
!:mime text/x-mork
After applying the above mentioned modifications by patch
file-5.36-database-mork.diff then all inspected examples are now
described with more details like:
abook.mab: Mozilla Mork database, version 1.4,
address book
history.mab: Mozilla Mork database, version 1.4,
address book
bugmail-1.msf: Mozilla Mork database, version 1.4,
mail summary file
panacea.dat: Mozilla Mork database, version 1.4,
mail folder cache
UNKNOWN-mork.txt: Mozilla Mork database, version 1.4,
unknown
I hope my two diff file can be applied in future version of file utili
ty.
With best wishes
Jörg Jenderek
- --
Jörg Jenderek
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCXI6h3gAKCRCv8rHJQhrU
1l3gAJ0QNXkjSF5wBZBETuwMb6aJwZPBUwCglluawoeHJb5eXqk3ylCtoSeLi8Q=
=O7Cw
-----END PGP SIGNATURE-----
-------------- next part --------------
--- file-5.36/magic/Magdir/database.old 2018-06-23 17:37:21 +0000
+++ file-5.36/magic/Magdir/database 2019-03-17 18:37:27 +0000
@@ -640,7 +640,28 @@
# Mork database.
+# URL: http://fileformats.archiveteam.org/wiki/Mork
# Used by older versions of Mozilla Suite and Firefox,
# and current versions of Thunderbird.
# From: David Korth <gerbilsoft at gerbilsoft.com>
+# Update: Joerg Jenderek
0 string //\ <!--\ <mdb:mork:z\ v=" Mozilla Mork database
+#!:mime text/plain
>23 string x \b, version %.3s
+# thunderbird-60.5.3/comm/mailnews/addrbook/src/nsAddrDatabase.cpp
+>>28 search/996 ns:addrbk:db:table:kind:pab \b, address book
+!:mime text/x-mork-mab
+!:ext mab
+# thunderbird-60.5.3/comm/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+>>28 search/996 ns:msg:db:table:kind:msgs \b, mail summary file
+!:mime text/x-mork-msf
+!:ext msf
+# http://kb.mozillazine.org/Files_and_folders_in_the_profile_-_Thunderbird
+# %APPDATA%\Thunderbird\Profiles\*.default\panacea.dat
+>>28 search/996 ns:msg:db:table:kind:folders \b, mail folder cache
+!:mime text/x-mork-dat
+!:ext dat
+#
+>>28 default x \b, unknown
+!:mime text/x-mork
+#!:ext
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.36-database-mork.diff.sig
Type: application/octet-stream
Size: 95 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20190317/30b6ca96/attachment.obj>
More information about the File
mailing list