mirror of
https://github.com/anonaddy/anonaddy.git
synced 2026-04-25 22:25:55 +03:00
[GH-ISSUE #71] Publik key in GUI cant be removed #111
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/anonaddy#111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @daggr8 on GitHub (Aug 27, 2020).
Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/71
Got the self hosted version up and running. Everything is working except the GPG encryption.
First i tried adding my ProtonMail public key to the recipient in the GUI, that didn't work so i followed the guide in the instructions.
I've generated new keys but when i try to delete the old public key from my default recipient in the GUI i get an error message saying.
I've added the new fingerprint to ANONADDY_SIGNING_KEY_FINGERPRINT in the .env file.
I think i have to add the public key in the GUI on the recipient as well? And then use the private key in ProtonMail to decrypt the messages.
So Q1, the keys should be generated for the e-mail address i use in .env (MAIL_FROM_ADDRESS) correct?
Q2, The recipient in the GUI is not the same e-mail address as (MAIL_FROM_ADDRESS) ofc. But that shouldn't matter?
Q3, How can i remove the public key from the GUI and add the newly generated public key?
Thanks :)
@willbrowningme commented on GitHub (Aug 30, 2020):
For the
ANONADDY_SIGNING_KEY_FINGERPRINTthis needs to be a private key that exists on the mail server where you are hosting the application. That way it can be used to sign forwarded emails that are encrypted.A1: Yes you can generate a key pair on the server for the
MAIL_FROM_ADDRESSand enter the fingerprint of this for the signing key variable above.A2: The recipient will not be the same because that is the destination where email will be forwarded. This should be a real email address such as a Protonmail one, you can then add your Protonmail public key to the recipient.
A3: I'm not sure why you are getting the "Server Error" message but you can check the Laravel log file in
storage/logsto see what it says. In order to remove it you can simply delete the data in the database for that recipient in thefingerprintcolumn and change theshould_encryptcolumn to 0.@daggr8 commented on GitHub (Aug 30, 2020):
Ah i see! Thank you!I've generated new GPG keys. Is there a way to see if that works?
The problem with Server Error was that i some how was missing php-gnupg. Installed it and it worked!
But when i enable the encryption for the recipient with my public key no mail arrive.
The mail.err says
Aug 30 12:21:49 mail postfix/sendmail[2649]: fatal: mailer@mydomain.com(1000): No recipient addresses found in message header
@willbrowningme commented on GitHub (Aug 30, 2020):
I'm not sure what is causing the "No recipient addresses found in message header" error, does it still show this if you toggle encryption off for the recipient?
@daggr8 commented on GitHub (Aug 30, 2020):
Nope :).
@willbrowningme commented on GitHub (Aug 30, 2020):
Are you sure that the
ANONADDY_SIGNING_KEY_FINGERPRINTIn your.envfile is correct? It should be in this format:26A987650243B28802524E2F809FD0D502E2F695@daggr8 commented on GitHub (Aug 30, 2020):
Yepp. But i get the same error if i remove the last digit. Just for test. Hmm.
Actually got this in the syslog this time.
EDIT. So i removed gpg and installed gnupg1 instead
sudo apt remove gpg
sudo apt-get update -y
sudo apt-get install -y gnupg1
No errors in the log, i get the mail but also an email from Anonaddy saying my public key expired. And encryption turned off.
I tried generating a new public key at Proton Mail and adding that one but same error.
@willbrowningme commented on GitHub (Aug 30, 2020):
I think that error is caused because you have a password on your secret key. Apparantly the GnuPG module in PHP doesn't support decrypting keys with passwords at the moment.
Please try removing the passphrase by doing
gpg --edit-key <keyid>and leaving the it blank.@daggr8 commented on GitHub (Aug 30, 2020):
Same issue. Get a mail saying the the key expired. Just to clarify.
I should use the ID i see when running
gpg --list-keysin theANONADDY_SIGNING_KEY_FINGERPRINTcorrect?@daggr8 commented on GitHub (Aug 30, 2020):
Huh. A reboot seems to have solved it. I guess it's a combination of gpg, gnupg1 issues.
@willbrowningme commented on GitHub (Aug 30, 2020):
Is it now working as expected?
@daggr8 commented on GitHub (Aug 30, 2020):
I think so. Thank you! :)