FortiMail provides advanced, multi-layer protection against the full spectrum of email-borne threats
The DKIM key has to be generated on FortiMail and file with pre-configured DNS TXT record is made available for download. There is no way however to change any parameter for the DKIM key generation.

Example of downloaded file:
test._domainkey IN TXT ("t=y; k=rsa; p=" "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvH83XJcrIv8PRDkmCDh0kq5SyCeo7U3UTsLEP

Consult the Fortimail Admin Guide in the Fortinet Document Library for more information about DKIM configuration.

In some cases DNS TXT record does not work when inserted to DNS server. With some online validating tools errors for this DNS TXT record can be seen, for example “This is not a good DKIM key record”.

The maximum single string length of a TXT record is limited to 255 bytes. If the string of a TXT record is longer then the TXT record will not be valid.

As defined in RFC1035, a DNS TXT  record  can be composed of more than one string. FortiMail creates the DKIM key exactly in this way. The TXT record consists of several string parts enclosed in parenthesis, effectively making the TXT record longer than 255 bytes.

This is description in RFC 4408.

To fix the issue the proper configuration has to be done on DNS server side.