cPanel SpamAssassin and Content Preview

Quags

Administrator
Staff member
Some older mailclients may show a content preview when viewing a message. After going back and forth on a support request I finally came up with a solution to the problem.

The issue is

Code:
add_header = X-Ham-Report: $spam_report
Apparently this can not be handled by older mail clients. But you can not just remove this line from exim.conf because it will come back. So do do this go to WHM->exim configuration editor and go to advanced editor.

Copy the entire content in <b> default_spam_scan</b> and uncheck it.

Paste the contents into <b>custom_begin_spam_scan</b> but remove the X-HAM line

Code:
warn
condition = ${if eq {${acl_m0}}{1}{1}{0}}
spam = ${acl_m1}/defer_ok
log_message = "SpamAssassin as ${acl_m1} detected message as spam ($spam_score)"
add_header = X-Spam-Subject: ***SPAM*** $h_subject
add_header = X-Spam-Status: Yes, score=$spam_score
add_header = X-Spam-Score: $spam_score_int
add_header = X-Spam-Bar: $spam_bar
add_header = X-Spam-Report: $spam_report
add_header = X-Spam-Flag: YES
set acl_m2 = 1
 
warn
condition = ${if eq {$spam_score_int}{}{0}{${if <= {${spam_score_int}}{8000}{${if >= {${spam_score_int}}{50}{${perl{store_spam}{$sender_host_address}{$spam_score}}}{0}}}{0}}}}
 
warn
condition = ${if eq {${acl_m0}}{1}{${if eq {${acl_m2}}{1}{0}{1}}}{0}}
add_header = X-Spam-Status: No, score=$spam_score
add_header = X-Spam-Score: $spam_score_int
add_header = X-Spam-Bar: $spam_bar
add_header = X-Spam-Flag: NO
log_message = "SpamAssassin as ${acl_m1} detected message as NOT spam ($spam_score)"


If you get a config error make sure the
Code:
condition = ${if eq {$spam_score_int}{}{0}{${if <= {${spam_score_int}}{8000}{${if >= {${spam_score_int}}{50}{${perl{store_spam}{$sender_host_address}{$spam_score}}}{0}}}{0}}}}
line is all on one line. Save it and you are done.
 
Top