Not spam function not working in snappymail/rainloop

Why is it that when a legitimate email is routed to the spam folder and you mark it as not spam subsequent emails from the same sender still routes to the spamfolder?
This has occurred on both rainloop and snappymail. The not spam flag seems to operate temporarily move it to inbox, but within the next several hours it moves back to spam folder. Is there a bug in this functionality? If not, can the function be fixed?