Skip to content

opendkim.query_method()

Christopher Mooney edited this page Apr 7, 2017 · 1 revision

DESCRIPTION

This function gets and sets the query method option. In libopendkim parlance this is the DKIM_OPTS_QUERYMETHOD option. When used with no arguments, this will get the stored value, when passed an option it will set query method to that value.

For more information:
http://www.opendkim.org/libopendkim/dkim_options.html

ARGUMENTS

Type: (String | undefined)

  • option: Either DKIM_QUERY_DNS (default) or DKIM_QUERY_FILE which should override any q= value in signatures during verifications.

RETURN VALUES

  • On successful get, returns the value for this option
  • On successful set, returns the opendkim instance
  • On failure, an exception is thrown that indicates the cause of the problem.

NOTES

  • if no arguments are passed, this function will get the value.
  • if DKIM_QUERY_FILE is passed it will only be used if opendkim.query_info() has also been set with the filename.

EXAMPLE

try {
  var opendkim = new OpenDKIM();
  opendkim.query_method('DKIM_QUERY_FILE');
} catch (err) {
  console.log(err.message);
}