Mailing List Archive

GPG Encryption on Raspberry Pi 4 using custom e-mail address failure
Good Day,

This very novice would appreciate some help.



My situation:



I have several Raspberry Pi 4 computers running the Raspberry Operating
System (Raspbian GNU/Linux [buster], Version ID=10) at my home. I need each
of them to send me an email notification when certain functions are
performed.



I have gpg version 2.2.12-1+rpi1+deb10u1 installed.



To this end, I have configured the mail system called msmtp on each
Raspberry Pi 4 computer. I can send email to my myself via my Gmail and
david.donnelly.com (IONOS.COM) accounts manually and interactively using
msmtp on each of the Raspberry Pi 4 computers.





Problem:

However, following good internet security policies, I tried to encrypt my
email account passwords using GPG (Gnu PG: https://gnupg.org/). These
encrypted passwords are to be stored in a file on each Raspberry Pi4
computer.



Now, first off, this encryption process worked fine for my Gmail Account. I
was able to run the following command:





gpg --encrypt -o .msmtp-gmail.gpg -r donnellydw@gmail.com
<mailto:donnellydw@gmail.com> -





The password provided was encrypted with no problems and the associated file
was created.



However, when I try to run the same command using my david.donnelly.com
(IONOS.COM) email account:





gpg --encrypt -o .msmtp-ionos.gpg -r david.donnelly@daviddonnelly.com
<mailto:david.donnelly@daviddonnelly.com> -



or



gpg --encrypt -o .msmtp-ionos.gpg -r 2d@daviddonnelly.com
<mailto:2d@daviddonnelly.com> -





I get the following three errors:



gpg: error retrieving 'david.donnelly@daviddonnelly.com' via WKD: Network
error

gpg: david.donnelly@daviddonnelly.com
<mailto:david.donnelly@daviddonnelly.com> : skipped: Network error

gpg: [stdin]: encryption failed: Network error





If I substitute and use my 2d@daviddonnelly.com
<mailto:2d@daviddonnelly.com> email address, I get the same three errors:



gpg: error retrieving '2d@daviddonnelly.com' via WKD: Network error

gpg: 2d@daviddonnelly.com <mailto:2d@daviddonnelly.com> : skipped: Network
error

gpg: [stdin]: encryption failed: Network error



I then reran the encryption command using my Gmail address:



gpg --encrypt -o .msmtp-gmail.gpg -r donnellydw@gmail.com
<mailto:donnellydw@gmail.com> -



and encryption and file creation was successful.



At face value, I have internet access, my network is working, so I have
concluded something is causing a problem in the gpg program with
resolving/determining/? how to translate my IONOS.COM custom e-mail address:
david.donnelly@daviddonnelly.com <mailto:david.donnelly@daviddonnelly.com>
or 2d@daviddonnelly.com <mailto:2d@daviddonnelly.com> vice the GPG program
fully understanding how to handle the "gmail.com" address.





Your help in this matter is greatly appreciated,

Dave
RE: GPG Encryption on Raspberry Pi 4 using custom e-mail address failure [ In reply to ]
Good Day,

I appreciate your help in this matter, but I have learned additional
information and I need to reformat and resubmit this help request.

Thank you,

Dave



From: Gnupg-users <gnupg-users-bounces@gnupg.org> On Behalf Of
david.donnelly@daviddonnelly.com
Sent: Tuesday, December 15, 2020 12:29 PM
To: gnupg-users@gnupg.org
Subject: GPG Encryption on Raspberry Pi 4 using custom e-mail address
failure



Good Day,

This very novice would appreciate some help.



My situation:



I have several Raspberry Pi 4 computers running the Raspberry Operating
System (Raspbian GNU/Linux [buster], Version ID=10) at my home. I need each
of them to send me an email notification when certain functions are
performed.



I have gpg version 2.2.12-1+rpi1+deb10u1 installed.



To this end, I have configured the mail system called msmtp on each
Raspberry Pi 4 computer. I can send email to my myself via my Gmail and
david.donnelly.com (IONOS.COM) accounts manually and interactively using
msmtp on each of the Raspberry Pi 4 computers.





Problem:

However, following good internet security policies, I tried to encrypt my
email account passwords using GPG (Gnu PG: https://gnupg.org/). These
encrypted passwords are to be stored in a file on each Raspberry Pi4
computer.



Now, first off, this encryption process worked fine for my Gmail Account. I
was able to run the following command:





gpg --encrypt -o .msmtp-gmail.gpg -r donnellydw@gmail.com
<mailto:donnellydw@gmail.com> -





The password provided was encrypted with no problems and the associated file
was created.



However, when I try to run the same command using my david.donnelly.com
(IONOS.COM) email account:





gpg --encrypt -o .msmtp-ionos.gpg -r david.donnelly@daviddonnelly.com
<mailto:david.donnelly@daviddonnelly.com> -



or



gpg --encrypt -o .msmtp-ionos.gpg -r 2d@daviddonnelly.com
<mailto:2d@daviddonnelly.com> -





I get the following three errors:



gpg: error retrieving 'david.donnelly@daviddonnelly.com' via WKD: Network
error

gpg: david.donnelly@daviddonnelly.com
<mailto:david.donnelly@daviddonnelly.com> : skipped: Network error

gpg: [stdin]: encryption failed: Network error





If I substitute and use my 2d@daviddonnelly.com
<mailto:2d@daviddonnelly.com> email address, I get the same three errors:



gpg: error retrieving '2d@daviddonnelly.com' via WKD: Network error

gpg: 2d@daviddonnelly.com <mailto:2d@daviddonnelly.com> : skipped: Network
error

gpg: [stdin]: encryption failed: Network error



I then reran the encryption command using my Gmail address:



gpg --encrypt -o .msmtp-gmail.gpg -r donnellydw@gmail.com
<mailto:donnellydw@gmail.com> -



and encryption and file creation was successful.



At face value, I have internet access, my network is working, so I have
concluded something is causing a problem in the gpg program with
resolving/determining/? how to translate my IONOS.COM custom e-mail address:
david.donnelly@daviddonnelly.com <mailto:david.donnelly@daviddonnelly.com>
or 2d@daviddonnelly.com <mailto:2d@daviddonnelly.com> vice the GPG program
fully understanding how to handle the "gmail.com" address.





Your help in this matter is greatly appreciated,

Dave
Re: GPG Encryption on Raspberry Pi 4 using custom e-mail address failure [ In reply to ]
On 16/12/2020 16:15, david.donnelly@daviddonnelly.com wrote:
> However,? when I try to run the same command using my david.donnelly.com
> (IONOS.COM) email account:
>
> gpg --encrypt -o .msmtp-ionos.gpg -r david.donnelly@daviddonnelly.com
> <mailto:david.donnelly@daviddonnelly.com> -
>
> or
>
> gpg --encrypt -o .msmtp-ionos.gpg -r 2d@daviddonnelly.com
> <mailto:2d@daviddonnelly.com> -
>
> I get the following three errors:
>
> gpg: error retrieving 'david.donnelly@daviddonnelly.com' via WKD:
> Network error
>
> gpg: david.donnelly@daviddonnelly.com
> <mailto:david.donnelly@daviddonnelly.com>: skipped: Network error
>
> gpg: [stdin]: encryption failed: Network error

It appears that you don't already have a copy of the public key for
david.donnelly@daviddonnelly.com on that machine. Is this expected?

I can't find keys for any of your listed emails on the SKS pool, or on
Hagrid (which appears to be down?), or via WKD. If you don't have the
key locally either, then gpg won't be able to encrypt.

--
Andrew Gallagher
RE: GPG Encryption on Raspberry Pi 4 using custom e-mail address failure [ In reply to ]
Andrew,
I learned a few things after this post was submitted.

Yes - I had not created my key...or keys?
At any rate - once I create the key (with an associated passphrase), the
encryption worked. Well - to some degree.

Another problem cropped up which I will post via a different e-mail.

Many thanks, this initial issue is solved.

Many thanks,
Dave

-----Original Message-----
From: Gnupg-users <gnupg-users-bounces@gnupg.org> On Behalf Of Andrew
Gallagher
Sent: Thursday, December 17, 2020 1:52 AM
To: gnupg-users@gnupg.org
Subject: Re: GPG Encryption on Raspberry Pi 4 using custom e-mail address
failure

On 16/12/2020 16:15, david.donnelly@daviddonnelly.com wrote:
> However,? when I try to run the same command using my
> david.donnelly.com
> (IONOS.COM) email account:
>
> gpg --encrypt -o .msmtp-ionos.gpg -r david.donnelly@daviddonnelly.com
> <mailto:david.donnelly@daviddonnelly.com> -
>
> or
>
> gpg --encrypt -o .msmtp-ionos.gpg -r 2d@daviddonnelly.com
> <mailto:2d@daviddonnelly.com> -
>
> I get the following three errors:
>
> gpg: error retrieving 'david.donnelly@daviddonnelly.com' via WKD:
> Network error
>
> gpg: david.donnelly@daviddonnelly.com
> <mailto:david.donnelly@daviddonnelly.com>: skipped: Network error
>
> gpg: [stdin]: encryption failed: Network error

It appears that you don't already have a copy of the public key for
david.donnelly@daviddonnelly.com on that machine. Is this expected?

I can't find keys for any of your listed emails on the SKS pool, or on
Hagrid (which appears to be down?), or via WKD. If you don't have the key
locally either, then gpg won't be able to encrypt.

--
Andrew Gallagher



_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users