diff --git a/doc/changes.ht b/doc/changes.ht index a0eaa4a..719d09b 100644 --- a/doc/changes.ht +++ b/doc/changes.ht @@ -2,6 +2,47 @@ Title: Recent Changes
%ifarch hack to build milter and milter-spf
+packages as noarch, while pymilter is built as native.
+
+I removed the spf dependency from dsn.py, so pymilter can be used without
+installing pyspf, and added a Milter.dns module to let python milters do
+general DNS lookups without loading pyspf.
+
+/etc/init.d, logrotate and other scripts.
+bms.py milter
application. The milter and Milter modules do not implement any policies
-by themselves. Eventually, I'll get the bms.py milter moved to its
-own package.
+by themselves.
[spf]delegate configuration.
-Further checks depend on the result.
+The MAIL FROM, connect IP, and HELO name are checked against
+any SPF records published via DNS for the alleged sender (MAIL FROM)
+to determine the official SPF policy result.
+The offical SPF result is then logged in the Received-SPF header field,
+but certain results are subjected to further processing to create
+an effective result for policy purposes.
-| NONE |
-If there is no SPF record (official or delegated), then we
-initiate a "three strikes and your out" regime, which looks for
-some form of validated identification.
-
[spf]delegate configuration.
+It is often useful to add local SPF records for correspondents that are
+too clueless to add their own. If there is no local substitute, we use a "best
+guess" SPF record of "v=spf1 a/24 mx/24 ptr" for MAIL FROM or "v=spf1 a/24
+mx/24" for HELO. In addition, a HELO that is a subdomain of MAIL FROM and
+resolves to the connect IP results in an effective result of 'pass'.
+
+If there is no local SPF record, and the effective result is still not
+'pass', we check for either a valid HELO name or a valid PTR record for
+the connect IP. A valid HELO or PTR cannot look like a dynamic name
+as determined by the heuristic in Milter.dynip.
+
+If HELO has an SPF record, and the result is anything but pass, we reject
+the connection:
2005Jul30 19:45:16 [93991] connect from [221.200.41.54] at ('221.200.41.54', 3581) EXTERNAL DYN
2005Jul30 19:45:18 [93991] hello from adelphia.net
2005Jul30 19:45:19 [93991] mail from
-
[SPF]reject_noptr
-option is true, we reject the message immediately with the explanation
-that we need some form of valid identification before we accept an email.
-If [SPF]reject_noptr is false, we flag the message as
-needing Call Back Validation.
-The Call Back Valildation sends a DSN to the purported sender informing
-them of the lack of identification. If the message is legitimate, the
-sender needs to know that their email setup is broken and should be corrected.
-If the message is forged, the sender is informed of the forgery,
-and their need to publish an SPF record or at least use a valid HELO name.
-If the purported sender does not accept the DSN,
-then the message is rejected. The CBV status is cached to avoid
-annoying the purported sender with too many DSNs. Currently, the DSN
-is repeated to the same sender once per month.
--In this example, although 3com.com has no SPF record, we assume that -any legitimate mail from them will at least have a valid HELO or PTR. -
-2005Jul30 23:52:03 [96777] connect from [222.252.233.200] at ('222.252.233.200', 29934) EXTERNAL DYN
-2005Jul30 23:52:03 [96777] hello from 3mail.3com.com
-2005Jul30 23:52:04 [96777] mail from
- | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PASS |
-A pass result normally lets the email continue on, but the domain is
-tracked for reputation (and may be blocked), and may skip content scanning if
-it matches a whitelist.
--2005Jul24 17:44:26 [2104] mail from- | ||||||||||||
| NEUTRAL |
-A neutral result normally lets the email continue on, but the domain is not
-tracked for reputation or matched against any whitelists.
-Highly forged domains listed in [SPF]reject_neutral are
-rejected.
-
-2005Jul24 17:41:37 [2070] connect from cp500627-a.dbsch1.nb.home.nl at ('84.27.225.3', 3465) EXTERNAL
-2005Jul24 17:41:37 [2070] hello from cp500627-a.dbsch1.nb.home.nl
-2005Jul24 17:41:38 [2070] mail from
- | ||||||||||||
| SOFTFAIL |
-A softfail result normally lets the email continue on, but the domain is not
-tracked for reputation or matched against any whitelists. Furthermore,
-the message is flagged as needing Call Back Validation,
-and the highly forged domains listed in [SPF]reject_neutral are
-rejected as well.
--At present, we also require a valid HELO or PTR to avoid rejecting -a softfail. But this should probably change to only require a -successful CBV. - -The Call Back Valildation sends a DSN to the purported sender informing -them of the softfail. If the message is legitimate, the sender needs -to know about the softfail so that their email setup can be corrected. -If the message is forged, the sender is informed of the forgery, confirming -that SPF is protecting their reputation and encouraging a rapid transition -to a strict policy. If the purported sender does not accept the DSN, -then the message is rejected. The CBV status is cached to avoid -annoying the purported sender with too many DSNs. Currently, the DSN -is repeated to the same sender once per month. - -2005Jul24 15:41:33 [801] mail from- | ||||||||||||
| FAIL |
-The message is rejected with a reference the SPF why page.
-
-2005Jul30 19:53:27 [94070] connect from [212.70.52.16] at ('212.70.52.16', 3192) EXTERNAL DYN
-2005Jul30 19:53:27 [94070] hello from winzip.com
-2005Jul30 19:53:27 [94070] mail from
+
SPF policy syntax+ +First, the full sender is checked: ++SPF-Fail:abeb@adelphia.net DSN ++This says to accept mail from that adelphia.net user despite the +SPF fail, but only after annoying them with a DSN about their ISP's broken +policy. + +If there is no match on the full sender, the domain is checked: + +SPF-Neutral:aol.com REJECT ++This says to reject mail from AOL with an SPF result of neutral. +This means AOL users can't use their AOL address with another mail service +to send us mail. This is good because the other mail service is +likely a badly configured greeting card site or a virus. + +Finally, a default policy for the result is checked. While there are program +defaults, you should have defaults in the access database for SPF results: + +SPF-Neutral: CBV +SPF-Softfail: DSN +SPF-PermError: DSN +SPF-TempError: REJECT +SPF-None: REJECT +SPF-Fail: REJECT +SPF-Pass: OK ++ + Reputation+ +If the sender has not been rejected by this point, and if a GOSSiP server is +configured, we consult GOSSiP for the reputation score of the sender and +SPF result. The score is a number from -100 to 100 with a confidence +percentage from 0 to 100. A really bad reputation (less than -50 with +confidence greater than 3) is rejected. Note that the reputation is tracked +independently for each SPF result and sender combination. So aol.com:neutral +might have a really bad reputation, while aol.com:pass would be ok. +Furthermore, when a sender finally publishes an SPF policy and starts +getting SPF pass, their reputation is effectively reset. |