Bug 3235 - False Positives on FORGED_DEF_WHITELIST
Summary: False Positives on FORGED_DEF_WHITELIST
Status: RESOLVED WORKSFORME
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Rules (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other other
: P2 major
Target Milestone: 3.1.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-03 04:22 UTC by Marc Perkel
Modified: 2004-11-06 03:33 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Perkel 2004-04-03 04:22:06 UTC
Here's the headers. In this case the person receiving it forks another copy of
the message to a second address and the second address is spam scanned.

Return-path: <payment@paypal.com>
Envelope-to: donovan@marxmail.net
Delivery-date: Sun, 28 Mar 2004 12:35:11 -0800
Received: from root by darwin.ctyme.com with ctyme-spam-scanned (Exim 4.30)
     id 1B7gzs-00038I-Px
     for donovan@marxmail.net; Sun, 28 Mar 2004 12:35:11 -0800
Received: from ns1.daguru.net ([65.19.133.2] helo=nsx.daguru.net)
     by darwin.ctyme.com with smtp (Exim 4.30)
     id 1B7gzs-00038D-Iw
     for donovan@marxmail.net; Sun, 28 Mar 2004 12:35:08 -0800
Received: (qmail 14801 invoked by uid 110); 28 Mar 2004 20:34:51 -0000
Delivered-To: 127-donovan@webappguru.net
Received: (qmail 14797 invoked from network); 28 Mar 2004 20:34:51 -0000
Received: from smtp-outbound.nix.paypal.com (64.4.240.67)
     by ns1.daguru.net with SMTP; 28 Mar 2004 20:34:51 -0000
Received: from web13.sc5.paypal.com (web77.nix.paypal.com [10.192.2.77])
     by smtp-outbound.nix.paypal.com (Postfix) with SMTP id A281435D7E0
     for <donovan@webappguru.net>; Sun, 28 Mar 2004 12:34:37 -0800 (PST)
Received: (qmail 21022 invoked by uid 99); 28 Mar 2004 20:34:37 -0000
Date: Sun, 28 Mar 2004 12:34:37 -0800
Message-Id: <1080506077.21022@paypal.com>
From: service@paypal.com
To: donovan@webappguru.net
Subject: Receipt for your Payment
X-Sender-Hostname: ns1.daguru.net
X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 3.0.0-r9592 (2004-03-18) on
     darwin.ctyme.com
X-Spam-Level: *****
X-Spam-Status: Yes, score=5.1 required=5.0 tests=BAYES_00,
     FORGED_DEF_WHITELIST,NO_REAL_NAME autolearn=no version=3.0.0-r9592
X-Spam-Report:
     * 0.1 NO_REAL_NAME From: does not include a real name
     * 10 FORGED_DEF_WHITELIST Forged From: is in default white-list
     * -5.0 BAYES_00 BODY: Bayesian spam probability is 0 to 1%
     * [score: 0.0000]
X-Spam: [SPAM] - LOW
Comment 1 Sidney Markowitz 2004-04-03 12:16:28 UTC
ns1.daguru.net would have to be trusted for this to work. Otherwise anybody
could forge headers like this and there would be no way of knowing that the mail
really did come from paypal.com.

1. Is ns1.daguru.net trusted? If it is, then I have to fix whatever is
preventing the Received header with it from being used by the rule.

2. If it is not trusted, does it help to list it as trusted? If so, this is a
configuration problem, not a bug.

3. Is there some reason why it cannot be listed as trusted? What is the reason?
If so, we have to rethink this approach to deal with whatever is preventing this
site from being configured in a way that works.

Please let me know which is the case.
Comment 2 Sidney Markowitz 2004-04-03 19:01:18 UTC
(copying reply into bugzsilla comments to keep the thread together)

Marc Perkel replied:
[begin quote]
No - it's not trusted - however - the first received line is from a legit paypal
server - so - can all the received lines be tested to see if ANY of them are legit?

The issue is - some people are getting the email delivered to Server A who then
sends it on to my server for spam processing. So - it should work in that
situation. Or - for backup MX servers that spool and forward when the main
server is down.
[end quote]

No, all Received lines cannot be tested to see if any of them say that this mail
which has a paypal.com From address was sent through a paypal.com server.

The only header{s} that can be tested for that are ones that SpamAssassin can
know are not forged.

The headers in this example say that ns1.daguru.net created a Received header
claiming that it received the mail from a server in the paypal.com domain. If
SpamAssassin cannot trust ns1.daguru.net then it cannot believe that header.
What if instead of ns1.daguru.net it was mail.spammer.biz?

The solution for backup MX servers is simple: They should be in the trusted
list. But if you run a SpamAssassin server that filters mail for people who send
it by mail redirection, that's trickier. I agree with you that this bug should
be left reopened as I think about it and I would appreciate any suggestions.
Comment 3 Marc Perkel 2004-04-04 08:41:34 UTC
Subject: Re:  False Positives on FORGED_DEF_WHITELIST

How do you create "trusted" servers?

And - if the last received line is from a trusted server - can you then 
go back to the next level and test it?

Comment 4 Sidney Markowitz 2004-04-04 11:51:16 UTC
You would have in the configuration a line like

trusted_networks 65.19.133.2

See man Mail::SpamAssassin::Conf for details. You can have more than one
trusted_networks options and there is syntax to specify a subnet.

That would tell SpamAssassin that 65.19.133.2 does not forge headers, meaning
that in this case the mail really was received from a paypal.com server.

Assuming that each site that you filter mail for has their own preferences,
their preferences would include their own mail server ip addfresses in
trusted_networks entries.

It's not a matter of "going back to the next level". As soon as you hit a
non-trusted server as you go back through the Received headers, SpamAssassin has
no way of knowing that anything after that is not forged, even if lower Received
headers claim to have servers that are on your trusted list.

Again, see the man page for details: You generally don't have to explicitly
declare your own servers as trusted, as that can be figured out automatically.
But your example is a case where you would need the configuration option.

Please let me know if that works out -- If it does we can close the bug again.
Comment 5 Daniel Quinlan 2004-08-27 17:00:08 UTC
moving accuracy and some bugs to 3.1.0 milestone
Comment 6 Theo Van Dinter 2004-11-06 12:33:15 UTC
with no updates in 7 months, and the fact it looks like a configuration issue,
I'm closing as wfm.