Just for the fun of it wrote a little cpp program to see if I could automate the process.
Program isn't pretty, and did grab little bits of code to generate random strings for id.
It also requires the filename to be 8 characters with .MBX extension.
So, not sure what kind of names Thunderbird usings.
#include <cstring>
#include <string>
#include <stdlib.h> /* srand, rand */
#include <ostream>
using namespace std;
string RandomString(int len)
{
string str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string newstr;
int pos;
while((int)newstr.size() != len) {
pos = ((rand() % (str.size() - 1)));
newstr += str.substr(pos,1);
}
return newstr;
}
int main(int argc, char* argv[])
{
FILE *fp1,*fp2;
char begin[128];
char filename[13]="",id[30]="";
char *p1,c;
int i;
string random_str;
strcpy(filename,argv[1]);
fp2=fopen(filename,"rb+");
for(i=0;i<128;i++)
begin[i]=0;
for(i=0;i<8;i++)
begin[i]=filename[i];
srand(time(0));
random_str = RandomString(8);
strcpy(id,random_str.c_str());
strcat(id,":");
random_str = RandomString(4);
strcat(id,random_str.c_str());
strcat(id,":");
strcat(id,filename);
p1=strchr(id,'.');
*p1=0;
printf("%s\n",id);
for(i=86;i<109;i++)
begin[i]=id[i-86];
p1=strchr(filename,'.');
strcpy(p1,".PMM");
printf("%s\n",filename);
if((fp1=fopen(filename,"wb+")))
{
for(i=0;i<128;i++)
fputc(begin[i],fp1);
}
while((c=fgetc(fp2)))
{
if(c==EOF) break;
fputc(c,fp1);
}
fclose(fp1);
fclose(fp2);
return(0);
}
Compiled Linux Program
15304 Aug 11 12:43 mbxtopmm
Compile Windows version using ming compiler
44032 Aug 11 12:43 mbxtopmm.exe
./mbxtopmm UNX07DCE.MBX
With Pegasus created MBX file it has PMG file that has info that could be used to create beginning part of PMM file, but don't know if that is standard with MBX or a Pegasus special file??
1341 Aug 11 05:53 UNX07DCE.MBX
320 Aug 11 06:02 UNX07DCE.PMG
118 Aug 11 12:27 UNX07DCE.PMI
1469 Aug 11 12:30 UNX07DCE.PMM
Program creates the PMM file, and opening Pegasus and then reindexing it creates PMI file.
Interesting... Good Luck.
Just for the fun of it wrote a little cpp program to see if I could automate the process.
Program isn't pretty, and did grab little bits of code to generate random strings for id.
It also requires the filename to be 8 characters with .MBX extension.
So, not sure what kind of names Thunderbird usings.
````
#include <cstring>
#include <string>
#include <stdlib.h> /* srand, rand */
#include <ostream>
using namespace std;
string RandomString(int len)
{
string str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string newstr;
int pos;
while((int)newstr.size() != len) {
pos = ((rand() % (str.size() - 1)));
newstr += str.substr(pos,1);
}
return newstr;
}
int main(int argc, char* argv[])
{
FILE *fp1,*fp2;
char begin[128];
char filename[13]="",id[30]="";
char *p1,c;
int i;
string random_str;
strcpy(filename,argv[1]);
fp2=fopen(filename,"rb+");
for(i=0;i<128;i++)
begin[i]=0;
for(i=0;i<8;i++)
begin[i]=filename[i];
srand(time(0));
random_str = RandomString(8);
strcpy(id,random_str.c_str());
strcat(id,":");
random_str = RandomString(4);
strcat(id,random_str.c_str());
strcat(id,":");
strcat(id,filename);
p1=strchr(id,'.');
*p1=0;
printf("%s\n",id);
for(i=86;i<109;i++)
begin[i]=id[i-86];
p1=strchr(filename,'.');
strcpy(p1,".PMM");
printf("%s\n",filename);
if((fp1=fopen(filename,"wb+")))
{
for(i=0;i<128;i++)
fputc(begin[i],fp1);
}
while((c=fgetc(fp2)))
{
if(c==EOF) break;
fputc(c,fp1);
}
fclose(fp1);
fclose(fp2);
return(0);
}
````
Compiled Linux Program
15304 Aug 11 12:43 mbxtopmm
Compile Windows version using ming compiler
44032 Aug 11 12:43 mbxtopmm.exe
./mbxtopmm UNX07DCE.MBX
With Pegasus created MBX file it has PMG file that has info that could be used to create beginning part of PMM file, but don't know if that is standard with MBX or a Pegasus special file??
1341 Aug 11 05:53 UNX07DCE.MBX
320 Aug 11 06:02 UNX07DCE.PMG
118 Aug 11 12:27 UNX07DCE.PMI
1469 Aug 11 12:30 UNX07DCE.PMM
Program creates the PMM file, and opening Pegasus and then reindexing it creates PMI file.
Interesting... Good Luck.