Community Discussions and Support
Pegasus Mail Addressbooks

Using the tab-delimited export option is not good.  When the changed file is reimported, the entries in the addressbook are slightly corrupted. This seems to be related to the fact that the delimited file contains non-text filler characters (ASCII 09 -- null?).  Not sure whether the corruption is caused by using Excel to edit the fields, or whether it is caused when the file in reimported.

Much better is to export in tagged-text format which contains only printable characters.  I tried this, and it worked properly after editing in Notepad. 

<p>Using the tab-delimited export option is not good.  When the changed file is reimported, the entries in the addressbook are slightly corrupted. This seems to be related to the fact that the delimited file contains non-text filler characters (ASCII 09 -- null?).  Not sure whether the corruption is caused by using Excel to edit the fields, or whether it is caused when the file in reimported. </p><p>Much better is to export in tagged-text format which contains only printable characters.  I tried this, and it worked properly after editing in Notepad. </p>

One of our major customers has changed the main domain for their email addresses. I desperately need to change the addressbooks of multiple users so that user@domain.com can be changed to user@domainplus.com

I have tried to write a VB program to scan all users addressbooks and modify the domain names, but I can't get the formatting correct when I rewrite the addressbook file. I always seem to be a few bytes short and Pmail crashes when it tries to read the modified addressbook.

Help! Can anybody offer any suggestions. 

Thanks. Stephen.

<P>One of our major customers has changed the main domain for their email addresses. I desperately need to change the addressbooks of multiple users so that <A href="mailto:user@domain.com">user@domain.com</A> can be changed to <A href="mailto:user@domainplus.com">user@domainplus.com</A></P> <P>I have tried to write a VB program to scan all users addressbooks and modify the domain names, but I can't get the formatting correct when I rewrite the addressbook file. I always seem to be a few bytes short and Pmail crashes when it tries to read the modified addressbook.</P> <P>Help! Can anybody offer any suggestions. </P> <P>Thanks. Stephen.</P>

Hello,

1  Open address book.

2  Select menu AddressBook/Export to Tab delimited file

3  Enter filename in dialog.  It is useful to use a file type of CSV   (eg  abcdef.csv)

4  Open MS Excel or any other application that can process CSV (delimited files).

5  Select file in point 3.   And when prompted for delimiter, select Tab.

6. In the App (Excel) edit the data with a Find/ReplaceAll 

7  Save file 

8  In Pegasus Mail go to Menu Addressbook/Import Tab delimited file

9  Select file just saved in 7.

10  Done 

HTH

 

Martin
 

<p>Hello,</p><p>1  Open address book.</p><p>2  Select menu AddressBook/Export to Tab delimited file </p><p>3  Enter filename in dialog.  It is useful to use a file type of CSV   (eg  abcdef.csv)</p><p>4  Open MS Excel or any other application that can process CSV (delimited files).</p><p>5  Select file in point 3.   And when prompted for delimiter, select Tab.</p><p>6. In the App (Excel) edit the data with a Find/ReplaceAll </p><p>7  Save file </p><p>8  In Pegasus Mail go to Menu Addressbook/Import Tab delimited file</p><p>9  Select file just saved in 7.</p><p>10  Done </p><p>HTH</p><p> </p><p>Martin   </p>

Yeah! That's fine for a few addressbooks, but I'm talking about 20 users, some with up to 50 addressbooks.

I need to automate the process so that I can do the changes overnight. I can open and read the addressbook file, but I'm having trouble rewriting the data.

<p>Yeah! That's fine for a few addressbooks, but I'm talking about 20 users, some with up to 50 addressbooks.</p><p>I need to automate the process so that I can do the changes overnight. I can open and read the addressbook file, but I'm having trouble rewriting the data. </p>

> Yeah! That's fine for a few addressbooks, but I'm talking about 20
> users, some with up to 50 addressbooks.
>
> I need to automate the process so that I can do the changes
> overnight. I can open and read the addressbook file, but I'm having
> trouble rewriting the data.

Here's what I have for the file format of the address book PMR and PM! files.  Hope this helps.  If you need more send me a message at support@tstephenson.com since I'm not going to be in the forum all that much at $0.68 a minute.  ;-)

Address books File formats

Address books are binary files, laid out as follows: the first 128 bytes of the file is a header. The first 50 bytes of the header contain the long name of the address book, as a nul-terminated C string. The byte at offset 51 in the header (ie, header [51]) is non-zero if the book is a system address book. All other bytes in the header are reserved and must be set to 0. Following the header is simply a flat file of the following C structure:  

typedef struct
{
int flag;
char name [40]; /* Username, and alias */
char dept [40]; /* Department */
char index [12];/* Quick lookup key */
char phys_address [60]; /* Delivery address */
char post_address [60]; /* Postal address */
char phone [24];/* Phone number */
char fax [24]; /* Fax number */
char details [80]; /* Anything you want */
char address [100] /* E-mail address */
long user_field; /* For your use */
char reserved [12];
} ADDRESS;

The flag field is reserved for internal use and must be 0. The name field may not be blank. user_field is provided for you to use if you wish — Pegasus Mail will initialise it to 0, but will never touch it after that. You should NOT use the bytes marked reserved.  

The .PM! file associated with each address book consists of a subset of the master record, using the following structure:  

typedef struct
{
int flag;
char index [12]; /* As in master record */
int filepos; /* Record # in master file */
char name [36]; /* Sorting form of name */
char phone [12];
} AINDEX;


> Yeah! That's fine for a few addressbooks, but I'm talking about 20 > users, some with up to 50 addressbooks. > > I need to automate the process so that I can do the changes > overnight. I can open and read the addressbook file, but I'm having > trouble rewriting the data. Here's what I have for the file format of the address book PMR and PM! files.  Hope this helps.  If you need more send me a message at support@tstephenson.com since I'm not going to be in the forum all that much at $0.68 a minute.  ;-) Address books File formats Address books are binary files, laid out as follows: the first 128 bytes of the file is a header. The first 50 bytes of the header contain the long name of the address book, as a nul-terminated C string. The byte at offset 51 in the header (ie, header [51]) is non-zero if the book is a system address book. All other bytes in the header are reserved and must be set to 0. Following the header is simply a flat file of the following C structure:   typedef struct { int flag; char name [40]; /* Username, and alias */ char dept [40]; /* Department */ char index [12];/* Quick lookup key */ char phys_address [60]; /* Delivery address */ char post_address [60]; /* Postal address */ char phone [24];/* Phone number */ char fax [24]; /* Fax number */ char details [80]; /* Anything you want */ char address [100] /* E-mail address */ long user_field; /* For your use */ char reserved [12]; } ADDRESS; The flag field is reserved for internal use and must be 0. The name field may not be blank. user_field is provided for you to use if you wish — Pegasus Mail will initialise it to 0, but will never touch it after that. You should NOT use the bytes marked reserved.   The .PM! file associated with each address book consists of a subset of the master record, using the following structure:   typedef struct { int flag; char index [12]; /* As in master record */ int filepos; /* Record # in master file */ char name [36]; /* Sorting form of name */ char phone [12]; } AINDEX;

Aaah! The master strikes again.

Thank you Thomas. This should help me.

For some reason, I was always ending up with an addressbook file that was 1 or 2 bytes short, but now I should be able to nail it.

Best Regards. Stephen.

<P>Aaah! The master strikes again.</P> <P>Thank you Thomas. This should help me.</P> <P>For some reason, I was always ending up with an addressbook file that was 1 or 2 bytes short, but now I should be able to nail it.</P> <P>Best Regards. Stephen.</P>
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft