Tip: Changing SpamAssassin's Message/Template

mmatos

Member
Dec 9, 2006
9
0
151
I spent some time trying to figure this one out and thought I'd share:

Have you ever wished you could change the annoying, long message at the top of your emails?

Spam detection software, running on the system "your.host.com", has...
It's actually easier than you think!

First, go read my post here:
http://forums.cpanel.net/showthread.php?t=61592

I'll wait...

Back? Good. Here we go:

Important: You may have to adjust your file paths depending on your system.

If we open up /usr/local/share/spamassassin/10_misc.cf

Inside, you will find:

Code:
# Default template. Try to keep it under 78 columns (inside the the dots below).
#      ........................................................................
clear_report_template
report Spam detection software, running on the system "_HOSTNAME_", has
report identified this incoming email as possible spam.  The original message
report has been attached to this so you can view it (if it isn't spam) or label
report similar future email.  If you have any questions, see
report _CONTACTADDRESS_ for details.
report
report Content preview:  _PREVIEW_
report
report Content analysis details:   (_SCORE_ points, _REQD_ required)
report
report " pts rule name              description"
report  ---- ---------------------- --------------------------------------------------
report _SUMMARY_
#      ........................................................................
DO NOT MODIFY THIS FILE!!!

Next, open up /etc/mail/spamassassin/local.cf. If you read my other post you'll know what this file does...

Now, take the above and paste it into the bottom of local.cf. Then, go ahead and modify it until you're happy. For example, here's what I did:

Code:
#   Nicer report by Marcus
#      ........................................................................
clear_report_template
report SpamAssassin has detected this email as junk. The original email is
report attached if you wish to view or save it.
report
report Content preview:  _PREVIEW_
report
report Content analysis details:   (_HITS_ points, _REQD_ required)
report
report " pts rule name              description"
report  ---- ---------------------- --------------------------------------------------
report _SUMMARY_
#      ........................................................................
Save the file, then restart SpamAssassin by running:
/scripts/restartsrv_spamd

Done!
 

markhard

Well-Known Member
Apr 22, 2004
252
0
166
do you know how to just drop the attachment? so recipient only receive a notification email instead of a notification + attached spam email?