dkim_mail_parse()

[back to index]

SYNOPSIS
#include <dkim.h>
int dkim_mail_parse_multi(
	char *line,
	char **users_out,
	char **domains_out
);
Parse an RFC2822 header for a set of users and hostnames. Intended for use on header fields that might contain multiple addresses, such as To: and Cc:.
DESCRIPTION
Called When At any time.
ARGUMENTS
ArgumentDescription
line Input line, not including the name of the header.
users_out Pointer to a variable of type (unsigned char **) that will be set to point to an array of "local-part"s (user ID) found in the input.
domains_out Pointer to a variable of type (unsigned char **) which will be set to point to an array of domains found in the input.
RETURN VALUE 0 on success, other on failure. The failure codes are internal to the library for now.
NOTES
  • line is modified.
  • The arrays returned will be of the same size and entries are correspondent, so the first element from each refer to the first address found, etc.
  • The caller is responsible for deallocating the returned arrays once they are no longer needed.
  • This function is not part of the DKIM specification. It is provided as a facility to implementors to reduce code duplication.

Copyright (c) 2004, 2005, 2007 Sendmail, Inc. and its suppliers. All rights reserved.
Copyright (c) 2009, 2010, 2014, The Trusted Domain Project. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the respective licenses.