Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

View Header and SA Report Formatting

Quote Reply
View Header and SA Report Formatting
View Header in Gossamer Mail Has The Spam Report as displayed below:

Content analysis details:
(12.7 points, 8.0 required) pts rule name description
---- ----------------------
-------------------------------------------------- 0.7
HTML_TITLE_UNTITLED BODY: HTML title contains "Untitled" 0.0
HTML_MESSAGE BODY: HTML included in message 0.5 HTML_40_50
BODY: Message is 40% to 50% HTML 1.6 RAZOR2_CF_RANGE_51_100
BODY: Razor2 gives confidence between 51 and 100 [cf: 100] 0.1
HTML_FONTCOLOR_UNKNOWN BODY: HTML font color is unknown to us 2.8
UNWANTED_LANGUAGE_BODY BODY: Message written in an undesired language
0.1 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
1.8 DCC_CHECK Listed in DCC
(http://rhyolite.com/anti-spam/dcc/) 0.9 RAZOR2_CHECK Listed
in Razor2 (http://razor.sf.net/) 4.3 FORGED_THEBAT_HTML The Bat!
can't send HTML message only
X-Spam-Score: 12.7


Instaed of actually as it should be like:

Content analysis details:
(12.7 points, 8.0 required)

---------------------------
pts rule name description
--------------------------------------------------
0.7 HTML_TITLE_UNTITLED BODY: HTML title contains "Untitled"
0.0 HTML_MESSAGE BODY: HTML included in message
0.5 HTML_40_50 BODY: Message is 40% to 50% HTML
1.6 RAZOR2_CF_RANGE_51_100 BODY: Razor2 gives confidence between 51 and 100 [cf: 100]
0.1 HTML_FONTCOLOR_UNKNOWN BODY: HTML font color is unknown to us
2.8 UNWANTED_LANGUAGE_BODY BODY: Message written in an undesired language
0.1 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
1.8 DCC_CHECK Listed in DCC (http://rhyolite.com/anti-spam/dcc/)
0.9 RAZOR2_CHECK Listed in Razor2 (http://razor.sf.net/)
4.3 FORGED_THEBAT_HTML The Bat! can't send HTML message only

X-Spam-Score: 12.7


Have tried fold_headers 1 in local.cf (server wide) but still it is not properly formatted

Is there anything else which needs correction?

Thanx
HyTC

Last edited by:

HyperTherm: Sep 22, 2004, 1:36 AM
Quote Reply
Re: [HyperTherm] View Header and SA Report Formatting In reply to
The problem is due to the header rewrapping done in GT::Mail. I fixed this issue (it will only rewrap if the line is too long) a while ago, but it hasn't made it into any of the products yet.

Adrian
Quote Reply
Re: [brewt] View Header and SA Report Formatting In reply to
Hiello.

BTW, when is it going to find it's way into GT products finally?
Please try to understand that though these matters may be trivial, but it does somehow affect the overall impression of customers of your customers.

Thanks
HyTC
Quote Reply
Re: [HyperTherm] View Header and SA Report Formatting In reply to
~Bump~

Frown

HyTC
Quote Reply
Re: [HyperTherm] View Header and SA Report Formatting In reply to
It will make it into the next product release. In the meantime, here's a patch to GT::Mail::Parts (not that it's not a real patch, so you'll have to change it manually):
Code:
sub fold {
# --------------------------------------------------------------------------
my ( $tag, $line ) = @_;
+
+# Remove any newlines that shouldn't be in the header
+ $line =~ s/(?:\r?\n)+$//;
+ $line =~ s/(?:\r?\n)(?=[^\t ])/ /g;
+
+# Don't fold if we don't need to
+ my $fold = 0;
+ for (split /$CRLF/, $line) {
+ if (length $_ > 72) {
+ $fold = 1;
+ last;
+ }
+ }
+ return $line unless $fold;

return $line;
}

-# Line does not need wrapping
- if ( length( $line ) <= 72 ) {
- return $line;
- }

Adrian
Quote Reply
Re: [brewt] View Header and SA Report Formatting In reply to
Did but got bunch of errors, mainly related to following:

Global symbol "$line" requires explicit package name at /GT/Mail/Parts.pm line 492.
Global symbol "$tag" requires explicit package name at /GT/Mail/Parts.pm line 493.
Global symbol "$line" requires explicit package name at /GT/Mail/Parts.pm line 497.
Global symbol "$line" requires explicit package name at /GT/Mail/Parts.pm line 497.
Global symbol "$line" requires explicit package name at /GT/Mail/Parts.pm line 499.
Global symbol "$line" requires explicit package name at /GT/Mail/Parts.pm line 502.
Global symbol "$line" requires explicit package name at /GT/Mail/Parts.pm line 503.
Global symbol "$line" requires explicit package name at /GT/Mail/Parts.pm line 512.
Global symbol "$line" requires explicit package name at /GT/Mail/Parts.pm line 512.
Global symbol "$line" requires explicit package name at /GT/Mail/Parts.pm line 515.
Global symbol "$line" requires explicit package name at /GT/Mail/Parts.pm line 516.
Global symbol "$line" requires explicit package name at GT/Mail/Parts.pm line 517.
Global symbol "$line" requires explicit package name at /GT/Mail/Parts.pm line 518.
Unmatched right curly bracket at /GT/Mail/Parts.pm line 519, at end of line

Compilation failed in require at /GT/Mail.pm line 26.
BEGIN failed--compilation aborted at /GT/Mail.pm line 26.
Compilation failed in require at /admin/GMail/mod_perl.pm line 41.
BEGIN failed--compilation aborted at /admin/GMail/mod_perl.pm line 41

This replacement was done in GT::Mail::Parts of Community which is the one symlinked to. (ie the latest of all).

# GT::Mail::Parts
# Author : Scott Beck
# CVS Info :
# $Id: Parts.pm,v 1.63 2004/02/25 01:28:49 jagerman Exp $

Gossamer Mail Version: 2.2.0

HyTC

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] View Header and SA Report Formatting In reply to
You didn't modify the file properly. Check over your changes, in particular, make sure you didn't delete the "my ($tag, $line) = @_;" line.

Adrian

Last edited by:

brewt: Oct 13, 2004, 8:19 PM
Quote Reply
Re: [brewt] View Header and SA Report Formatting In reply to
Oops
Never work when tired. My fault. Got the restart fine the header still however shows the same way. The code is as follows:

sub fold {
# --------------------------------------------------------------------------
my ( $tag, $line ) = @_;

##Fix For Header Wrapping @brewt::273642##


# Remove any newlines that shouldn't be in the header
$line =~ s/(?:\r?\n)+$//;
$line =~ s/(?:\r?\n)(?=[^\t ])/ /g;

# Don't fold if we don't need to
my $fold = 0;
for (split /$CRLF/, $line) {
if (length $_ > 72) {
$fold = 1;
last;
}
}
return $line unless $fold;

##Fix End ##

# First we unfold
$line =~ s/[\t ]*[\r\n][\t ]*/ /g;
my $key = lc $tag;

# Special case for TO fields
if ( $key eq 'to' or $key eq 'cc' or $key eq 'bcc' ) {
$line =~ s/,[\t ]+/,$CRLF /g if length $line > 72;
return $line
}

# We have nothing to wrap on :(
if ( $line !~ /\s/ ) {
return $line;
}

# Line does not need wrapping
# if ( length( $line ) <= 72 ) {
# return $line;
# }

And a Test Mail Header Looks Like This (same as before):

Content analysis details:
(0.0 points, 7.0 required) pts rule name description ----
----------------------
-------------------------------------------------- 0.0 RCVD_BY_IP
Received by mail server with no name -0.0 SPF_HELO_PASS
SPF: HELO matches SPF record
X-Spam-Score: 0.0

HyTC

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [brewt] View Header and SA Report Formatting In reply to
Hi.

I tried but since the View Header in Gossamer Mail wasn't displaying in proper format, i just checked the log files to see if it is anything to do with SA. The results are that as in logfile, the formatting is fine as displayed in the attachment (taken from server logs of actual spam mail).

So despite having doen the changes, the View header still shows no change.

HyTC

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] View Header and SA Report Formatting In reply to
One thing I forgot to mention is that the change will only affect future emails. Old emails will always be the same.

Adrian
Quote Reply
Re: [brewt] View Header and SA Report Formatting In reply to
Detailing on the above after the changes:

Sent a mail to non existent address so that the bounce contains the header in the body. This is how it appears (perfectly OK wrt formatting:

X-Spam-Report: Spam detection software SpamAssassin 3.0.0 (2004-09-13),
running on the system "domain.somedomain.com", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
postmaster for details.
Content preview: Test mail for testing formatting of the [..]
Content analysis details: (-102.8 points, 7.0 required)
---- ---------------------- ------------------------------------------
pts rule name description
---- ---------------------- ------------------------------------------
-2.8 ALL_TRUSTED Did not pass through any untrusted hosts
-100 USER_IN_WHITELIST From: address is in the user's white-list
---- ---------------------- ------------------------------------------

The same thing when viewed in the View Header of a mail delivered is as follows:

X-Spam-Report: Spam detection software SpamAssassin 3.0.0 (2004-09-13), running on the
system "domain.somedomain.com", has identified this incoming
email as possible spam. The original message has been attached to this
so you can view it (if it isn't spam) or label similar future email.
If you have any questions, see postmaster for details. Content
preview: Test mail for testing formatting of the [..] Content
analysis details: (-102.8 points, 7.0 required) ----
---------------------- ------------------------------------------ pts
rule name description ---- ----------------------
------------------------------------------ -2.8 ALL_TRUSTED
Did not pass through any untrusted hosts -100 USER_IN_WHITELIST
From: address is in the user's white-list ---- ----------------------
------------------------------------------

Just in case it would help in resolving the issue.

HyTC

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] View Header and SA Report Formatting In reply to
The headers in a bounce are a separate issue, which I've fixed. It will be included in the next release (or if you get the latest Links SQL).

Adrian