How to enamble DKIM keys all Plesk domains

If you want to enable DKIM keys all Plesk subscriptions run the follovwing command in terminal:

for domain in $(plesk db -Ne 'SELECT name FROM domains WHERE parentDomainId=0;'); do plesk bin domain_pref --update $domain -sign_outgoing_mail true; done