Skip to content

Setting up S/MIME

S/MIME does the same job as PGP (encrypting and signing mail), but organizes trust differently: instead of exchanging keys among yourselves, a certificate authority vouches for your identity. Which is why S/MIME is the standard in companies and public agencies, wherever Outlook and Exchange set the tone.

As a rule of thumb: in business environments with a certificate infrastructure, S/MIME is a given; among private users and in the open-source world, PGP is more common. YouniqMail speaks both.

A personal S/MIME certificate for your email address. You get one:

  • from your employer, if a certificate infrastructure exists there: the most common case,
  • from commercial certificate authorities issuing personal mail certificates,
  • sometimes from professional associations or universities for their members.

The usual form is a file in .p12 or .pfx format, protected by a password, which contains the certificate and the private key. YouniqMail also takes a .pem file holding the certificate and the private key, for example one you saved with Export PEM + key.

  1. Open Settings → Security → S/MIME, tab My certificates.
  2. Click Import .p12 / .pfx / .pem, choose the file and enter its password. A .pem file whose key has no password, like the one Export PEM + key writes, needs none.
  3. In the same dialog you assign the certificate to an account; the dialog preselects your first account. Two switches, both on, make it the account’s default certificate for signing and for encryption.

Assignment happens per account; different accounts can carry different certificates. If an account has several, the buttons Use for signing and Use for decryption appear on a certificate that is not yet the default; the second one makes it the default encryption certificate (Default encryption).

A certificate of yours shows Expires in n d from 30 days before its expiry, then Expired. Does not cover: … warns that the certificate was not issued for one of the account’s addresses or aliases; mail signed from there shows an invalid signature to the recipient.

Signing and encrypting are toggled in the compose window, as with PGP. The switches for this only appear when the sending account has a valid certificate of its own assigned (not expired, not revoked). If PGP and S/MIME are both switched on, S/MIME takes precedence. Unlike with PGP, Sign does not follow Encrypt: an encrypted mail goes out unsigned unless you tick Sign as well, and so does a reply to an encrypted mail.

Encrypting requires the recipient’s certificate. It conveniently collects itself: every signed mail that reaches you carries its sender’s certificate along.

YouniqMail keeps the certificate only when the signature is valid. It is ready for encrypting right away when it was issued for the sender’s address by a certificate authority YouniqMail trusts. Otherwise it appears under Settings → Security → S/MIME, tab Recipient certificates, as Pending review. Check it with the sender and confirm it with Trust, then you can reply encrypted.

In the compose window, Missing cert (n) names recipients without a usable certificate (missing, expired, revoked or rejected), Untrusted cert (n) those whose certificate is still pending review. If your signing certificate does not cover the sender address, for example an alias, Certificate mismatch appears and sending asks Send anyway?.

Drafts with encrypted content go to the Drafts folder on the server only encrypted to your own certificate, as with PGP. Your S/MIME certificate counts for this only with Pro; without Pro a PGP key of the sender protects the draft. If there is neither, the draft stays on this device. When you reopen a draft, the switches are set the way you left them. If a draft with encrypted content comes from another device, YouniqMail switches Encrypt on when you have the certificates of all recipients.

Replies to encrypted mail go out encrypted with S/MIME too, from the compose window as well as from Quick Reply and from a notification. What YouniqMail does when a certificate for that is missing is described under PGP.

Received S/MIME mail is verified and decrypted automatically, including mail whose content sits inside the signature (Outlook offers this as an “opaque” signature). Above an encrypted mail you see S/MIME encrypted or S/MIME signed & encrypted. If none of your certificates fits, S/MIME encrypted: certificate missing appears with a link to the settings, where you import the matching certificate. Mail from the last 60 days is checked in the background, older mail when you open it. Until then the text reads Checking S/MIME signature…; afterwards you see what the check found:

  • S/MIME signature verified: the signature holds, the certificate was issued for the sender’s address, and it comes from a trusted certificate authority or you confirmed it.
  • S/MIME signature valid, certificate not confirmed: the signature holds, but nobody vouches for the certificate, for example because the sender issued it themselves. Compare the fingerprint with the sender and confirm the certificate with Trust.
  • S/MIME signature from someone else: the signature holds, but the certificate was not issued for the sender’s address, or you rejected it.
  • S/MIME signature invalid: the check failed; the mail may have been changed after signing.

If a mail names several senders, the signature counts only for the first one, which YouniqMail shows as the sender. The others are listed in the line Other senders.

YouniqMail checks the signature inside an encrypted mail the same way. The mail list shows the result on its shield icon. When you trust or reject a certificate, the display changes right away.

Below the result, Certificate details shows for whom and by whom the certificate was issued, how long it is valid, whether its chain leads to a trusted certificate authority, how far you trust it, and its fingerprint.

The tab Recipient certificates lists all collected and imported certificates of other people. Trust and Reject set how far you trust a certificate, Export saves it as a file, Delete removes it. With Import .cer / .pem you add a certificate someone sent you; it stays Pending review until you trust it. On macOS and Windows, Import from system keychain takes certificates from the system’s certificate store, only the public part.

The certificate authorities YouniqMail trusts are listed under Settings → Security → S/MIME, tab Trusted CAs. YouniqMail ships the root certificates Mozilla trusts for email and keeps them current with every update. Each certificate authority has an Enabled switch.

Add your employer’s certificate authority with Add trusted CA. Certificates collected from signed mail that were Pending review and were issued through it count as confirmed right away; certificates you imported by hand stay pending until you trust them. If you switch off or remove a certificate authority, the collected certificates it vouched for go back to Pending review. Restore default CAs brings back shipped root certificates you removed.

A certificate authority revokes a certificate when its key fell into the wrong hands or it is no longer needed, for example because its holder left the company. YouniqMail checks this against the revocation lists of the certificate authorities. It downloads an authority’s list at most once a day, and the authority does not learn whose signature you are reading. Only certificates whose chain leads to a trusted certificate authority are checked.

If the sender’s certificate is revoked, S/MIME certificate revoked shows in red above the mail. For a stolen key this applies to every mail with that certificate, otherwise only to mails that arrived after the revocation; older mails stay valid. The Certificate details show when and why the certificate was revoked; for a certificate that is not revoked, when it was last checked. Rules with the condition S/MIME status is Signature invalid match such mails as well when the revocation is already known as they arrive.

YouniqMail checks your own certificates too. It does not encrypt to a revoked certificate (the recipient counts as having no certificate) and does not sign with a revoked certificate of yours. If the last check of a certificate used in a mail is older than a day, YouniqMail checks again before sending. In the settings, a revoked certificate carries the badge Revoked.

You switch the check off in the Trusted CAs tab with Check certificate revocation.

The private key of a certificate is bound to the device. After you restore a backup on another computer, the certificate shows Not readable on this device. Import the certificate file again with Import .p12 / .pfx / .pem: the original .p12 or the .pem you saved with Export PEM + key.

Export .cer saves only the public certificate, for example to pass it on. Export PEM + key saves the certificate, its intermediate certificates and the private key in one file. YouniqMail warns you first: the key in it is not encrypted, so keep the file as safe as a password.

Importing certificates (your own and those of recipients) and sending signed or encrypted mail belong to the Pro feature set. Without Pro, YouniqMail still verifies received S/MIME mail. Decrypting needs a certificate of your own, and importing one needs Pro; without one, encrypted mail shows S/MIME encrypted: certificate missing. Certificates imported earlier keep working for reading, and you can still export or delete them. Importing the file again for a certificate that is Not readable on this device works without Pro.

Collecting certificates from signed mail, Trust and Reject, managing trusted certificate authorities, the revocation check and the rule condition S/MIME status stay free. If you reply to an encrypted S/MIME mail without Pro, Send opens the Pro notice; switch off Encrypt and Sign to send the reply without S/MIME. PGP, by contrast, is fully open to everyone.