[GH-ISSUE #812] Logical flaw in current addy encrypted reply process #554

Open
opened 2026-03-01 17:48:08 +03:00 by kerem · 5 comments
Owner

Originally created by @lawmanuk on GitHub (Feb 9, 2026).
Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/812

Below feature has a logical flaw.

https://addy.io/faq/#can-i-reply-send-from-aliases-using-encryption

It should be:

  1. If reply encrypted to addy.io, then decrypt and forward to recipient. This is already i place.

Missing is:

  1. If reply encrypted to addy.io and any other pgp key (except addy sender), then do NOT decrypt and send as is.

(2) is needed because:

a) Outgoing emails usually encrypted by sender own pgp key in thunderbird. Need to stick with logic (1) if other key is only the addy client sending email, as recipient still has no PGP to decrypt with.

b) The only way to encrypt to addy.io when sending to alias+real=recipient.com@aliasdomain.addy.io is to use the alias feature in thunderbird (although this doesn't work for me yet). This means that even if manually only encrypting to actual recipient, it will still be auto encrypted to addy.io by thunderbird alias feature.

Originally created by @lawmanuk on GitHub (Feb 9, 2026). Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/812 Below feature has a logical flaw. https://addy.io/faq/#can-i-reply-send-from-aliases-using-encryption It should be: 1) If reply encrypted to addy.io, then decrypt and forward to recipient. This is already i place. Missing is: 2) If reply encrypted to addy.io and any other pgp key (except addy sender), then do NOT decrypt and send as is. (2) is needed because: a) Outgoing emails usually encrypted by sender own pgp key in thunderbird. Need to stick with logic (1) if other key is only the addy client sending email, as recipient still has no PGP to decrypt with. b) The only way to encrypt to addy.io when sending to alias+real=recipient.com@aliasdomain.addy.io is to use the alias feature in thunderbird (although this doesn't work for me yet). This means that even if manually only encrypting to actual recipient, it will still be auto encrypted to addy.io by thunderbird alias feature.
Author
Owner

@willbrowningme commented on GitHub (Feb 10, 2026):

I'm not sure I understand what you mean by (2).

Do you mean if sending from an alias to alias+real=recipient.com@aliasdomain.addy.io and encrypting it with the real@recipient.com public PGP key? If so, then that is already left as is and simply forwarded on remaining encrypted.

<!-- gh-comment-id:3876491591 --> @willbrowningme commented on GitHub (Feb 10, 2026): I'm not sure I understand what you mean by (2). Do you mean if sending from an alias to `alias+real=recipient.com@aliasdomain.addy.io` and encrypting it with the `real@recipient.com` public PGP key? If so, then that is already left as is and simply forwarded on remaining encrypted.
Author
Owner

@lawmanuk commented on GitHub (Feb 10, 2026):

Hi Will.

I meant the following is current logic as I understand it.

  1. Reply = encrypted to addy.io only= decrypted and forwarded plain text

  2. Reply = encrypted to recipient key only (not to addy.io) = forwarded in same encrypted state

  3. Reply = encrypted to addy.io + my key = decrypted and forwarded plain text

  4. Reply = encrypted to addy.io + my key + recipient key = decrypted and forwarded plain text

Is my understanding of (3) (4) correct?

If so, could you please not decrypt (4) so recipient receives encrypted to their pgp key.

The 'me' key at (3) can possibly be checked against list of stored user public keys.

The reason this is needed is:

a) The only way to encrypt messages to addy.io (to ensure all sent items are encrypted) is to use alias feature in thunderbird (in theory as it still fails so far for me). Once setup in alias thunderbird, it can't be switched off per message so (4) would assist where recipient can also receive pgp messages.

b) Once always encrypt to self is set, it can't efficiently be switched off per message in thunderbird. Encrypt to self is needed to read sent items later.

Please let me know if any query.

thanks

<!-- gh-comment-id:3876844783 --> @lawmanuk commented on GitHub (Feb 10, 2026): Hi Will. I meant the following is current logic as I understand it. 1) Reply = encrypted to addy.io only= decrypted and forwarded plain text 2) Reply = encrypted to recipient key only (not to addy.io) = forwarded in same encrypted state 3) Reply = encrypted to addy.io + my key = decrypted and forwarded plain text 4) Reply = encrypted to addy.io + my key + recipient key = decrypted and forwarded plain text Is my understanding of (3) (4) correct? If so, could you please not decrypt (4) so recipient receives encrypted to their pgp key. The 'me' key at (3) can possibly be checked against list of stored user public keys. The reason this is needed is: a) The only way to encrypt messages to addy.io (to ensure all sent items are encrypted) is to use alias feature in thunderbird (in theory as it still fails so far for me). Once setup in alias thunderbird, it can't be switched off per message so (4) would assist where recipient can also receive pgp messages. b) Once always encrypt to self is set, it can't efficiently be switched off per message in thunderbird. Encrypt to self is needed to read sent items later. Please let me know if any query. thanks
Author
Owner

@lawmanuk commented on GitHub (Feb 11, 2026):

Just tested (4) above

a) email via addy to pgp encrypted recipient
+
b) cc via addy to non-pgp recipient - so encrypted with addy pgp

= addy decrypts and sends plain text to both, including pgp recipient

Could this pls be resolved.

thx

<!-- gh-comment-id:3887494092 --> @lawmanuk commented on GitHub (Feb 11, 2026): Just tested (4) above a) email via addy to pgp encrypted recipient + b) cc via addy to non-pgp recipient - so encrypted with addy pgp = addy decrypts and sends plain text to both, including pgp recipient Could this pls be resolved. thx
Author
Owner

@willbrowningme commented on GitHub (Feb 12, 2026):

If you are using the same alias domain for a) and b) above then you will need to add both keys to your openpgp_alias_to_keys.json file for that alias domain.

I've just tested this by sending from the same alias (myalias@addy.io) to encrypted@example.com encrypting with encrypted@example.com's PGP key and also to plaintext@example.com (CC'd) encrypting with the no-reply@addy.io PGP key and both emails arrived as expected.

With encrypted@example.com's encrypted and remaining so, and plaintext@example.com in plain text after being decrypted on the server.

To: myalias+encrypted=example.com@addy.io
Cc: myalias+plaintext=example.org@addy.io

{
  "description": "Thunderbird OpenPGP Alias Rules",
  "rules": [
    {
      "domain": "addy.io",
      "keys": [
        {
          "description": "PGP encrypted recipient's key",
          "fingerprint": "ABC"
        },
        {
          "description": "no-reply@addy.io PGP key",
          "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695"
        }
      ]
    }
  ]
}
<!-- gh-comment-id:3890212345 --> @willbrowningme commented on GitHub (Feb 12, 2026): If you are using the same alias domain for a) and b) above then you will need to add both keys to your `openpgp_alias_to_keys.json` file for that alias domain. I've just tested this by sending from the same alias (myalias@addy.io) to encrypted@example.com encrypting with encrypted@example.com's PGP key and also to plaintext@example.com (CC'd) encrypting with the no-reply@addy.io PGP key and both emails arrived as expected. With encrypted@example.com's encrypted and remaining so, and plaintext@example.com in plain text after being decrypted on the server. To: myalias+encrypted=example.com@addy.io Cc: myalias+plaintext=example.org@addy.io ```json { "description": "Thunderbird OpenPGP Alias Rules", "rules": [ { "domain": "addy.io", "keys": [ { "description": "PGP encrypted recipient's key", "fingerprint": "ABC" }, { "description": "no-reply@addy.io PGP key", "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695" } ] } ] } ```
Author
Owner

@lawmanuk commented on GitHub (Feb 12, 2026):

I did put both separate pgp key id into alias file as you've done.

When you say each email encrypted with separate key, that can't be correct as it creates a single email encrypted with ALL appropriate keys, as below:

If thunderbird alias file =

  1. alias+encrypted=mail.com@addy.io > gpg with encrypted@mail.com key
  2. addy.io > encrypt with addy.io key ( so this covers everything else including alias+plaintext=mail.com@addy.io)

then
3) resulting single email sent to addy
to: alias+encrypted=mail.com@addy.io
cc: alias+plaintext=mail.com@addy.io
This email will be encrypted for 3 keys. addy.io, owner, encrypted@mail.com

  1. So when (3) is received at addy, does it:
    a) Check incoming email has 3 pgp keys. 1 is addy. 1 is owner. 1 is recipient encrypted@mail.com
    b) forward encrypted@mail.com without decryption
    c) decrypt mail and forward to plaintext@mail.com in plaintext

If there is no current check for (4a) then it can't do (4b)

When I did this same test, it decrypted mail at (4) and sent plaintext to (b) and (c) both. Just tested again and same result.

{
  "description": "Thunderbird OpenPGP Alias Rules for Addy",
  "rules": [
    {
      "domain": "anonaddy.me",
      "keys": [
        {
          "description": "Addy.io Key",
          "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695"
        }
      ]
    },
    {
      "domain": "addy.io",
      "keys": [
        {
          "description": "Addy.io Key",
          "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695"
        }
      ]
    },
    {
      "domain": "anonaddy.com",
      "keys": [
        {
          "description": "Addy.io Key",
          "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695"
        }
      ]
    },
    {
      "domain": "mailer.me",
      "keys": [
        {
          "description": "Addy.io Key",
          "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695"
        }
      ]
    },
    {
      "domain": "xxx.anonaddy.me",
      "keys": [
        {
          "description": "Addy.io Key",
          "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695"
        }
      ]
    },
    {
      "domain": "xxx.addy.io",
      "keys": [
        {
          "description": "Addy.io Key",
          "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695"
        }
      ]
    },
    {
      "domain": "xxx.anonaddy.com",
      "keys": [
        {
          "description": "Addy.io Key",
          "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695"
        }
      ]
    },
    {
      "domain": "xxx.mailer.me",
      "keys": [
        {
          "description": "Addy.io Key",
          "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695"
        }
      ]
    },
    {
      "email": "mail+test=gmail.com@xxx.addy.io",
      "keys": [
        {
          "description": test@gmail.com Key",
          "fingerprint": "2218CE12FES316C9"
        }
      ]
    }
  ]
}



<!-- gh-comment-id:3890388588 --> @lawmanuk commented on GitHub (Feb 12, 2026): I did put both separate pgp key id into alias file as you've done. When you say each email encrypted with separate key, that can't be correct as it creates a single email encrypted with ALL appropriate keys, as below: If thunderbird alias file = 1) alias+encrypted=mail.com@addy.io > gpg with encrypted@mail.com key 2) addy.io > encrypt with addy.io key ( so this covers everything else including alias+plaintext=mail.com@addy.io) then 3) resulting single email sent to addy to: alias+encrypted=mail.com@addy.io cc: alias+plaintext=mail.com@addy.io This email will be encrypted for 3 keys. addy.io, owner, encrypted@mail.com 4) So when (3) is received at addy, does it: a) Check incoming email has 3 pgp keys. 1 is addy. 1 is owner. 1 is recipient encrypted@mail.com b) forward encrypted@mail.com without decryption c) decrypt mail and forward to plaintext@mail.com in plaintext If there is no current check for (4a) then it can't do (4b) When I did this same test, it decrypted mail at (4) and sent plaintext to (b) and (c) both. Just tested again and same result. ``` { "description": "Thunderbird OpenPGP Alias Rules for Addy", "rules": [ { "domain": "anonaddy.me", "keys": [ { "description": "Addy.io Key", "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695" } ] }, { "domain": "addy.io", "keys": [ { "description": "Addy.io Key", "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695" } ] }, { "domain": "anonaddy.com", "keys": [ { "description": "Addy.io Key", "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695" } ] }, { "domain": "mailer.me", "keys": [ { "description": "Addy.io Key", "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695" } ] }, { "domain": "xxx.anonaddy.me", "keys": [ { "description": "Addy.io Key", "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695" } ] }, { "domain": "xxx.addy.io", "keys": [ { "description": "Addy.io Key", "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695" } ] }, { "domain": "xxx.anonaddy.com", "keys": [ { "description": "Addy.io Key", "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695" } ] }, { "domain": "xxx.mailer.me", "keys": [ { "description": "Addy.io Key", "fingerprint": "26A987650243B28802524E2F809FD0D502E2F695" } ] }, { "email": "mail+test=gmail.com@xxx.addy.io", "keys": [ { "description": test@gmail.com Key", "fingerprint": "2218CE12FES316C9" } ] } ] } ```
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/anonaddy#554
No description provided.