File format · .pm5
Pegasus Mail .PM5 Template Files: Format and Repair Guide
A practical guide to Pegasus Mail .pm5 template files: what they contain, why they stop loading, and the steps that recover a damaged new message script.
The .pm5 extension is associated with Pegasus Mail's New Message Template scripts, small text files that automate how a new message is composed. This page explains what those files are, why they stop working, and what to do when one will not load. It also clears up a common case of mistaken identity, because another program from the same era used the identical extension.
What is a .pm5 file?
Pegasus Mail is an email client written by David Harris, a New Zealand developer, and its history goes back to 1990. The program stores mail in folder files of its own design and keeps supporting data in small auxiliary files. A New Message Template script is one of those auxiliaries: a plain text file that pre-fills parts of a message you compose.
A template can preset headers, supply fixed body text, and insert variables that the program fills in when the template runs. The point is speed and consistency: a repetitive reply becomes one step instead of a dozen. Because the file is text, you can read it in any editor, which is also why recovery is often straightforward.
These scripts carry no binary header or magic number. Like any plain text file, the first bytes are simply readable characters, so identification rests on the extension and on the file's place in the Pegasus Mail directory tree. We are not aware of a registered MIME type for them. For the exact template syntax, the documentation on David Harris's official Pegasus Mail site is the authority.
Is every .pm5 file a Pegasus Mail template?
No. The same extension was used by PageMaker, the desktop publishing package, for its version 5 documents in the early 1990s. Those files are binary page-layout archives, often large, and have nothing to do with email.
A quick test separates the two. Open the file in a plain text editor: readable command lines point to a Pegasus Mail script, while screens of binary noise point to PageMaker. The distinction matters because the two formats need entirely different recovery work.
The mailbox files that sit beside a template
Pegasus Mail keeps each user's mail in a home mail directory. New messages arrive there as individual .cnm files in the NEWMAIL folder, one file per message. Folders you keep over time are .pmm archives, each paired with a .pmi index that speeds up access.
Templates are far smaller than any of these, and that shapes how you recover them. When a script breaks, the mail itself is usually untouched; when mail folders break, the scripts are usually fine. Know which side of that line you are on before you start.
Why do template files stop working?
Damage to a text script rarely means the file is beyond saving. More often it is intact on disk and fails for one of these reasons:
- Truncation: a crash or power loss during a save can cut the file short, and a half-written script may fail to parse.
- Encoding drift: a file moved between systems or through gateways can arrive in a different character set, so special characters become stray symbols.
- Line-ending changes: text created on one operating system may not use the line endings another expects, and a strict parser can refuse it.
- Syntax faults: a hand edit that drops a quotation mark or bracket stops the template running even though the file opens normally.
- Storage faults: bad sectors, interrupted copies, and aging drives can corrupt the underlying disk and leave the file unreadable at a deeper level.
- Security software: some tools quarantine or alter scripts they deem suspicious, removing or emptying the file without warning.
None of this means your template is gone. Most of these faults are repairable, and the rest usually leave recoverable text behind.
Can you fix a damaged template yourself?
Often, yes, and the first rule is to work on a copy. Keep the damaged original untouched while you experiment with a duplicate. Then, in a capable editor such as Notepad++ or Visual Studio Code:
- Check the reported encoding, and try UTF-8 and Windows ANSI until the text reads cleanly.
- Look at the end of the file. A script that stops mid-line has been truncated, and the missing tail must be rewritten.
- Compare the file against a working template on the same installation. The differences usually expose the fault quickly.
- If the text is beyond salvage, re-create the template in Pegasus Mail and paste in whatever lines survived.
Because a template is small and human-readable, rebuilding one is realistic in a way it never is with a large mail archive.
What can be recovered from a damaged .pm5 file?
A template holds instructions, not mail. The recoverable content is the script text itself: the header presets, the fixed wording, and the variable references. If the storage damage is mild, all of that comes back. If the file was overwritten or truncated without a backup, the lost part has to be retyped.
In the worst cases we see, the template is a symptom of wider trouble. A failing disk that eats a script may also threaten the .pmm folders and .cnm messages near it, and those hold data nobody can retype. That is the point where recovery stops being an editing job and becomes forensic work.
How does professional recovery work?
Our engineers begin by copying everything, then work only on the copies. For a script damaged at the storage level, we carve readable text from the raw disk and reassemble it into a valid file. Encoding faults are reversed by pinning down the exact character set and converting once, cleanly. Rebuilt scripts are checked line by line before they go back into your mail directory.
A .pm5 file that turns out to be PageMaker follows a different path: binary structure analysis of a document format rather than text repair. We handle both, which is why identifying the file correctly comes first.
Frequently asked questions
Are .pm5 files plain text or binary?
Pegasus Mail templates are plain text. The same extension also appears on binary PageMaker 5 documents, so check the file in an editor before assuming either way.
Can a .pm5 file contain my mail or address book?
No. A template stores composition instructions only. Your messages live in .pmm folders and .cnm files, and other supporting data sits in separate files of its own.
Why does the file open as garbled characters?
That is usually an encoding mismatch rather than corruption. Converting the file to one consistent character set normally brings the text back.
Is a zero-byte template recoverable?
Not by editing, because nothing remains inside it. Recovery then depends on backups, disk-level carving, or re-creating the template from your own notes.
Will Pegasus Mail rebuild a damaged template automatically?
No. Templates are user content, and the program does not regenerate them. Keep a spare copy of any template that matters to your workflow.
If a .pm5 template, or the mailbox around it, will not come back with the checks above, send it to our team. We will examine the file and report what is recoverable, with no charge and no obligation. Our engineers work on Pegasus Mail data regularly and can usually tell you quickly whether a full or partial recovery is possible.
Send us your .pm5 file for a free evaluation
Our recovery engineers will tell you exactly what can be recovered — at no cost. There is no charge if we cannot recover your data.
Start a free evaluation