8000 feat(compose): sign outgoing mail with S/MIME through gpgsm (#478) by adriadam10 · Pull Request #705 · hyprlab/hylki · GitHub
[go: up one dir, main page]

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## Unreleased

- **New: S/MIME signing** (#478, requested by keithvassallomt). An account
can sign every message it sends with an S/MIME certificate: Settings →
Accounts → S/MIME → Sign every message, or `smime_sign = true` in
`accounts.toml`. Signing goes through gpgsm, so the certificate is imported
into GnuPG and gpg-agent asks for its passphrase. The message goes out as
`multipart/signed` with an `application/pkcs7-signature` part, in the same
layout as OpenPGP's. A message signed or encrypted with OpenPGP is not
signed twice, and drafts are not signed. Reading S/MIME mail and encrypting
with it are not supported yet.

- **New: Microsoft 365 shared mailboxes** (#701, requested by valderys).
Settings → Accounts → Shared Mailboxes adds a shared mailbox by its address,
opened with the sign-in of a Microsoft 365 account from GNOME Online
Expand Down
42 changes: 42 additions & 0 deletions docs/DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ keyboard.
- [Grammar checking](#grammar-checking)
- [Writing in Markdown or HTML](#writing-in-markdown-or-html)
- [OpenPGP (encrypted and signed mail)](#openpgp-encrypted-and-signed-mail)
- [S/MIME (signed mail)](#smime-signed-mail)
- [Send with Hylki from GNOME Files](#send-with-hylki-from-gnome-files)
- [Privacy](#privacy)

Expand Down Expand Up @@ -2006,6 +2007,47 @@ signature** or **Signed, unknown key**.
- *Nothing to encrypt with for an address*: that person's key is missing;
see step 3.

### S/MIME (signed mail)

Hylki can sign everything an account sends with an S/MIME certificate, the
kind a certificate authority issues for an email address. It signs through
**gpgsm**, GnuPG's S/MIME program, so the certificate lives beside your
OpenPGP keys and gpg-agent asks for its passphrase. Reading S/MIME mail and
encrypting with it are not supported yet.

**1. Put your certificate in gpgsm**

Export the certificate with its private key as a `.p12` file (from
Thunderbird: *Settings → Privacy & Security → Manage Certificates → Your
Certificates → Backup*), then import it:

```sh
gpgsm --import certificate.p12
```

If gpgsm answers *error parsing or decrypting the PKCS#12 file*, as gpgsm 2.4
does with a file Thunderbird or Firefox wrote, repack it with OpenSSL first and
import `repacked.p12`:

```sh
openssl pkcs12 -in certificate.p12 -nodes |
openssl pkcs12 -export -keypbe AES-256-CBC -certpbe AES-256-CBC -macalg sha256 -out repacked.p12
```

gpgsm signs only with a certificate whose chain ends at a root it trusts. If
signing fails with *Not trusted*, `gpgsm --list-chain your@address` names the
root; check its fingerprint against your system's certificate store and add it
to `~/.gnupg/trustlist.txt` as `FINGERPRINT S`.

**2. Turn it on for the account**

In *Settings → Accounts*, open the account and turn on *S/MIME → Sign every
message*, or set `smime_sign = true` on the account in `accounts.toml`. Every
message it sends is then signed with the certificate for the From address, or
for the account's address when an alias has none of its own. A message you
sign or encrypt with OpenPGP goes out with OpenPGP only. Drafts are not
signed.

### Dragging files into a message

Files dragged from a file manager over a composer bring up a card for each
Expand Down
3 changes: 3 additions & 0 deletions docs/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ The full list. The [README](../README.md) carries a shorter one.
- **OpenPGP:** read encrypted and signed mail, sign and encrypt what you
send, and manage keys from Settings, through the GnuPG already on your
computer. See [OpenPGP](DOCUMENTATION.md#openpgp-encrypted-and-signed-mail).
- **S/MIME signing:** every message an account sends can be signed with its
S/MIME certificate, through gpgsm. See
[S/MIME](DOCUMENTATION.md#smime-signed-mail).
- **Sender identity:** DKIM, SPF and DMARC checked on arrival, with BIMI
logos where a domain publishes one.
- **Message previews:** the first one to three lines of each message under
Expand Down
19 changes: 19 additions & 0 deletions po/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -2298,6 +2298,10 @@ msgstr ""
"L'organització del remitent ha etiquetat aquest missatge com a «{label}». "
"L'Hylki mostra l'etiqueta però no n'aplica les regles."

#, fuzzy
msgid "gpgsm did not sign the message."
msgstr "El gpg no ha signat el missatge."

msgid "Nothing here proves this came from {from} — or that it didn't."
msgstr "Res aquí demostra que això provingui de {from} — ni que no ho faci."

Expand Down Expand Up @@ -8727,6 +8731,21 @@ msgstr "Expandeix les converses per defecte"
msgid "Mail to people who ask for the same is encrypted."
msgstr ""

msgid "S/MIME"
msgstr ""

msgid "Certificates are managed with gpgsm."
msgstr ""

#, fuzzy
msgid "Sign every message"
msgstr "Cerca al missatge"

msgid ""
"With the certificate for the sender's address. Mail sent with OpenPGP is not "
"signed twice."
msgstr ""

msgid "Your password is kept in the system keyring, never in plain text."
msgstr ""
"La teva contrasenya es conserva a l'anell de claus del sistema, mai en text "
Expand Down
19 changes: 19 additions & 0 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -2237,6 +2237,10 @@ msgstr ""
"Vertraulichkeitsbezeichnung »{label}« versehen. Hylki zeigt die Bezeichnung "
"an, wendet deren Regeln jedoch nicht an."

#, fuzzy
msgid "gpgsm did not sign the message."
msgstr "gpg hat die Nachricht nicht unterschrieben."

msgid "Nothing here proves this came from {from} — or that it didn't."
msgstr ""
"Keine Informationen vorhanden, die die Herkunft von {from} bestätigen oder "
Expand Down Expand Up @@ -8683,6 +8687,21 @@ msgstr ""
"E-Mails werden verschlüsselt, sofern die empfangende Person dies ebenfalls "
"wünscht."

msgid "S/MIME"
msgstr ""

msgid "Certificates are managed with gpgsm."
msgstr ""

#, fuzzy
msgid "Sign every message"
msgstr "In Nachricht suchen"

msgid ""
"With the certificate for the sender's address. Mail sent with OpenPGP is not "
"signed twice."
msgstr ""

msgid "Your password is kept in the system keyring, never in plain text."
msgstr ""
"Ihr Passwort wird im System-Schlüsselbund gespeichert, niemals im Klartext "
Expand Down
19 changes: 19 additions & 0 deletions po/el.po
Original file line number Diff line number Diff line change
Expand Up @@ -2276,6 +2276,10 @@ msgstr ""
"Ο οργανισμός του αποστολέα επισήμανε αυτό το μήνυμα ως «{label}». Το Hylki "
"εμφανίζει την ετικέτα, αλλά δεν εφαρμόζει τους κανόνες της."

#, fuzzy
msgid "gpgsm did not sign the message."
msgstr "Το gpg δεν υπέγραψε το μήνυμα."

msgid "Nothing here proves this came from {from} — or that it didn't."
msgstr ""
"Τίποτα εδώ δεν αποδεικνύει ότι αυτό προήλθε από το {from} — ούτε ότι δεν "
Expand Down Expand Up @@ -8719,6 +8723,21 @@ msgstr "Ανάπτυξη συζητήσεων από προεπιλογή"
msgid "Mail to people who ask for the same is encrypted."
msgstr ""

msgid "S/MIME"
msgstr ""

msgid "Certificates are managed with gpgsm."
msgstr ""

#, fuzzy
msgid "Sign every message"
msgstr "Εύρεση στο μήνυμα"

msgid ""
"With the certificate for the sender's address. Mail sent with OpenPGP is not "
"signed twice."
msgstr ""

msgid "Your password is kept in the system keyring, never in plain text."
msgstr ""
"Ο κωδικός πρόσβασης αποθηκεύεται στην κλειδοθήκη του συστήματος, ποτέ ως "
Expand Down
19 changes: 19 additions & 0 deletions po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -2244,6 +2244,10 @@ msgstr ""
"La organización del remitente ha etiquetado este mensaje como «{label}». "
"Hylki muestra la etiqueta, pero no aplica sus reglas."

#, fuzzy
msgid "gpgsm did not sign the message."
msgstr "gpg no firmó el mensaje."

msgid "Nothing here proves this came from {from} — or that it didn't."
msgstr ""
"Nada de esto demuestra que el mensaje proceda de {from}, ni tampoco que no "
Expand Down Expand Up @@ -8652,6 +8656,21 @@ msgstr "Expandir conversaciones de forma predeterminada"
msgid "Mail to people who ask for the same is encrypted."
msgstr ""

msgid "S/MIME"
msgstr ""

msgid "Certificates are managed with gpgsm."
msgstr ""

#, fuzzy
msgid "Sign every message"
msgstr "Buscar en el mensaje"

msgid ""
"With the certificate for the sender's address. Mail sent with OpenPGP is not "
"signed twice."
msgstr ""

msgid "Your password is kept in the system keyring, never in plain text."
msgstr ""
"Tu contraseña se guarda en el llavero del sistema, nunca como texto sin "
Expand Down
19 changes: 19 additions & 0 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -2245,6 +2245,10 @@ msgstr ""
"L’organisation de l’expéditeur a étiqueté ce message « {label} ». Hylki "
"affiche l’étiquette mais n’applique pas ses règles."

#, fuzzy
msgid "gpgsm did not sign the message."
msgstr "gpg n’a pas signé le message."

msgid "Nothing here proves this came from {from} — or that it didn't."
msgstr ""
"Rien ici ne prouve que 10BC8 ce message provient de {from} — ni le contraire."
Expand Down Expand Up @@ -8652,6 +8656,21 @@ msgstr "Chiffrer par défaut"
msgid "Mail to people who ask for the same is encrypted."
msgstr "Les messages aux personnes qui demandent la même chose sont chiffrés."

msgid "S/MIME"
msgstr ""

msgid "Certificates are managed with gpgsm."
msgstr ""

#, fuzzy
msgid "Sign every message"
msgstr "Rechercher dans le message"

msgid ""
"With the certificate for the sender's address. Mail sent with OpenPGP is not "
"signed twice."
msgstr ""

msgid "Your password is kept in the system keyring, never in plain text."
msgstr ""
"Votre mot de passe est conservé dans le trousseau de clés du système, jamais "
Expand Down
19 changes: 19 additions & 0 deletions po/hu.po
Original file line number Diff line number Diff line change
Expand Up @@ -2373,6 +2373,10 @@ msgid ""
"label but does not apply its rules."
msgstr ""

#, fuzzy
msgid "gpgsm did not sign the message."
msgstr "A gpg nem írta alá az üzenetet."

msgid "Nothing here proves this came from {from} — or that it didn't."
msgstr ""
"Itt semmi nem bizonyítja, hogy ez innen származik: {from} — de azt sem, hogy "
Expand Down Expand Up @@ -8982,6 +8986,21 @@ msgstr "Beszélgetések kibontása alapértelmezés szerint"
msgid "Mail to people who ask for the same is encrypted."
msgstr ""

msgid "S/MIME"
msgstr ""

msgid "Certificates are managed with gpgsm."
msgstr ""

#, fuzzy
msgid "Sign every message"
msgstr "Keresés az üzenetben"

msgid ""
"With the certificate for the sender's address. Mail sent with OpenPGP is not "
"signed twice."
msgstr ""

#, fuzzy
msgid "Your password is kept in the system keyring, never in plain text."
msgstr ""
Expand Down
17 changes: 17 additions & 0 deletions po/hylki.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2085,6 +2085,9 @@ msgid ""
"label but does not apply its rules."
msgstr ""

msgid "gpgsm did not sign the message."
msgstr ""

msgid "Nothing here proves this came from {from} — or that it didn't."
msgstr ""

Expand Down Expand Up @@ -7943,6 +7946,20 @@ msgstr ""
msgid "Mail to people who ask for the same is encrypted."
msgstr ""

msgid "S/MIME"
msgstr ""

msgid "Certificates are managed with gpgsm."
msgstr ""

msgid "Sign every message"
msgstr ""

msgid ""
"With the certificate for the sender's address. Mail sent with OpenPGP is not "
"signed twice."
msgstr ""

msgid "Your password is kept in the system keyring, never in plain text."
msgstr ""

Expand Down
19 changes: 19 additions & 0 deletions po/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -2344,6 +2344,10 @@ msgstr ""
"L'organizzazione del mittente ha etichettato questo messaggio come \"{label}"
"\". Hylki mostra l'etichetta ma non ne applica le regole."

#, fuzzy
msgid "gpgsm did not sign the message."
msgstr "gpg non ha firmato il messaggio."

msgid "Nothing here proves this came from {from} — or that it didn't."
msgstr "Niente qui prova che è arrivato da {from} — né che non lo sia."

Expand Down Expand Up @@ -8933,6 +8937,21 @@ msgstr "Espandi le conversazioni per impostazione predefinita"
msgid "Mail to people who ask for the same is encrypted."
msgstr ""

msgid "S/MIME"
msgstr ""

msgid "Certificates are managed with gpgsm."
msgstr ""

#, fuzzy
msgid "Sign every message"
msgstr "Trova nel messaggio"

msgid ""
"With the certificate for the sender's address. Mail sent with OpenPGP is not "
"signed twice."
msgstr ""

#, fuzzy
msgid "Your password is kept in the system keyring, never in plain text."
msgstr ""
Expand Down
19 changes: 19 additions & 0 deletions po/pl.po
Original file line number Diff line number Diff line change
Expand Up @@ -2421,6 +2421,10 @@ msgid ""
"label but does not apply its rules."
msgstr ""

#, fuzzy
msgid "gpgsm did not sign the message."
msgstr "Nie udało się podpisać wiadomości za pomocą programu gpg."

msgid "Nothing here proves this came from {from} — or that it didn't."
msgstr ""
"Nic tu nie dowodzi, że ta wiadomość pochodzi z domeny {from} – ani że nie "
Expand Down Expand Up @@ -9064,6 +9068,21 @@ msgstr "Domyślne rozwijanie rozmów"
msgid "Mail to people who ask for the same is encrypted."
msgstr ""

msgid "S/MIME"
msgstr ""

msgid "Certificates are managed with gpgsm."
msgstr ""

#, fuzzy
msgid "Sign every message"
msgstr "Znajdź w wiadomości"

msgid ""
"With the certificate for the sender's address. Mail sent with OpenPGP is not "
"signed twice."
msgstr ""

#, fuzzy
msgid "Your password is kept in the system keyring, never in plain text."
msgstr ""
Expand Down
Loading
0