Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.

  • Cloudron Team,
    I'm having issues setting up mailgun as email relay. Whenever I try to put in my username and password, it says "authentication failed"
    Additionally, do I use the Cloudron DKIM key, or the one mailgun gives me to use?
    Also, I'm noticing that the generated DKIM key that cloudron populates in my DNS settings with Gandi use an old domain that my Cloudron lo longer resides at.

    Can you help untangle?

  • Staff

    1. Authentication failed, I am not sure. IIRC, you have to explicitly enable SMTP in mailgun and it gives you separate credentials (different from mailgun API credentials).

    2. You should setup DKIM key as instructed my mailgun. Mailgun will "re-write" stuff and sign it using the keys it provides. It will also ask you to create specific DNS entries that you have to setup manually.

    3. I guess this is because you changed the dashboard domains and deleted the previous domain? If this is the case, I can give you the instructions (have to fixup the database DNS record name for DKIM)

  • @girish On #3, thats exactly what I did, the instructions would be welcome, thanks!!
    I just ditched mailgun and went back to sendgrid.

  • Staff

    The dkim selector is set in the database. You have to update it manually like this:

    mysql -uroot -ppassword -e "SELECT * FROM box.mail"

    The above output will show dkimSelector. It will be line cloudron-<yourdomain-nodots>. You can update it like this (be sure to replace the with the domain name (first column in above output) and currentdomain-nodots with your dashboard domain:

    mysql -uroot -ppassword -e "UPDATE box.mail SET dkimSelector='cloudron-currentdomain-nodots' WHERE domain=''"

    For example, if your current dashboard is at then the dkimSelector is cloudron-dashboardcom (this is just a convention).

    Then systemctl restart box should be it. In the email status view, you can also click on re-setup DNS records to push the change to the DNS.

  • Much appreciated!