A P7M file is a document or email message wrapped in a PKCS #7 (CMS) cryptographic envelope. It is either digitally signed, with the original file embedded inside, or encrypted for a specific recipient. You meet .p7m files as Italian digital signatures on contracts and invoices and as the smime.p7m attachment of secure emails. To read the content, you verify the signature and extract the file, or convert the P7M to PDF.
What is a P7M file?
PKCS #7 is a standard for signed and encrypted data that later became the Cryptographic Message Syntax (CMS), defined in RFC 5652. A P7M file is a binary (DER) or base64-encoded CMS structure. When it carries a signature, it holds three things: the original document, the signer’s certificate and the signature value. That is called an enveloping, or attached, signature. A detached signature stored separately from the document gets the .p7s extension instead.
| Property | P7M file |
|---|---|
| Extension | .p7m (often doubled: .pdf.p7m, .xml.p7m) |
| Standard | PKCS #7 / CMS (RFC 5652); CAdES profile for legal signatures |
| Content | Original file + signature + signer certificate, or encrypted data |
| Typical names | contratto.pdf.p7m, fattura.xml.p7m, smime.p7m |
| Opens with | Signature software (Dike GoSign, ArubaSign, FirmaCerta), OpenSSL, CoolUtils Mail Viewer |
P7M in Italian digital signatures
Italy’s digital signature (firma digitale) uses the CAdES profile of CMS, so a signed file keeps its full original name plus .p7m: a signed PDF becomes contratto.pdf.p7m, a signed electronic invoice becomes IT01234567890_00001.xml.p7m. Public administrations, courts, notaries and companies exchange these files every day. A signature made with a qualified certificate has the same legal value as a handwritten one under Italian law and the EU eIDAS regulation. Signatures can be nested: file.pdf.p7m.p7m means two people signed in sequence.
P7M in S/MIME email
Mail clients that support S/MIME sign or encrypt a message by wrapping it into a CMS structure. If the receiving client does not understand S/MIME, the whole message arrives as an empty email with a single attachment named smime.p7m. Signed messages can still be read after extraction. Encrypted messages need the recipient’s private key and cannot be opened by anyone else.
How do I open a P7M file?
- Signature software. The Italian certificate authorities publish free tools that open, verify and extract P7M files: Dike GoSign (InfoCert), ArubaSign (Aruba) and FirmaCerta (Namirial). Open the file, check that the signature is valid, then save the embedded document.
- Windows without extra software. Double-clicking a .p7m file opens the Crypto Shell Extensions dialog. It shows the signer certificate but does not extract the content.
- OpenSSL on Windows, Mac or Linux. One command verifies and unwraps a DER-encoded signed file:
openssl smime -verify -noverify -in contratto.pdf.p7m -inform DER -out contratto.pdf. Use-inform PEMfor base64 files. The-noverifyflag skips the certificate chain check and only extracts the data. - Mail Viewer. The free CoolUtils Mail Viewer opens P7M files together with MSG and EML on Windows and displays the signed message or document.
Encrypted P7M files open only in the mail client that holds the recipient’s private key. No viewer or converter can bypass that.
How do I convert a P7M file to PDF?
Verification tools extract the original document but do not change its format. If you need a PDF from a signed XML invoice or a signed Word file, or a readable copy for a case folder, use a converter. The P7M to PDF online converter unwraps the CMS envelope and renders the content as a PDF in the browser. P7M to JPG produces an image instead. The output is a plain, unsigned copy for reading and archiving. The signed .p7m file remains the legally valid original, so keep it.
Frequently asked questions
How can I open a P7M file?
Use a signature tool such as Dike GoSign or ArubaSign to verify the signature and save the embedded document, run the OpenSSL smime command to extract it, or open the file in the free CoolUtils Mail Viewer. For a PDF copy, use the online P7M to PDF converter.
How can I open a smime.p7m attachment?
A smime.p7m attachment is an S/MIME message that your mail client could not unpack. Open the email in a client with S/MIME support, such as Outlook, Thunderbird or Apple Mail, or extract the attachment with OpenSSL. If the message was encrypted, only the intended recipient with the matching private key can read it.
What is the P7S format?
A .p7s file is a detached PKCS #7 signature. It contains the signature and the certificate but not the document. The signed file travels separately, and the two must be kept together for the signature to verify.
How do I open a P7S file?
You do not open a .p7s file on its own. Keep the signed document next to it and verify both in a signature tool or with OpenSSL. If a .p7s arrived as an email attachment, it is the signature of that email and can be ignored by readers who do not need to verify it.
Can I convert a P7M file to PDF?
Yes. The online P7M to PDF converter extracts the signed content and renders it as a PDF. The result is an unsigned copy for reading; the original .p7m keeps its legal value.
