SurgeWeb bug fix specifics

Spam Reporting issues (Surgeweb and IMAP) (fixed version 4.3f-13)

Complete rewrite of the way messages are marked spam / not spam from surgeweb fixing a bunch of oddities and making the code a lot more maintainable:

Previously:

1) if g_spam_folders or g_spam_folders_show was not specified

  • Surgeweb "not spam" in the spam folder would subject clean the selected messages, and move these to the inbox. This would not release additional messages from the same sender, and this kind of "spam release" would not work with late forwarding / surgewalled accounts (nor would the "allow once" action)
  • IMAP moving messages to the inbox would notspam train the individual messages, but not release additional messages.
2) if g_spam_folders or g_spam_folders_show was specified
  • Surgeweb "not spam" in the spam folder would release the selected message and all messages from this user (in a way compatible with late forwarding and without cleaning the subject).
    In addition, if this message was not the top message in the list:
    • it would also display an error about "invalid copy parameters".
    If the original message was the top message in the list:
    • it would also release the second message on the list and any additional messages by the same sender. As well as adding a duplicate of the second message to the surgeweb inbox, with the subject cleaned.
    • it would delete the third message in the list.
    Also the surgeweb displayed message list would not get updated with the additional message releases & deletes, for the next 15 seconds even folder clicks would not update the message list in the spam folder correctly (unless a refresh folder was explicitly done, in which case it did display the modified Spam folder).
  • Surgeweb "allow once" actions would move the selected message to the inbox (with the subject cleaned) in a way not compatible with late forwarding.
  • IMAP moving a message to the inbox, would release all messages by this sender moving them to the inbox (without the subject cleaned, but in a way compatible with late forwarding), and move a duplicate of the actual selected message to the inbox with the subject cleaned.

In either case user.cgi, status email, and friends bounce reply based message releasing has been correctly releasing emails (without subject washing however) regardless of to the state of g_spam_folders or g_spam_folders_show.

This has been corrected twofold:

  1. imap fix in surgemail (version 4.3f-10) means that the case the wrong message getting released and deleted would now display an error instead. This will start to work if you do binary only upgrade.
  2. surgeweb fix (version 4.3f-12, requiring a full upgrade including surgeweb templates) which results in the behaviour below:
  • Surgeweb "not spam" / "allow" actions are always subject cleaned, all other releases (user.cgi / status email / imap move / friends bounce reply) may or may not be set to have subject cleaned on release using the new global setting g_friends_release_wash.
  • IMAP move actions ("Friends pending" -> INBOX) always move the selected message to inbox (not compatible with late forwarding), and releases any additional messages by same sender (in a way compatible with late forwarding). No duplication happens.
  • Surgeweb "not spam" in the spam folder releases the selected message and all messages by the same sender all in a way compatible with late forwarding. "allow once" is also compatible with late forwarding. In both these cases the stars (or other surgemail spam tagging) are removed and the spam folder surgeweb message list displayed is immediately refreshed. Also surgeweb displays more complete information on what it is and is not able to do in response to "spam" / "not spam" / "allow once" / "block" actions.