Blog
How to open a P7M file on a Mac
Preview cannot read a .p7m file. Open it on a Mac in the browser, then check each signature, Base64, PEM and the nested envelopes in practice.
- Published
- Updated
An attachment arrives in Mail and the name ends in .p7m. Double-clicking on macOS does not show the contract, the decision or the invoice. Preview asks for an application, or it opens something unreadable. The file is usually not damaged. It is a signed envelope. This guide explains how to read it on a Mac, what to check after it opens, and which limits remain even when the preview appears.
Take contratto-locazione.pdf.p7m, received from a firm and saved in Downloads. The .pdf part describes the expected content. The .p7m part marks the envelope. The name is a hint, not proof: the reader recognises the format from the bytes, not from the extension.
Why Preview cannot open the file
A .p7m file used in Italy is, in most cases, a CAdES envelope. CAdES places the signature on CMS, the standard described in RFC 5652. Inside the envelope are the document and one or more signatures. Preview, Pages and TextEdit can read a PDF or plain text. They cannot remove the envelope and show the signers.
Renaming contratto-locazione.pdf.p7m to contratto-locazione.pdf extracts nothing. The file is still an envelope. A PDF application reports a damaged document because the first bytes are not those of a PDF. The reverse has the same limit: an ordinary PDF renamed .p7m does not become a signature.
The signature covers the content bytes. Changing the name on the Mac does not change what was signed and does not create a new signature. Keep the original name, especially if you later need to compare the file with the one named in the message.
What you can use on macOS
You have three paths, with different purposes.
- The application from the provider that issued a signature. You need it if you must sign, or if your organisation requires that tool. For reading alone it is an extra installation.
- Terminal, if you are comfortable with OpenSSL. An extraction command can write the content to disk, but it does not give you a readable card for integrity, the certificate and revocation. An option that skips certificate checks should not be filed as a passed check.
- The reader in the browser. Open Lettore P7M in Safari, Chrome or Firefox. Select the file or drag it from Finder. Processing happens on the Mac: the document is not sent to a server in order to be read.
The full PDF preview and the technical signature checks are free. You do not need an account. A license is requested only if you choose to download or export. Plans and prices are on the Pricing page: Single at €4.10, Pro at €12.99 per year and Lifetime at €24.99, VAT included.
If you use Chrome or Edge, after the first load the page prepares public resources for offline use. Only then can an install command appear. In Safari, stay on the site and choose the file from Finder. Associating the .p7m extension with the browser, using Command + I and Change All, does not open the reader. The browser would receive the raw envelope.
Open the file, step by step
- Save the attachment from Mail with “Save to Downloads”, without changing the name. If the message is PEC (Italian certified email), save the sender’s
.p7m, notdaticert.xmland notsmime.p7s. The guide to P7M attachments in PEC separates these files. - Open the reader and wait until the page is ready.
- Drag
contratto-locazione.pdf.p7monto the page, or use the picker and take it from Finder. You can also paste the file where the browser allows it. - Read the preview. For a PDF, every page the browser can show is available before any purchase.
- On the same screen, check the signers one by one. Integrity, the available trust chain and revocation are separate results.
A file over 50 MB receives a warning. The limit is 100 MB. Above that threshold the file is not opened. For very heavy drawings, close other tabs before you try again. If the message says the file does not look like a P7M, do not insist on the name. Compare the copy with the sender’s, as in the guide A P7M file will not open.
Base64 and PEM, without looking at the extension
Some systems export the envelope as text. Opened in TextEdit, you see a long line of letters and numbers, sometimes introduced by -----BEGIN PKCS7-----, -----BEGIN CMS----- or -----BEGIN SIGNED DATA-----. The reader accepts these three PEM wrappers and also standard Base64, with the alphabet A-Za-z0-9+/= and correct padding. The decoded bytes must start as a CMS structure.
It does not accept “url-safe” Base64, the kind that uses - and _ instead of + and /. In that case the message is the same as for a file that is not a P7M. Do not rename the text to .p7m hoping to bypass the check: the extension does not take part in decoding.
If the envelope is encrypted for a recipient, and not only signed, the reader stops. You need the key of the person who was meant to receive it. That is not a Mail error.
What to check after the preview
On the lease contract, check at least these points.
- The signer’s name is the person or body you expected, not a colleague with a different certificate.
- Integrity is consistent with the content. If it is not confirmed, do not use the copy as if nothing were wrong.
- Revocation is a separate check. If the service does not respond, the result stays “unavailable”. It is not turned into a positive result. Without a network it can be missing even after the document is already visible.
- The date in the signature attributes may only be claimed by the signer. On its own it is not a time stamp. The reader reports revocation before the signature only when verified time evidence is later than the revocation. A claimed date does not prove that the signature was valid before revocation.
The guide Expired or revoked signature explains these results one by one. The reader is not a qualified validation and it does not replace a legal assessment.
If the envelope contains another envelope, for example atto.pdf.p7m.p7m, the layers stay separate. They are not merged into one signed PDF. Countersignatures are marked as unverified. If there are too many layers, the file is not opened: the message refers to too many nested signatures. It is not a PDF to repair with Preview.
Keep the original and the reading copy
Save the .p7m in a matter folder, with the name you received. If you export the PDF, keep that copy in a different folder, clearly marked for reading. Export does not add a new signature: the PDF bytes are the ones that were in the envelope. Anyone who asks you for the signed document must receive the .p7m, not only the extracted PDF. The guide Extract a PDF from a P7M file states what is lost.
After the site’s first load, public resources can remain available offline. The opened document does not enter that cache. To read it again without a network you must still have the file on the Mac and select it again. Authorising an export needs a connection.
The same attachment on a phone follows a different path. The guide Open a P7M on Android and iPhone separates the file picker from sharing, which is not available on iPhone.
Frequently asked questions
Do I need an account to read a P7M on a Mac?
No. The full preview and the technical signature checks do not require an account. A license is needed only when you choose to download or export the content.
Does the extracted PDF replace the signed file?
No. The PDF extracted from a .pdf.p7m reproduces the document bytes, without the CAdES envelope. Keep the original .p7m file together with the reading copy.
Does it work on both Apple silicon and Intel Macs?
Yes. The reader runs in the browser, so it does not depend on the processor. You need an up-to-date browser and a file of at most 100 MB.
Can I associate the .p7m extension with Safari?
That is not how you read the document. Safari would open the raw envelope, not the reader page. Open the site and select the file from Finder.
Before you use the document
On a Mac, a .p7m is not a PDF in disguise. Open it from the browser, check the signer, integrity and revocation, and keep the original envelope. If the content is an XML invoice, continue with the guide to reading an .xml.p7m e-invoice, where the readable view and the PDF copy are described with their limits.