spf-discuss
[Top] [All Lists]

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

2004-10-24 12:36:49
--"william(at)elan.net" <william(_at_)elan(_dot_)net> wrote:


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?


Here is an awkward and complicated way, but it should work.

             domain.  IN TXT  "v=spf1 redirect=%{ir}.spf.%{d}"
*.168.192.spf.domain.  IN TXT  "v=spf1 +ptr -all"
       *.spf.domain.  IN TXT  "v=spf1 -all"

If you can match easily with another mechanism, like "mx", you can put that before the redirect and save some dns queries.

Another way to approach this would be to give all your mailservers a PTR name of xxxx.mail.domain. instead of xxxx.domain, and then use ptr:mail.domain instead of just ptr.

--
Greg Connor <gconnor(_at_)nekodojo(_dot_)org>