Le 26/07/2009 04:00, McDonald, Dan a écrit :
 >From: Robert [mailto:list...@abbacomm.net]
 >> There are no doubt lots of ways, but how about:
 >>
 >> egrep 'whitelist_from[^_]' local.cf | awk '{FS="@"; print $2"
 >> TXT";}' | xargs dig | grep "v=spf1"

 >what is this supposed to do?

select all of your whitelist_from entries, parse out the domain part,
dig the TXT record for each domain, then display only the ones that have
a v=spf1 notation.  That would give you a list of all of the domains in
your whitelist_from that could be migrated to whitelist_from_spf

... provided, as Matus pointed out, all your whitelist_from entries are nicely formatted one address per line, and provided you don't have any domain wildcards. If those two conditions aren't met then you'll have to do some extra mangling to extract the domains properly. It also only looks for TXT RRs, so if any of the target domains are using only SPF RRs it won't find them.

John.

--
-- Over 4000 webcams from ski resorts around the world - www.snoweye.com
-- Translate your technical documents and web pages    - www.tradoc.fr

Reply via email to