diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 10:32:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 10:32:01 +0000 |
commit | 21103af131d3308ef39ad30c66e0fa0ea87b4525 (patch) | |
tree | 1f5669b5b37a04d2d2a6becc2056c5d341d4ab16 /src/lib-mail/message-address.h | |
parent | Adding upstream version 1:2.3.21+dfsg1. (diff) | |
download | dovecot-upstream.tar.xz dovecot-upstream.zip |
Adding upstream version 1:2.3.21.1+dfsg1.upstream/1%2.3.21.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/lib-mail/message-address.h')
-rw-r--r-- | src/lib-mail/message-address.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib-mail/message-address.h b/src/lib-mail/message-address.h index 8370397..224f7a7 100644 --- a/src/lib-mail/message-address.h +++ b/src/lib-mail/message-address.h @@ -18,7 +18,7 @@ enum message_address_parse_flags { {name = NULL, NULL, "group", NULL}, ..., {NULL, NULL, NULL, NULL} */ struct message_address { - struct message_address *next; + struct message_address *prev, *next; /* display-name */ const char *name; @@ -31,12 +31,22 @@ struct message_address { bool invalid_syntax; }; +struct message_address_list { + struct message_address *head, *tail; +}; + /* Parse message addresses from given data. Note that giving an empty string will return NULL since there are no addresses. */ struct message_address * message_address_parse(pool_t pool, const unsigned char *data, size_t size, unsigned int max_addresses, enum message_address_parse_flags flags); +/* Same as message_address_parse(), but return message_address_list containing + both the first and the last address in the linked list. */ +void message_address_parse_full(pool_t pool, const unsigned char *data, + size_t size, unsigned int max_addresses, + enum message_address_parse_flags flags, + struct message_address_list *list_r); /* Parse RFC 5322 "path" (Return-Path header) from given data. Returns -1 if the path is invalid and 0 otherwise. |