mail.news 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. #------------------------------------------------------------------------------
  2. # $File: mail.news,v 1.32 2024/11/10 16:59:38 christos Exp $
  3. # mail.news: file(1) magic for mail and news
  4. #
  5. # Unfortunately, saved netnews also has From line added in some news software.
  6. #0 string From mail text
  7. 0 string/t Relay-Version: old news text
  8. !:mime message/rfc822
  9. 0 string/t #!\ rnews batched news text
  10. !:mime message/rfc822
  11. 0 string/t N#!\ rnews mailed, batched news text
  12. !:mime message/rfc822
  13. 0 string/t Forward\ to mail forwarding text
  14. !:mime message/rfc822
  15. 0 string/t Pipe\ to mail piping text
  16. !:mime message/rfc822
  17. 0 string/tc delivered-to: SMTP mail text
  18. !:mime message/rfc822
  19. 0 string/tc return-path: SMTP mail text
  20. !:mime message/rfc822
  21. 0 string/t Path: news text
  22. !:mime message/news
  23. 0 string/t Xref: news text
  24. !:mime message/news
  25. 0 string/t From: news or mail text
  26. !:mime message/rfc822
  27. 0 string/t Date: news or mail text
  28. !:mime message/rfc822
  29. 0 string/t Subject: news or mail text
  30. !:mime message/rfc822
  31. 0 string/t Cc: news or mail text
  32. !:mime message/rfc822
  33. 0 string/t To: news or mail text
  34. !:mime message/rfc822
  35. 0 string/t Article saved news text
  36. !:mime message/news
  37. # Reference: http://quimby.gnus.org/notes/BABYL
  38. # Update: Joerg Jenderek
  39. # Note: used by Rmail in Emacs version 22 and before
  40. # is not text because of characters like Control-L Control-_
  41. 0 string/b BABYL\ OPTIONS: Emacs RMAIL
  42. #0 string/t BABYL Emacs RMAIL text
  43. # https://reposcope.com/mimetype/message/x-gnu-rmail
  44. !:mime message/x-gnu-rmail
  45. # ~/RMAIL
  46. !:ext /
  47. 0 string/t Received: RFC 822 mail text
  48. !:mime message/rfc822
  49. 0 string/t MIME-Version: MIME entity text
  50. #0 string/t Content- MIME entity text
  51. # From: Joerg Jenderek
  52. # URL: https://tools.ietf.org/rfc/rfc4155.txt
  53. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/m/mbox.trid.xml
  54. # Note: called "Standard Unix Mailbox" by TrID and
  55. # "mailbox file" by shared MIME-info database
  56. #https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/master/data/freedesktop.org.xml.in?ref_type=heads
  57. 0 string From\040 Mailbox text
  58. #!:mime text/plain
  59. !:mime application/mbox
  60. # like: INBOX 1.mbox
  61. !:ext /mbox
  62. # For control reasons show first line like: "From - Tue May 30 21:55:54 2023" "From noreply@unitymedia.info Thu Oct 13 17:23:38 2016"
  63. >0 string x \b, 1st line "%s"
  64. # TNEF files...
  65. # URL: http://fileformats.archiveteam.org/wiki/Transport_Neutral_Encapsulation_Format
  66. # https://en.wikipedia.org/wiki/Transport_Neutral_Encapsulation_Format
  67. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/t/tnef.trid.xml
  68. # https://interoperability.blob.core.windows.net/files/MS-OXTNEF/%5bMS-OXTNEF%5d-210817.pdf
  69. # Update: Joerg Jenderek
  70. # Note: moved and merged from ./msdos (version 1.154) there just called "TNEF"
  71. # partly verified by `tnef --list -v -f voice.tnef` and `ytnef -v triples.tnef`
  72. # TNEF magic From "Joomy" <joomy@se-ed.net>
  73. # TNEF_SIGNATURE
  74. 0 lelong 0x223E9F78 Transport Neutral Encapsulation Format (TNEF)
  75. !:mime application/vnd.ms-tnef
  76. # winmail.dat or win.dat by Microsoft Outlook
  77. !:ext tnef/dat
  78. # https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxtnef/7fdb64ee-7f63-4d95-9af1-c672e7475c3a
  79. # LegacyKey
  80. #>4 uleshort x \b, key %#4.4x
  81. # attrLevelMessage; Level where attribute applies like: 1~attrLevelMessage 2~attrLevelAttachment
  82. >6 ubyte !1 \b, 1st level %#2.2x
  83. # other ID (like 02900000h) or TnefVersion ID (idTnefVersion=06900800h)
  84. >7 ubelong !0x06900800 \b, 1st id %#8.8x
  85. >7 ubelong =0x06900800
  86. # TnefVersion length like: 4
  87. >>11 ulelong !4 \b, TnefVersion length %x
  88. # TNEFVersionData; TnefVersion data like: 00010000h
  89. >>15 ulelong !0x00010000h \b, version %#8.8x
  90. # Checksum like: 1
  91. >>19 uleshort !1 \b, checksum %#4.4x
  92. # attrLevelMessage; level of attOemCodepage like: 1
  93. >>21 ubyte !1 \b, level %#2.2x
  94. # idOEMCodePage; OEMCodePage ID like: 07900600h
  95. >>22 ubelong =0x07900600 \b, OEM codepage
  96. # OEMCodePage length like: 8
  97. >>>26 ulelong =8
  98. # OEMCodePageData; PrimaryCodePage like: 1251 1252
  99. >>>>30 ulelong x %u
  100. # OEMCodePageData; SecondaryCodePage; unused and SHOULD contain zero
  101. >>>>34 ulelong !0 and %u
  102. # OEMCodePageData Checksum like: E7h E8h
  103. >>>>38 uleshort x (checksum %#x)
  104. # attrLevelMessage of attMessageClass like: 1
  105. >>40 ubyte !1 \b, level %u
  106. # idMessageClass; ID of attMessageClass like: 08800700h
  107. >>41 ubelong =0x08800700 \b, MessageAttribute
  108. # attMessageClass length like: 16 24 25
  109. #>>>45 ulelong x (length %u)
  110. # attMessageClass data like: "IPM.Microsoft Mail.Note" "IPM.Note.Portada Newseum"
  111. # "IPM.Appointment" "IPM.Note.Microsoft.Voicemail.UM.CA"
  112. >>>45 pstring/l x "%s"
  113. # From: Kevin Sullivan <ksulliva@psc.edu>
  114. 0 string *mbx* MBX mail folder
  115. # From: Simon Matter <simon.matter@invoca.ch>
  116. 0 string \241\002\213\015skiplist\ file\0\0\0 Cyrus skiplist DB
  117. 0 string \241\002\213\015twoskip\ file\0\0\0\0 Cyrus twoskip DB
  118. # JAM(mbp) Fidonet message area databases
  119. # JHR file
  120. 0 string JAM\0 JAM message area header file
  121. >12 leshort >0 (%d messages)
  122. # Squish Fidonet message area databases
  123. # SQD file (requires at least one message in the area)
  124. # XXX: Weak magic
  125. #256 leshort 0xAFAE4453 Squish message area data file
  126. #>4 leshort >0 (%d messages)
  127. #0 string \<!--\ MHonArc text/html; x-type=mhonarc
  128. # Cyrus: file(1) magic for compiled Cyrus sieve scripts
  129. # URL: https://www.cyrusimap.org/docs/cyrus-imapd/2.4.6/internal/bytecode.php
  130. # URL: http://git.cyrusimap.org/cyrus-imapd/tree/sieve/bytecode.h?h=master
  131. # From: Philipp Hahn <hahn@univention.de>
  132. # Compiled Cyrus sieve script
  133. 0 string CyrSBytecode Cyrus sieve bytecode data,
  134. >12 belong =1 version 1, big-endian
  135. >12 lelong =1 version 1, little-endian
  136. >12 belong x version %d, network-endian
  137. # Dovecot mail server, version 2.2 and later.
  138. # Dovecot mailing list: dovecot@dovecot.org
  139. # File format spec: https://wiki.dovecot.org/Design/Dcrypt/#File_format
  140. # From: Stephen Gildea
  141. 0 string CRYPTED\003\007 Dovecot encrypted message
  142. >9 byte x \b, dcrypt version %d