internal_connect configuration.
IP addresses with no PTR, and PTR names that look like
the kind assigned to dynamic IPs (as determined by a heuristic
algorithm) are flagged as DYNAMIC. IPs that match the
trusted_relay configuration are flagged as TRUSTED.
Examples from the log file (not the SMTP error message returned):
2005Jul29 13:56:53 [71207] connect from p50863492.dip0.t-ipconnect.de at ('80.134.52.146', 1858) EXTERNAL DYN
2005Jul29 18:10:15 [74511] connect from foopub at ('1.2.3.4', 46513) EXTERNAL TRUSTED
2005Jul29 14:41:00 [71805] connect from foobar at ('192.168.0.1', 41205) INTERNAL
2005Jul29 14:41:15 [71806] connect from cncln.online.ln.cn at ('218.25.240.137', 35992) EXTERNAL
Certain obviously evil PTR names are blocked at this point: "localhost" (when IP is not 127.*) and ".".
2005Jul29 14:49:50 [71918] connect from localhost at ('221.132.0.6', 50507) EXTERNAL
2005Jul29 14:49:50 [71918] REJECT: PTR is localhost
hello_blacklist configuration
are immediately rejected. The hello_blacklist typically contains
the current MTAs own HELO name or email domains.
Clients that attempt to skip HELO are immediately rejected.
2005Jul29 18:10:15 [74512] hello from example.com 2005Jul29 18:10:15 [74512] REJECT: spam from self: example.com 2005Jul29 18:17:09 [74581] hello from 80.191.244.69 2005Jul29 18:17:09 [74581] REJECT: numeric hello name: 80.191.244.69
The MAIL FROM address is saved for possible use by the smart-alias
feature. First, the internal_domains is used for
a simple screening if defined. If the MAIL FROM for an INTERNAL connection
is NOT in internal_domains, then it is rejected (the
PC is most likely infected and attempting to send out spam).
If the MAIL FROM for an EXTERNAL connection IS in
internal_domains, then the message is immediately rejected.
This is quick and effective for most small company MTAs. For more
complex mail networks, it is too simplistic, and should not be defined.
SPF will handle the complex cases.
[spf]delegate configuration.
Further checks depend on the result.
| 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.
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
|
| PERMERROR |
Permanent errors were called "unknown", and are still show that way
in the log. The message is rejected. Previously, we enabled "lax" parsing
of the SPF record, but rejecting is better because it informs the
sender about their problem. The next milter version will
look for a local substitute SPF record (as for a missing SPF record)
before rejecting. This will inform the sender of their problem, but
also let the receiver install a temporary workaround.
2005Jul24 18:05:37 [2312] mail fromThe SPF record for msg.euxiphipops.com looked like this at the time of the above error: msg.euxiphipops.com TXT "v=spf1 mx ptr a include" |
| TEMPERROR |
Temporary errors result in a 451 "Try again later" response. The sender
should retry the message at a later time.
2005Jul24 07:33:13 [29846] mail from |