MIME Multipurpose Internet Mail Extensions MIME permet: * messages ecrits avec des caracteres non US-ASCII * differents formats pour des messages non texte * mail comportant plusieurs partie MIME est decrit dans les RFC2045, 2046, ..., 2049 ################################################################## Les principaux champs du header sont: * MIME-Version pour identifier le numero de version ex: MIME-Version: 1.0 * Content-Type header pour specifier le contenu ex: Content-type: text/plain (par defaut) a la place de text: image, audio, video, application a la place de plain: sous-type enregistre selon la procedure decrite dans RFC 2048 * Content-Transfer-Encoding pour decrire le codage utilise ex: Content-transfer-encoding: base64 valeurs possibles: 7bit (par defaut) 8bit (binaire mais avec des lignes de taille maxi 998 octets) binary base64: similaire a uuencode quoted-printable: apr=0Cs le temps, bient=3Dt ... * Content-ID est unique et identifie le mail ################################################################## Exemple: MIME-Version: 1.0 Content-type: multipart/mixed; boundary="separateur" Zone ignoree ou on peut mettre une explication pour les personnes n'ayant pas MIME --separateur zone de text/plain par defaut --separateur Content-type: text/plain; charset=us-ascii zone de texte --separateur Content-Type: audio/basic Content-Transfer-Encoding: base64 ici un fichier musique --separateur Content-Type: image/jpeg Content-Transfer-Encoding: base64 ici une image --separateur Content-Type: text/enriched ici du html ici du html --separateur-- ################################################################## fichier .mailcap image/*; xv %s audio/*; ... application/postscript; goshtview %s ################################################################## S/MIME Secure MIME decrit dans la RFC2311 Cela permet l'authentification, l'integrite du message, la non-repudiation,... Exemple de message crypte: Content-Type: application/pkcs7-mime; smime-type=enveloped-data; name=smime.p7m Content-Transfer-Encoding: base64 rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 0GhIGfHfQbnj756YT64V Exemple de message signe: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary=boundary42 --boundary42 Content-Type: text/plain message en clair --boundary42 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 ghyHhHUujhJhjH77n8HHGTrfvbnj756tbB9HG4VQpfyF467GhIGfHfYT6 4VQpfyF467GhIGfHfYT6jH77n8HHGghyHhHUujhJh756tbB9HGTrfvbnj n8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 7GhIGfHfYT64VQbnj756 --boundary42--