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