From: CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 29-JAN-1991 18:17:03.91 To: MRGATE::"ARISIA::EVERHART" CC: 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 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 From: brydon@asl.SINet.SLB.COM (Eschew Obfuscation) Message-Id: <9101292011.AA24848@SLCS.SLB.COM> To: info-vax@kl.sri.com X-Vms-To: ASLVX6::PSI%SJOSU1::CUNYVM.CUNY.EDU::PSULIAS.BITNET::JLW Subject: RE: Internal formats of VMS Mail .MAI files? J.Lance Wilkinson asks: >In migrating from another vendor, I've been sucessful in recovering that >vendor's Email archival folders into a format from which I can extract >information. I'd like to take it one step further, and extract from these >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...] I've always been big on attacking tasks with simple solutions wherever possible. If you don't mind doing everything in DCL in the context of the user, you can 'manufacture' messages that can be fed into VMSmail with a DCL interface (and you won't need to know the internal format of the VMS mail folders either). If you do it this way, create a non-ISAM mail file for each user and use the mail command COPY to move the data into the 'real' mail file (this is the mail file format that existed before the VMS V4.0 indexed format, with which VMSmail still tries to remain compatible). You can extract an initial message (like this one you are reading, if on a VMS system) to use as a 'seed' or to examine the format, which is: (Line 1) [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' (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 You can put multiple messages in the file by preceding each with a character (CTRL/L). A bona fide mail message should not have a character in it. The earliest timestamp that can be used I believe is November 1858: For example: -------- Begin example ------------ $ edit sys$login:mailtemp.tmp (real one needs to go here) From: HEREAFTER::GRAMPS 01-JAN-1892 12:38 To: All my grandchildren CC: Subj: I'm here 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 mail MAIL # From Date Subject 1 HEREAFTER::GRAMPS 1-JAN-1892 I'm here ... MAIL> ... -------- End example ------------ Of course this type of thing has to be done once for each user in the context of his/her username. The only programming required on your part is the unprivileged code to take the 'foreign' messages and put them in the format described above. Hope this helps... ____________________________________________________________________________ Harvey Brydon | SLB DECnet: ASL::BRYDON Schlumberger Anadrill | Internet: brydon@asl.sinet.slb.com 200 Macco Blvd | X.400: %RMS-E-RTB, Data Exceeds 65536 byte buffer Sugar Land, TX | FAX: (713)240-6546 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"