# PGP Import keys from email

**URL:** <https://community.ciphermail.com/t/pgp-import-keys-from-email/721>\
**Category:** Gateway\
**Created:** [February 16, 2021, 2:04am UTC](https://community.ciphermail.com/t/pgp-import-keys-from-email/721 "2021-02-16T02:04:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dima\_Kovalyov](https://avatars.discourse-cdn.com/v4/letter/d/9de053/32.png) [@Dima\_Kovalyov](https://community.ciphermail.com/u/Dima_Kovalyov)\
**Post date:** [February 16, 2021, 2:04am UTC](https://community.ciphermail.com/t/pgp-import-keys-from-email/721/1 "2021-02-16T02:04:38Z")

</div>

Hello Ciphermail team,

Thank you for development and allowing a free use of the Ciphermail  
gateway, we've been working on including it in our company for the last  
year and hopefully we will end-up buying Enterprise solution.

I have a question regarding "Import keys from email" PGP feature:  
[https://www.ciphermail.com/documentation/gateway-administration-guide/settings.html#pgp-import-keys-from-email](https://www.ciphermail.com/documentation/gateway-administration-guide/settings.html#pgp-import-keys-from-email)

I have enabled this checkbox and previously I was able to get keys  
attached with "application/pgp-keys" type imported, but for some reason  
it does not work now.

Is there a way to troubleshoot it? As of now attached PGP keys are not  
getting imported to Ciphermail's keyring.  
I have attached source of the email I'm sending (with sensitive info  
redacted) and MPA log from Ciphermail. Please advise if there is any  
other information I can provide.

Thank you.

p.s. this is a re-send as previous email was rejected

- Dima

[plain\_mail\_with\_pgp\_key.txt](https://community.ciphermail.com/uploads/short-url/bV6k8SJziAbugfmNaqrYQ3UbdId.txt) (3.13 KB)

[ciphermail\_mpa.log](https://community.ciphermail.com/uploads/short-url/n4wPwFYUFiF5I4A44Yp0q1R4lvH.log) (3.11 KB)

---

<div class="post-metadata">

**Author:** ![martijn](https://dub1.discourse-cdn.com/flex017/user_avatar/community.ciphermail.com/martijn/32/127_2.png) [@martijn](https://community.ciphermail.com/u/martijn)\
**Post date:** [February 16, 2021, 8:23am UTC](https://community.ciphermail.com/t/pgp-import-keys-from-email/721/2 "2021-02-16T08:23:30Z")

</div>

PGP keys are only imported for email sent to internal recipients. From  
the log it looks like the recipient is external:

"...To external recipient(s); MailID: 427f7120-f267-4977-a6d2-  
3fd16ac290b5; Recipients: [dima(a)knogin.two]..."

Kind regards,

Martijn Brinkers

> **···**
>
> --  
> CipherMail email encryption  
> Email encryption with support for S/MIME,  
> OpenPGP, PDF Messenger and Webmail Messenger
> 
> On Mon, 2021-02-15 at 20:04 -0600, Dima Kovalyov via Users wrote:
> 
> > Hello Ciphermail team,
> > 
> > Thank you for development and allowing a free use of the Ciphermail  
> > gateway, we've been working on including it in our company for the  
> > last  
> > year and hopefully we will end-up buying Enterprise solution.
> > 
> > I have a question regarding "Import keys from email" PGP feature:
> 
> [https://www.ciphermail.com/documentation/gateway-administration-guide/settings.html#pgp-import-keys-from-email](https://www.ciphermail.com/documentation/gateway-administration-guide/settings.html#pgp-import-keys-from-email)
> 
> > I have enabled this checkbox and previously I was able to get keys  
> > attached with "application/pgp-keys" type imported, but for some  
> > reason  
> > it does not work now.
> > 
> > Is there a way to troubleshoot it? As of now attached PGP keys are  
> > not  
> > getting imported to Ciphermail's keyring.  
> > I have attached source of the email I'm sending (with sensitive info  
> > redacted) and MPA log from Ciphermail. Please advise if there is any  
> > other information I can provide.
> > 
> > Thank you.
> > 
> > p.s. this is a re-send as previous email was rejected
> > 
> > - Dima

---

<div class="post-metadata">

**Author:** ![Dima\_Kovalyov](https://avatars.discourse-cdn.com/v4/letter/d/9de053/32.png) [@Dima\_Kovalyov](https://community.ciphermail.com/u/Dima_Kovalyov)\
**Post date:** [February 16, 2021, 8:58pm UTC](https://community.ciphermail.com/t/pgp-import-keys-from-email/721/3 "2021-02-16T20:58:16Z")

</div>

Thank you Martijn!

I didn't set proper "Locality" for my internal domain.

For future readers, I had to go to Domains - \> select my internal domain  
-\> and set "Locality" to "Internal", so Ciphermail would recognize email  
sent to internal recipient and would extract PGP keys from it.  
[https://www.ciphermail.com/documentation/gateway-administration-guide/settings.html#locality](https://www.ciphermail.com/documentation/gateway-administration-guide/settings.html#locality)

- Dima

> **···**
>
> On 2/16/2021 2:23 AM, Martijn Brinkers wrote:
> 
> > PGP keys are only imported for email sent to internal recipients. From  
> > the log it looks like the recipient is external:
> > 
> > "...To external recipient(s); MailID: 427f7120-f267-4977-a6d2-  
> > 3fd16ac290b5; Recipients: [dima(a)knogin.two]..."
> > 
> > Kind regards,
> > 
> > Martijn Brinkers
