spf-discuss
[Top] [All Lists]

Re: Can I require to satisify multiple conditions based on spf record

2004-10-24 12:16:12
In 
<Pine(_dot_)LNX(_dot_)4(_dot_)44(_dot_)0410241221110(_dot_)9378-100000(_at_)sokol(_dot_)elan(_dot_)net>
 "william(at)elan.net" <william(_at_)elan(_dot_)net> writes:

If I have spf record "v=spf1 ip4:192.168.0.0/16 ptr -all" that would mean 
its either 192.168.0.0/16 OR mail server with the domaini in reverse.
But lets I want SPF record that says mail that comes from example.com 
domain MUST come from ip range 192.168.0.0/16 AND IT MUST come from mail 
server that has PTR that domain. Can I enter this within SPF record? How?


Several comments:

First, I don't recommend using the ptr: mechanism.  It is expensive.

Second, if you have control over your rDNS, which you must if you are
going to rely on the ptr: mechanism, you can just set up a naming
scheme like ptr:192_168.%{d}.

Third, if you are pondering more complicated logic operators, I say
"STOP!  If you want java in a sandbox, you know where to find it."
Let's keep SPF simple.

Fourth:
        example.com       TXT  "v=spf1 -include:_spf.%{d} +all"
        _spf.example.com  TXT  "v=spf1 -ip4:192.168.0.0/16 -ptr +all"

This depends on email claiming to be from _spf.example.com being
rejected because it is an invalid host name.



-wayne