6.0.0-alpha12
6/7/25

[#10302] Report as spam shown within message inside Spam folder
Summary Report as spam shown within message inside Spam folder
Queue IMP
Queue Version 5.0.7
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester kareem.dana (at) gmail (dot) com
Created 07/03/2011 (5088 days ago)
Due
Updated 07/12/2011 (5079 days ago)
Assigned 07/05/2011 (5086 days ago)
Resolved 07/12/2011 (5079 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/12/2011 06:42:31 PM Michael Slusarz State ⇒ Resolved
 
07/12/2011 06:42:26 PM Git Commit Comment #6 Reply to this comment
Changes have been made in Git for this ticket:

Bug #10302: Comparing 2 objects won't work properly if internal 
variables have changed

  5 files changed, 22 insertions(+), 8 deletions(-)
http://git.horde.org/horde-git/-/commit/6e93a8ccda4f66db3eb0fa4f243d321c95ba7a09
07/05/2011 07:57:17 PM kareem (dot) dana (at) gmail (dot) com Comment #5 Reply to this comment
Some rudimentary debugging in message.php line 573:
if ($conf['spam']['reporting'] &&
     ($conf['spam']['spamfolder'] ||
      ($mailbox != IMP_Mailbox::getPref('spam_folder')))) {
...
}

That conditional is being resolved to true when I view a message in my 
spam folder, specifically ($mailbox != 
IMP_Mailbox::getPref('spam_folder')) is true. Here are the logs I had 
it print out.

HORDE [imp] message.php - report as spam [pid 1681 on line 577 of 
"/usr/local/www/apache22/horde/imp/message.php"]
HORDE [imp] IMP_Mailbox Object (     [cache] => Array         (         
      [n] => Array                 (                     [0] => .       
                [4] => 1                 )              [d] => 1       
       [ro] =>              [a] =>          )      [changed] => 0     
[_mbox:protected] => Spam )  [pid 1681 on line 578 of 
"/usr/local/www/apache22/horde/imp/message.php"]
HORDE [imp] IMP_Mailbox Object (     [cache] => Array         (         
      [n] => Array                 (                     [0] => .       
                [4] => 1                 )              [d] => 1       
       [ro] =>              [a] =>          )      [changed] => 1     
[_mbox:protected] => Spam )  [pid 1681 on line 579 of 
"/usr/local/www/apache22/horde/imp/message.php"]

The first IMP_Mailbox Object is $mailbox. The second is 
IMP_Mailbox::getPref('spam_folder'). 
IMP_Mailbox::getPref('spam_folder') has changed = 1. $mailbox has 
changed = 0. Not sure what changed means in this context, but I hope 
this helps. I'm using dovecot 2.0.12 as my imap server, by the way, if 
this issue is related to the imap server giving us some unexpected 
results.

07/05/2011 07:26:36 PM kareem (dot) dana (at) gmail (dot) com Comment #4
New Attachment: spam-dimp.png Download
Reply to this comment
Here is the attachment.
07/05/2011 07:25:20 PM kareem (dot) dana (at) gmail (dot) com Comment #3 Reply to this comment
I don't see this - it correctly shows "Report as Innocent" for me.
It is happening on both my production and test machines. "Report as 
Innocent" correctly shows up in the list view of messages, but when 
reading a message in the Spam folder, it switches to "Report as Spam" 
and if I click that link it follows through with reporting it as spam. 
Its not as if the link is being mislabeled. In my mail/imp 
preferences, I have the spam folder correctly set. I'll try to debug 
it a bit further and see if I can give you guys more information. 
Here's the versions I'm running if that helps:

Address Book (turba) 3.0.3
Filters (ingo) 2.0.2
Horde (horde) 4.0.6
Mail (imp) 5.0.7

I'm now attaching a new screenshot from DIMP. My original bug report 
was solely based on the imp traditional view. Dimp is showing both 
Spam and Innocent buttons when I read a message in my spam folder.
07/05/2011 06:41:37 PM Michael Slusarz Comment #2
State ⇒ Feedback
Reply to this comment
I don't see this - it correctly shows "Report as Innocent" for me.
07/04/2011 08:26:32 AM Jan Schneider State ⇒ Assigned
Assigned to Michael Slusarz
 
07/03/2011 02:46:47 PM kareem (dot) dana (at) gmail (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Report as spam shown within message inside Spam folder
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
New Attachment: spamreport.png Download
State ⇒ Unconfirmed
Reply to this comment
When I am in my spam folder, the Report as Innocent link shows up as 
expected. However, if I click on a message in the Spam folder to view 
it, I get a Report as Spam link instead. This is within the IMP 
traditional view. I attached a screenshot. Notice the report as spam 
link even though I am in my spam folder.

Relevant IMP configuration:
$conf['spam']['spamfolder'] = false;
$conf['spam']['program'] = '/usr/local/bin/sa-learn --no-sync --spam';
$conf['spam']['reporting'] = true;
$conf['notspam']['spamfolder'] = true;
$conf['notspam']['program'] = '/usr/local/bin/sa-learn --no-sync --ham';
$conf['notspam']['reporting'] = true;

Saved Queries