Koozali.org: home of the SME Server

Upgrade to 9.2 with DKIM enabled?

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Upgrade to 9.2 with DKIM enabled?
« on: May 03, 2017, 11:41:48 PM »
My SME 9.1 server has DKIM enabled as per https://wiki.contribs.org/Email#DKIM_Setup_-_qpsmtpd_version.3C0.96.  Am I right in thinking that, prior to upgrading to 9.2, I should remove the template fragment created here (/etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/69dkim_sign), and once the upgrade is complete, proceed with the instructions at https://wiki.contribs.org/Email#DKIM_Setup_-_qpsmtpd_version_.3E.3D_0.96 to enable it (and update my DNS records accordingly)?
......

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Upgrade to 9.2 with DKIM enabled?
« Reply #1 on: May 04, 2017, 11:02:39 AM »
Yes, that's what I'd recommend
C'est la fin du monde !!! :lol:

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Upgrade to 9.2 with DKIM enabled?
« Reply #2 on: May 05, 2017, 12:37:57 PM »
Well, that ran into an unexpected glitch.  My DNS host (at my current service level) limits TXT records to 255 characters long.  With my previous configuration, the default._domainkey entry fit within that limit.  Now, it's around 400 characters long.  Any way to shrink that record?
......

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: Upgrade to 9.2 with DKIM enabled?
« Reply #3 on: May 05, 2017, 12:55:51 PM »
There's a way to split up a single DKIM record in order to deal with this situation.

I had to call Network Solutions tech support and open a case to get it done about 18 months ago -- although they have since updated their interface to allow creation and management of long DKIM records.

Here's a link that at least starts on explaining the process:
https://serverfault.com/questions/255580/how-do-i-enter-a-strong-long-dkim-key-into-dns

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Upgrade to 9.2 with DKIM enabled?
« Reply #4 on: May 05, 2017, 01:28:26 PM »
Thanks, interesting thought.  But I'm dealing with a web-based DNS manager (easydns.org), and it looks like this would still have me entering ("blah" "blah" "blah") rather than just blahblahblah.  I don't think that buys me anything, as the entry in that text box needs to be < 256 characters.
......

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Upgrade to 9.2 with DKIM enabled?
« Reply #5 on: May 05, 2017, 01:56:15 PM »
Using the qpsmtpd-print-dns command, you'll get the entry splitter in a format bind would accept. But yes some providers can't deal with keys like this. You can create your own 1024bits key if needed. Have a look at /var/service/qpsmtpd/run and use the same command, but with 1024 instead of 2048
C'est la fin du monde !!! :lol:

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Upgrade to 9.2 with DKIM enabled?
« Reply #6 on: May 05, 2017, 02:16:20 PM »
Eg:

Code: [Select]
/usr/bin/openssl genrsa -out /home/e-smith/dkim_keys/default/private 1024
/usr/bin/openssl rsa -in /home/e-smith/dkim_keys/default/private \
        -out /home/e-smith/dkim_keys/default/public -pubout
chown qpsmtpd:qpsmtpd /home/e-smith/dkim_keys/default/private
chmod 400 /home/e-smith/dkim_keys/default/private
C'est la fin du monde !!! :lol:

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: Upgrade to 9.2 with DKIM enabled?
« Reply #7 on: May 06, 2017, 08:53:23 PM »
Another thought occurred to me - you might be able to get DKIM working again by copying your old keys to the new locations.

According to the wiki page, your old keys should be found here:
/var/service/qpsmtpd/config/dkimkeys/

The new keys appear to be stored here:
/home/e-smith/dkim_keys/default


Offline Jean-Philippe Pialasse

  • *
  • 2,767
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Upgrade to 9.2 with DKIM enabled?
« Reply #8 on: May 07, 2017, 04:59:43 AM »
That what i did after moving the newly generated. This might be documented.

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Upgrade to 9.2 with DKIM enabled?
« Reply #9 on: May 07, 2017, 08:10:20 AM »
Or we'd create a migration script..

Offline Jean-Philippe Pialasse

  • *
  • 2,767
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Upgrade to 9.2 with DKIM enabled?
« Reply #10 on: May 08, 2017, 03:10:23 AM »
Or we'd create a migration script..

the problem with customization is that it is difficult to plan how exactly the custom files have been organized, and the migration script might do more harm than good.

Some might have copied the key multiple time, other might have link it, some might have only one key for all the domain configured, some one key per domains, some other might have a mix of dedicated keys and shared keys.

Hence, the current situation might be the wiser approach.

Offline holck

  • ****
  • 317
  • +1/-0
Re: Upgrade to 9.2 with DKIM enabled?
« Reply #11 on: May 09, 2017, 04:07:19 PM »
Another thought occurred to me - you might be able to get DKIM working again by copying your old keys to the new locations.

According to the wiki page, your old keys should be found here:
/var/service/qpsmtpd/config/dkimkeys/

The new keys appear to be stored here:
/home/e-smith/dkim_keys/default


Here is what worked for me:

The old DKIM-keys were found in /var/service/qpsmtpd/config/dkimkeys/ with names like
  • dkim.public
  • myserver.com.private
  • myserver.eu.private
The file dkim.public was copied to /home/e-smith/dkim_keys/default/public, replacing the previous file there
One of the *.private files was copied to /home/e-smith/dkim_keys/default/private, again replacing the previous file there.

This seems to work :-)
......