Read the line ‘v=spf1 include:_spf.google.com ~all’
At the end, the Centreon measurement will compare this result with the expected value
Thanks,
Page 1 / 1
Hello
you don’t want to check from mxtoolbox as it’s a third party website and I’m not sure if they provide a way to get the result
what you want is a simple dns query to a dns server and parse the output, here is a perl script that will do that for you, I had something like that lying around
#!/bin/perl use Getopt::Long; my $domain=""; my $testspf=""; my $printhelp; $result = GetOptions ("domain=s" => \$domain, "testspf=s" => \$testspf, "help" => \$printhelp) or usage();
my $dig = `which dig 2>/dev/null`; if ($? != 0){ print "UNKNOWN - dig command not found, please install bind-utils "; exit 3; }
call it how you want, check-spf for example, set the template to the generic active service and select the command you created, you will see the 2 MACRO appear automatically once the command is selected
you can stop here, and use this service template to create new services on an existing host if you already have host that could be linked to that service, but what host would you use to represent a domain …
my solution is to use dummy host, this will allow you to have a host with no “check” on the host, and not needing an ip, or a server to attach the service
you can either create a single dummy host, with all the spf check you want, or have 1 host by service.
to do that, create a host template, again name it how you want, and use the dummy host parent template
and then add the service template in the relation tab
now you can simply create new host, give a name, add the check-spf host template and say yes to deploy the service associated, and for each service
all that is tweakable and you can adapt to your need
hope that helps
Many thanks Christophe, for your detailed and clear answer ! It’s exactly what I was looking for
Please find here the result, exactly as you described it.