This guide installs SPF Toolbox on a Linux host. SPF Toolbox is a PHP web application for looking up DNS records including SPF, MX, A, and Whois information.
Step 1: Download SPF Toolbox
# Download latest release (v2.2.0)
cd /tmp
curl -LO https://github.com/charlesabarnes/SPFtoolbox/archive/refs/tags/v2.2.0.tar.gz
tar -xzf v2.2.0.tar.gz
Step 2: Move to Web Directory
# Move to web directory
sudo mv SPFtoolbox-2.2.0 /var/www/spf-toolbox
# Set ownership
sudo chown -R www-data:www-data /var/www/spf-toolbox
# Set permissions
sudo chmod -R 755 /var/www/spf-toolbox
Step 3: Configure Web Server
Apache:
sudo nano /etc/apache2/sites-available/spf-toolbox.conf
<VirtualHost *:80>
ServerName spf.example.com
DocumentRoot /var/www/spf-toolbox
<Directory /var/www/spf-toolbox>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/spf-toolbox_error.log
CustomLog ${APACHE_LOG_DIR}/spf-toolbox_access.log combined
</VirtualHost>
sudo a2ensite spf-toolbox.conf
sudo systemctl reload apache2
Nginx:
sudo nano /etc/nginx/sites-available/spf-toolbox
server {
listen 80;
server_name spf.example.com;
root /var/www/spf-toolbox;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
sudo ln -s /etc/nginx/sites-available/spf-toolbox /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
SPF Toolbox is a simple PHP application that can run in any PHP-enabled container.
# Run with official PHP-Apache image
docker run -d \
-p 8080:80 \
-v /var/www/spf-toolbox:/var/www/html \
php:8.2-apache
With Docker Compose:
Create docker-compose.yml:
version: '3.8'
services:
spf-toolbox:
image: php:8.2-apache
ports:
- "8080:80"
volumes:
- ./spf-toolbox:/var/www/html
# Start the container
docker compose up -d
Then clone SPF Toolbox into the spf-toolbox directory:
git clone https://github.com/charlesabarnes/SPFtoolbox.git spf-toolbox
SPF Toolbox is available as a YunoHost package:
# Install via YunoHost
yunohost app install https://github.com/YunoHost-Apps/spf_toolbox
Deploy to Heroku using the included app.json:
# Clone repository
git clone https://github.com/charlesabarnes/SPFtoolbox.git
cd SPFtoolbox
# Deploy to Heroku
heroku create
git push heroku main
Verify SPF Toolbox installation:
# Check web server access
curl -I http://localhost
# Test DNS lookup functionality
curl http://localhost/index.php?domain=example.com
http://your-server in your browserSee SPF Toolbox Configuration for detailed configuration guidance.
SPF, DKIM, and DMARC configuration is critical for email deliverability. We can help you implement proper email authentication policies and troubleshoot delivery issues. Reach out to office@linux-server-admin.com or visit our contact page.