# Configuring DKIM

**URL:** <https://forum.getodk.org/t/configuring-dkim/31061>\
**Category:** Support\
**Tags:** odk-central\
**Created:** [November 6, 2020, 5:00pm UTC](https://forum.getodk.org/t/configuring-dkim/31061 "2020-11-06T17:00:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![erobinson](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/erobinson/32/13699_2.png) [@erobinson](https://forum.getodk.org/u/erobinson)\
**Post date:** [November 6, 2020, 5:00pm UTC](https://forum.getodk.org/t/configuring-dkim/31061/1 "2020-11-06T17:00:25Z")

</div>

Following the instructions here: [https://docs.getodk.org/central-install-digital-ocean/](https://docs.getodk.org/central-install-digital-ocean/)  
...will result in an error when executing step 2 since ~/central/files/dkim/rsa.private is a directory.  
Also, the final command in step 2: cp config.disabled config  
...will simply copy the config.disabled file into the config folder (and not rename it)

Please update,  
Thanks!

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [November 6, 2020, 11:26pm UTC](https://forum.getodk.org/t/configuring-dkim/31061/2 "2020-11-06T23:26:18Z")

</div>

@erobinson When you get a chance, please [introduce yourself here](https://forum.getodk.org/t/-/6671). I'd also encourage you to add a real picture as your avatar because it helps build community!

[https://github.com/getodk/central/tree/master/files/dkim](https://github.com/getodk/central/tree/master/files/dkim) doesn't have a `rsa.private` directory and when I run `openssl genrsa -out rsa.private 1024` it creates a file, not a directory.

Are you running a recent copy of Central? From your central directory, run `git describe --tags` and report back what it says.

---

<div class="post-metadata">

**Author:** ![erobinson](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/erobinson/32/13699_2.png) [@erobinson](https://forum.getodk.org/u/erobinson)\
**Post date:** [November 9, 2020, 8:40am UTC](https://forum.getodk.org/t/configuring-dkim/31061/3 "2020-11-09T08:40:08Z")

</div>

Hi Yaw,  
git describe --tags produces v1.0.3  
It appears the folders are a result of the volumes mapped for the mail container:  
From docker-compose.yml:

> mail:  
> container\_name: mail  
> image: "itsissa/namshi-smtp:4.89-2.deb9u5"  
> volumes:  
> **- ./files/dkim/config:/etc/exim4/\_docker\_additional\_macros:ro**  
> **- ./files/dkim/rsa.private:/etc/exim4/domain.key:ro**  
> environment:  
> - MAILNAME=${DOMAIN}  
> restart: always

Those two entries are directories in the mail container:

> :# ls /etc/exim4 -l  
> total 104  
> **drwxr-xr-x 2 root root 4096 Nov 9 09:05 \_docker\_additional\_macros**  
> drwxr-xr-x 9 root root 4096 Aug 3 2019 conf.d  
> **drwxr-xr-x 2 root root 4096 Nov 9 09:05 domain.key**  
> -rw-r--r-- 1 root root 57 Nov 9 09:05 exim4.conf.localmacros  
> -rw-r--r-- 1 root root 78843 Jul 20 2019 exim4.conf.template  
> -rw-r----- 1 root Debian-exim 204 Jul 20 2019 passwd.client  
> -rw-r--r-- 1 root root 1046 Nov 9 09:05 update-exim4.conf.conf

Regards  
Ed

---

<div class="post-metadata">

**Author:** ![craigdsouza](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/craigdsouza/32/3117_2.png) [@craigdsouza](https://forum.getodk.org/u/craigdsouza)\
**Post date:** [November 12, 2020, 11:17am UTC](https://forum.getodk.org/t/configuring-dkim/31061/4 "2020-11-12T11:17:15Z")

</div>

Hi @yanokwa,  
I have encountered the same error @erobinson reported, today while configuring DKIM ..

> genrsa: Can't open "rsa.private" for writing, Is a directory

I updated Central just a couple of days ago from v 0.8 to v 1.0

running `git describe --tags` gives me

> v1.0.3-1-g5a744a1

---

<div class="post-metadata">

**Author:** ![issa](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/i/87869e/32.png) [@issa](https://forum.getodk.org/u/issa)\
**Post date:** [November 12, 2020, 11:42pm UTC](https://forum.getodk.org/t/configuring-dkim/31061/5 "2020-11-12T23:42:42Z")

</div>

hi all.

what happens is that when docker tries to find `rsa.private` and it doesn't exist, it assumes it should make a new directory _called_ `rsa.private` and mounts that into the child container instead.

if you run `rmdir ~/central/files/dkim/rsa.private` and immediately run the `genrsa` it should resolve the issue. there may be some other directory you have to similarly delete.

i thought i included instructions about this in the documentation, but it's not there. i'll be sure it makes it in there this time.

---

<div class="post-metadata">

**Author:** ![erobinson](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/erobinson/32/13699_2.png) [@erobinson](https://forum.getodk.org/u/erobinson)\
**Post date:** [November 17, 2020, 2:30pm UTC](https://forum.getodk.org/t/configuring-dkim/31061/6 "2020-11-17T14:30:12Z")

</div>

Hi Issa, see my previous post, the folder is explicitly mapped during container creation as specified in the docker-compose file - it seems this is by design so somewhere between the script / instructions and the docker setup, there's a disconnect.

---

<div class="post-metadata">

**Author:** ![issa](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/i/87869e/32.png) [@issa](https://forum.getodk.org/u/issa)\
**Post date:** [November 17, 2020, 5:57pm UTC](https://forum.getodk.org/t/configuring-dkim/31061/7 "2020-11-17T17:57:57Z")

</div>

hey erobinson. i am the designer.

the issue is that the files are optional, but there is no way to communicate this fact to docker. docker don't care. so no matter what the _thing_ that is there will get mapped into the container, and therefore no matter what docker will ensure that there is a thing there: in this case, a folder.

we could maybe put a file there as a placeholder, but then we'd have to make people delete that instead. so we'll patch the instructions to have people delete the folder.
