Add explicit invalid_syntax flag also when end of input occure because address is without domain invalid and in this case it was not correctly propagated. --- src/lib-mail/message-address.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib-mail/message-address.c b/src/lib-mail/message-address.c index 4e86185..93b7c83 100644 --- a/src/lib-mail/message-address.c +++ b/src/lib-mail/message-address.c @@ -162,6 +162,10 @@ static int parse_addr_spec(struct message_address_parser_context *ctx) str_truncate(ctx->parser.last_comment, 0); ret = parse_local_part(ctx); + if (ret <= 0) { + /* end of input or parsing local-part failed */ + ctx->addr.invalid_syntax = TRUE; + } if (ret != 0 && *ctx->parser.data == '@') { ret2 = parse_domain(ctx); if (ret2 <= 0) -- 1.7.9.5