|
|
@ -128,19 +128,19 @@ char* copy_string(const std::string& s) |
|
|
|
|
|
|
|
const std::map<std::string, struct ParserBase*> parsers = |
|
|
|
{ |
|
|
|
{"Date", P(&message::recv, &parse_timestamp) }, |
|
|
|
{"Message-ID", P(&message::id, message_id, ©_string) }, |
|
|
|
{"Subject", P(&message::shortmsg, phrase, ©_string) }, |
|
|
|
{"From", P(&message::from, &parse_address) }, |
|
|
|
{"To", P(&message::to, &parse_address_list) }, |
|
|
|
{"Cc", P(&message::cc, &parse_address_list) }, |
|
|
|
{"Bcc", P(&message::bcc, &parse_address_list) }, |
|
|
|
{"Reply-To", P(&message::reply_to, &parse_address_list) }, |
|
|
|
{"date", P(&message::recv, &parse_timestamp) }, |
|
|
|
{"message-ID", P(&message::id, message_id, ©_string) }, |
|
|
|
{"subject", P(&message::shortmsg, phrase, ©_string) }, |
|
|
|
{"from", P(&message::from, &parse_address) }, |
|
|
|
{"to", P(&message::to, &parse_address_list) }, |
|
|
|
{"cc", P(&message::cc, &parse_address_list) }, |
|
|
|
{"bcc", P(&message::bcc, &parse_address_list) }, |
|
|
|
{"reply-to", P(&message::reply_to, &parse_address_list) }, |
|
|
|
|
|
|
|
{"In-Reply-To", P<DS, stringlist_t*>(&message::in_reply_to, message_id_list, &create_stringlist) }, |
|
|
|
{"References" , P<std::vector<std::string>, stringlist_t*>(&message::references, message_id_list, &create_stringlist) }, |
|
|
|
{"in-reply-to", P<DS, stringlist_t*>(&message::in_reply_to, message_id_list, &create_stringlist) }, |
|
|
|
{"references" , P<std::vector<std::string>, stringlist_t*>(&message::references, message_id_list, &create_stringlist) }, |
|
|
|
|
|
|
|
{"Received", new Discard }, |
|
|
|
{"received", new Discard }, |
|
|
|
}; |
|
|
|
|
|
|
|
// parses the header and fill the parts in msg
|
|
|
|