return NULL;
}
+ /* Check if HTML features are available */
+ if (!part->html_features) {
+ msg_debug_fuzzy_check("HTML part has no features available");
+ return NULL;
+ }
+
/* Check minimum tags threshold */
- if (part->html->features.tags_count < rule->min_html_tags) {
+ if (part->html_features->tags_count < rule->min_html_tags) {
msg_debug_fuzzy_check("HTML part has %d tags, less than minimum %d",
- part->html->features.tags_count, rule->min_html_tags);
+ part->html_features->tags_count, rule->min_html_tags);
return NULL;
}
* - Require at least 2 links (single-link emails too generic)
* - Require at least some DOM depth (flat structure too common)
*/
- if (part->html->features.links.total_links < 2) {
+ if (part->html_features->links.total_links < 2) {
msg_debug_fuzzy_check("HTML part has only %d links, too few for reliable matching",
- part->html->features.links.total_links);
+ part->html_features->links.total_links);
return NULL;
}
- if (part->html->features.max_dom_depth < 3) {
+ if (part->html_features->max_dom_depth < 3) {
msg_debug_fuzzy_check("HTML part has depth %d, too shallow for reliable matching",
- part->html->features.max_dom_depth);
+ part->html_features->max_dom_depth);
return NULL;
}