Skip to main content

ac:esmtp_capability_add

Last updated March 2020

Name

ac:esmtp_capability_add — Add a capability to the EHLO response

Synopsis

require('msys.extended.ac')

ac:esmtp_capability_add(name);

name: string

Description

This function is equivalent to the Sieve advertize_esmtp_capability action. It adds a capability string to the EHLO response. It is most useful in the connect phase and raises an error if the session is not attached to an SMTP listener. Find an example below:

require("msys.core");
require("msys.extended.message");
require("msys.extended.ac");

local mod = {};
function mod:validate_connect(ac, vctx)
  ac:esmtp_capability_add("8BITMIME");
  return msys.core.VALIDATE_CONT;
end

msys.registerModule("validate_connect", mod);

The ac variable is an accept construct userdata data type. For a description of the C struct see accept_construct.

See Also

Was this page helpful?