Existing code:
void nsMsgLocalMailFolder::CopyPropertiesToMsgHdr(nsIMsgDBHdr *destHdr,
nsIMsgDBHdr *srcHdr)
{
nsXPIDLCString sourceString;
srcHdr->GetStringProperty("junkscore", getter_Copies(sourceString));
destHdr->SetStringProperty("junkscore", sourceString);
srcHdr->GetStringProperty("junkscoreorigin",
getter_Copies(sourceString));
destHdr->SetStringProperty("junkscoreorigin", sourceString);
srcHdr->GetStringProperty("keywords", getter_Copies(sourceString));
destHdr->SetStringProperty("junkscoreorigin", sourceString);
nsMsgLabelValue label = 0;
srcHdr->GetLabel(&label);
destHdr->SetLabel(label);
}
- David
Is there a user-visible symptom to this problem?
David, did you open a bug for that?
- David
Here's another minor bug you might want to add to that. In
nsImapMailFolder.cpp near line 6876:
if (mDatabase && msgDBHdr)
{
nsMsgLabelValue label;
nsXPIDLCString junkScore, junkScoreOrigin;
nsMsgPriorityValue priority;
msgDBHdr->GetStringProperty("junkscore",
getter_Copies(junkScore));
msgDBHdr->GetStringProperty("junkscoreorigin",
getter_Copies(junkScoreOrigin));
if (!junkScore.IsEmpty()) // ignore already scored messages.
mDatabase->SetAttributesOnPendingHdr(msgDBHdr, "junkscore",
junkScore.get(), 0);
if (!junkScoreOrigin.IsEmpty())
mDatabase->SetAttributesOnPendingHdr(msgDBHdr,
"junkscoreorigin", junkScore.get(), 0);
In that last line, the junkScore.get() should be junkScoreOrigin.get()
- Kent
- David
> Thanks, I'll fix that too. I guess we don't use the junkscore origin much!
>
> - David
I'm running an extension now that uses a custom column to show the
junkscoreorigin. I've also modified the code to add junkscoreorigins of
"whitelist" (which is a hard GOOD)and "filter". With these changes,
junkscoreorigin becomes much more interesting as a diagnostic of spam
processing for particular messages.