Page 1 of 1

Bug in VestaCP related to dns / dkim editing

Posted: Mon Jan 02, 2017 9:27 pm
by retronoodle
1. uncheck "DKIM support" in Mail -> edit

2. recheck "DKIM Support" in Mail -> edit

The resulting record in Bind will be incorrect:

Code: Select all

mail._domainkey.test.com       14400   IN      TXT             "k=rsa; p=MIGfMA0GCS....
When it should not include the domain name.

Correct would be:

Code: Select all

mail._domainkey     14400   IN      TXT             "k=rsa; p=MIGfMA0GCS....
You can workaround this:

1. Open the DKIM dns record in one tab, in edit mode.
2. In another tab, open the dns again, and delete it, and click the + to add another.
3. Paste from the tab in step 1, into the tab in step 2. When you get to the "Record", only paste in "mail._domainkey" - leave off the domain.
4. Save and test

Code: Select all

dig @yourDNSserver.com -t txt mail._domainkey.yourdomain.com
It should propagate after awhile (30 mins or less).

Re: Bug in VestaCP related to dns / dkim editing

Posted: Sun Jan 29, 2017 2:06 pm
by MrFwibble
Just noticed this myself.

If you are comfortouble edting files then you can fix this.

edit:

Code: Select all

nano /usr/local/vesta/bin/v-add-mail-domain-dkim
Under the Action part, look for # Adding dns record then replace:

Code: Select all

record="_domainkey.$domain_idn"
change to this

Code: Select all

record="_domainkey"
There are two occurrences of this.

This file will more than likely be overwritten at some point in the future with Vesta updates, so beware of that.

Re: Bug in VestaCP related to dns / dkim editing

Posted: Sun Apr 30, 2017 10:53 pm
by equynox
Should't i modify the two dns entries coz there are two. The one woth the public key and another one. There are 2 txt entries.

And what entry are you talking about that should be modified? The one with the public key i assume?

Re: Bug in VestaCP related to dns / dkim editing

Posted: Fri May 05, 2017 4:51 pm
by cottager
There are records for mail._domainkey and _domainkey. He means both of those. mail one has the key.

I just ran into this. Is it in the bug tracker? It should be. Since you only seem to hit it if you turn dkim off and then on again, I haven't yet bothered to edit the vestacp file anticipating an update soon. :)