Skip to content

list

local list = addressheader.list

Returns a lua table consisting of one entry per address in the header. Each entry is a single simple address object that has domain, user, email and name fields with the same semantics as addressheader.

for _, address in ipairs(msg:to_header().list) do
  print('to entry', address)
  -- prints something like:
  -- to entry      {"name":null,"address":"user@example.com"}
  -- to entry      {"name":"John Smith","address":"john.smith@example.com"}
end
Since: Version 2026.04.09-ea3b2a9b

The functionality described in this section requires version 2026.04.09-ea3b2a9b of KumoMTA, or a more recent version.

The user field on each list entry now returns the normalized/decoded local part. See addressheader.user for details.