dinhvh / libetpan

Mail Framework for C Language
www.etpan.org
Other
612 stars 284 forks source link

Failing to send emails with recent changes in mailimf.c #406

Closed MarcelRoelofs closed 2 years ago

MarcelRoelofs commented 3 years ago

When compiling and linking mailcore2 with recent versions of libetpan, sending emails from mailcore2 started failing. After some debugging I traced this down to libetpan not being able to parse the from header (among others) in the message generated by mailcore2, and thus not being able to determine the sender.

The error appears to occur in src/low-level/imf/mailimf.c, and did not happen when we still used libetpan 1.9.3, This makes commit fc3c6a6418f0ebf2ca70887398086bbf3a0bdee8 the most likely culprit in my view, especially as I don't see why "The expression or part of expression is always false.", as the commit comment states.

Hope this helps improving libetpan.

Cheers, Marcel Roelofs

alex2grad commented 2 years ago

I agree, the commit fc3c6a6 has to be reverted. With this commit failed to parse valid message.

alex2grad commented 2 years ago

The commit fc3c6a6 removed a permit of missing optional data. when parse functions return MAILIMF_ERROR_PARSE. The simple example - CRLF, The CR is optional. dinhvh please revert this commit, it completely broke this library.

dinhvh commented 2 years ago

https://github.com/dinhvh/libetpan/commit/a2a063830b3352ed6fa839cbd0775e8c0af680b6

77tb commented 2 years ago

I think https://github.com/dinhvh/libetpan/commit/829f19ae427b248fec92c357e91b12cabde0f5dd should also be reverted too

dinhvh commented 2 years ago

I put in more reverts, including the one you suggested. Thank you!