code: def dkim_sign(message):
      
  
      if not HAS_DKIM:
          return message
  
      if not (DKIM_DOMAIN and DKIM_PRIVATE_KEY):
          return message
  
      sig = dkim.sign(
          message,
          DKIM_SELECTOR,
          DKIM_DOMAIN,
          DKIM_PRIVATE_KEY,
          include_headers=DKIM_HEADERS)
      return sig + message
docs: :returns: A signed email message if dkim package and settings are available.