In the following script I report a method for implementing the DKIM signature when using the gomail module for Go. The library used for DKIM is toorop/go-dkim but this library, as the other libraries, only takes as input a pointer to array of bytes *[]byte while gomail only creates Message objects. The main idea is to convert the Message into bytes and the sign it, finally it must be send by using the Send() function.