/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "str.h"
#include "message-address.h"
#include "message-part-data.h"
#include "message-parser.h"
#include "imap-parser.h"
#include "imap-envelope.h"
#include "imap-quote.h"
/*
* Envelope write
*/
{
return;
}
else {
}
}
}
{
static const char *empty_envelope =
"NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL";
return;
}
else {
}
}
/*
* ENVELOPE parsing
*/
static bool
{
unsigned int list_count;
return FALSE;
/* we require 4 arguments, strings or NILs */
if (list_count < 4)
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return TRUE;
}
static bool
{
return TRUE;
}
return FALSE;
return FALSE;
}
return TRUE;
}
const char **error_r)
{
*error_r = "Invalid date field";
return FALSE;
}
*error_r = "Invalid subject field";
return FALSE;
}
*error_r = "Invalid from field";
return FALSE;
}
*error_r = "Invalid sender field";
return FALSE;
}
*error_r = "Invalid reply_to field";
return FALSE;
}
*error_r = "Invalid to field";
return FALSE;
}
*error_r = "Invalid cc field";
return FALSE;
}
*error_r = "Invalid bcc field";
return FALSE;
}
*error_r = "Invalid in_reply_to field";
return FALSE;
}
*error_r = "Invalid message_id field";
return FALSE;
}
return TRUE;
}
const char **error_r)
{
int ret;
(void)i_stream_read(input);
if (ret < 0) {
} else if (ret == 0) {
*error_r = "Empty envelope";
ret = -1;
} else {
ret = -1;
}
return (ret >= 0);
}