You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2012/12/12 20:58:53 UTC

[Bug 6877] New: mails send via GMX are considered to be from a spam server

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6877

            Bug ID: 6877
           Summary: mails send via GMX are considered to be from a spam
                    server
           Product: Spamassassin
           Version: 3.3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Rules
          Assignee: dev@spamassassin.apache.org
          Reporter: hendrik.haddorp@gmx.net
    Classification: Unclassified

GMX does not properly indicate that the sender was authenticated. This seems to
be a known issues (http://martin.von-gagern.net/bugs/gmx) but GMX doesn't seem
to be willing to fix their setup.

So I did this small change in
/usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm

422a423,431
>   # workaround for GMX, which authenticates users but does not indicate it properly
>   # SMTP version
>   elsif (/from \S* \((?:HELO|EHLO) (\S*)\) \[(${IP_ADDRESS})\] by (mail\.gmx\.net) \([^\)]+\) with ((?:ESMTP|SMTP))/) {
>     $auth = "GMX ($4 / $3)";
>   }
>   # HTTP version
>   elsif (/from ${IP_ADDRESS} by (www\d*\.gmx\.net|com) with (HTTP)/) {
>     $auth = "GMX ($2 / $1)";
>   }

This works very well for me so far and seems to be inline with other
workarounds in the parse_received_line function.

Any chance that this change is being accepted?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 6877] mails send via GMX are considered to be from a spam server

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6877

--- Comment #2 from Hendrik <he...@gmx.net> ---
Created attachment 5120
  --> https://issues.apache.org/SpamAssassin/attachment.cgi?id=5120&action=edit
GMX HTTP sample

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 6877] mails send via GMX are considered to be from a spam server

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6877

--- Comment #1 from Hendrik <he...@gmx.net> ---
Created attachment 5119
  --> https://issues.apache.org/SpamAssassin/attachment.cgi?id=5119&action=edit
GMX SMTP sample

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 6877] mails send via GMX are considered to be from a spam server

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6877

--- Comment #3 from Hendrik <he...@gmx.net> ---
Created attachment 5121
  --> https://issues.apache.org/SpamAssassin/attachment.cgi?id=5121&action=edit
proposed patch

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 6877] mails send via GMX are considered to be from a spam server

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6877

--- Comment #5 from Hendrik <he...@gmx.net> ---
Created attachment 5122
  --> https://issues.apache.org/SpamAssassin/attachment.cgi?id=5122&action=edit
patch for rcvd_parser.t

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 6877] mails send via GMX are considered to be from a spam server

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6877

Kevin A. McGrail <km...@pccc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kmcgrail@pccc.com

--- Comment #4 from Kevin A. McGrail <km...@pccc.com> ---
I hate the necessity for all of these hacks but I see this as necessary due to
the lack of standardization.  You need to add a test to the proper t file
(rcvd_parser.t I believe) for this before I will approve the patch.

If you don't know how, I will look but it will back-burner things.

Regards,
KAM

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 6877] mails send via GMX are considered to be from a spam server

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6877

Kevin A. McGrail <km...@pccc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Kevin A. McGrail <km...@pccc.com> ---
Hendrik, these are pretty simple changes AND you included samples so I can work
with them.

However, some important notes:

1 - Your patches made the work a lot harder.  You should look at using
something like the command diff -ruN to provide a unified diff.  It puts
changes in much better context as I had to A) figure out the files that were
being modified and B) figure out what line number I thought would be best.

2 - Don't synthesize headers. Copy them from your examples, put them in the
rcvd_parser.t and see what they get. From my tests, the HTTP version appears to
already be working and that portion of your first edit is unnecessary.

3 - The t/ tests help you make sure things like your regexs work as I believe
you had some weirdness with around net|com which would not have done what you
wanted.  Add the t/rcvd_parser.t lines FIRST (I usually put '' as the result
portion of the code) and then write the code to parse them.


In any case, I've done my best to implement the end goal I think you need and
if you can please test the changes in trunk, that would be appreciated.

svn commit -m 'changes to received parsing for gmx - bug 6877'
Sending        lib/Mail/SpamAssassin/Message/Metadata/Received.pm
Sending        t/rcvd_parser.t
Transmitting file data ..
Committed revision 1428716.

Regards,
KAM

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 6877] mails send via GMX are considered to be from a spam server

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6877

Hendrik <he...@gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hendrik.haddorp@gmx.net

--- Comment #6 from Hendrik <he...@gmx.net> ---
I would also prefer GMX to set proper headers but obviously they don't want to
and I found posts from multiple people around this issue. I couldn't find tests
for the other work arounds in parse_received_line.

I tried to patch rcvd_parser.t to cover the changed code. I modified one test
and added another. Running make test TEST_FILES="t/rcvd_parser.t" resulted in
no errors.

Let me know if there is something missing.

regards,
Hendrik

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 6877] mails send via GMX are considered to be from a spam server

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6877

--- Comment #8 from Hendrik <he...@gmx.net> ---
Hi,
this was my first attempt to contribute to such a project and my first real
contact with Perl. Could have easily provided a different diff if I knew it
would have helped ;-) Anyhow, I tried your version of Received.pm and it seems
to work just fine with my test messages. Looks like there was some change in
the HTTP authentication compared to 3.3.2 that fixed it. Not quite sure why but
GMX HTTP mails are now being shown as authenticated by HTTP while they had not
been so before. I'll keep your version and let you know if a problem shows up
but so far it looks fine.
thanks,
Hendrik

-- 
You are receiving this mail because:
You are the assignee for the bug.