-
I have a misconfigured MTA server to which I transfer mail from an IMAP account using fetchmail. Although I use the --softbounce switch, fetchmail still deletes the email even in case of unsuccessful delivery. The problem is caused by the fact, that the close_sink() call returns with the value TRUE not only in case of successful delivery, but also in case of a permanent (code 5xx) error. Then the fetch_messages() procedure will no longer know, whether the message can be deleted or not, because it does not have the information that the close_sink() call returned TRUE because the delivery was successful or because it is expected that the delivery will not be successful later either, so the value of the softbounce switch cannot be taken into account at this point. Solution that in the case of a permanent error, the close_sink() call does not return a fixed TRUE value, but the negated value of the softbounce switch.
b9282e76