[ From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 29-JAN-1991 18:17:03.91  To:	MRGATE::"ARISIA::EVERHART" CC:	2 Subj:	RE: Internal formats of VMS Mail .MAI files?  * Received:  by crdgw1.ge.com (5.57/GE 1.80)) 	 id AA10226; Tue, 29 Jan 91 18:08:20 EST R Received: From SLCS.SLB.COM by CRVAX.SRI.COM with TCP; Tue, 29 JAN 91 12:09:50 PST Received: from prsrtr.psi ) 	by SLCS.SLB.COM (4.1/SLCS Mailhost 3.13) ( 	id AA24848; Tue, 29 Jan 91 14:11:46 CST! Date: Tue, 29 Jan 91 14:11:46 CST 3 From: brydon@asl.SINet.SLB.COM (Eschew Obfuscation) - Message-Id: <9101292011.AA24848@SLCS.SLB.COM>  To: info-vax@kl.sri.com B X-Vms-To: ASLVX6::PSI%SJOSU1::CUNYVM.CUNY.EDU::PSULIAS.BITNET::JLW5 Subject: RE: Internal formats of VMS Mail .MAI files?    J.Lance Wilkinson asks:   I >In migrating from another vendor, I've been sucessful in recovering that G >vendor's Email archival folders into a format from which I can extract K >information.  I'd like to take it one step further, and extract from these N >folders and insert into VMS Mail folders.  Obviously, I need to know what the> >internal format of the .MAI files used by VMS Mail look like.  [other stuff deleted...]   F I've always been big on attacking tasks with simple solutions whereverJ possible.  If you don't mind doing everything in DCL in the context of theL user, you can 'manufacture' messages that can be fed into VMSmail with a DCLI interface (and you won't need to know the internal format of the VMS mail  folders either).  L If you do it this way, create a non-ISAM mail file for each user and use theN mail command COPY to move the data into the 'real' mail file (this is the mailG file format that existed before the VMS V4.0 indexed format, with which N VMSmail still tries to remain compatible).  You can extract an initial messageL (like this one you are reading, if on a VMS system) to use as a 'seed' or to examine the format, which is:   D (Line 1)<FF> [Formfeed character as the first character in the file]= (Line 2)From:  'from info' with optional timestamp at the end  (line 3)To:    'to info'O (Line 4)CC:    'cc info' if on a vms v5.x system, omitted if on V4.x or earlier  (Line 5)Subj:  'subj info' (Line 6)  blank line  (Line 7-end) body of the message  G You can put multiple messages in the file by preceding each with a <FF> N character (CTRL/L).  A bona fide mail message should not have a <FF> characterK in it.  The earliest timestamp that can be used I believe is November 1858:    For example:  # -------- Begin example ------------  $ edit sys$login:mailtemp.tmp   <FF> (real one needs to go here), From:	HEREAFTER::GRAMPS    01-JAN-1892 12:38 To:	All my grandchildren CC:	 Subj:	I'm here  J Hi there grandkids.  I have just been born, and decided to send you a mail message to announce the fact.  *exit  $ mail% MAIL> set file sys$login:mailtemp.tmp  MAIL> copy /all mail mail ? MAIL> set file [mail]mail.mai  ! or whatever your 'real' one is  MAIL> dir mailP                                                                             MAIL/     # From                 Date         Subject   0     1 HEREAFTER::GRAMPS     1-JAN-1892  I'm here ...   	 MAIL> ... ! -------- End example ------------   M Of course this type of thing has to be done once for each user in the context G of his/her username.  The only programming required on your part is the K unprivileged code to take the 'foreign' messages and put them in the format  described above.   Hope this helps...  L ____________________________________________________________________________/ Harvey Brydon         | SLB DECnet: ASL::BRYDON < Schlumberger Anadrill | Internet:   brydon@asl.sinet.slb.comN 200 Macco Blvd        | X.400:      %RMS-E-RTB, Data Exceeds 65536 byte buffer1 Sugar Land, TX        | FAX:        (713)240-6546 L  77478 USA            | P.O.T.S.:   (713)274-8000 x8281 or 274-8281 (d.i.d.)?       "My mother used to have the same hairstyle as Ray Kaplan"   