spamd-whitelist 0.1.0 SpamD: Whitelist SpamD Whitelist
Services
spamd.xml
SpamD External Sources /pkg.php?xml=spamd.xml SpamD Whitelist /pkg.php?xml=spamd_whitelist.xml SpamD Settings /pkg_edit.php?xml=spamd_settings.xml&id=0 SpamD Database /spamd_db.php SpamD Outlook /pkg_edit.php?xml=spamd_outlook.xml&id=0 ['installedpackages']['spamdwhitelist']['config'] Exempted IP ip Description description Exempted IP ip Enter the IP to exempt from blacklisting input Description description Enter the description for this item input function sync_package_spamd_whitelist() { global $config; conf_mount_rw(); config_lock(); /* write out ip to the whitelist db */ $fd = fopen("/var/db/whitelist.txt","w"); if($config['installedpackages']['spamdwhitelist']['config'] != "") { foreach($config['installedpackages']['spamdwhitelist']['config'] as $spamd) { fwrite($fd, $spamd['ip'] . "\n"); } } fclose($fd); /* signal a reload of all files */ mwexec("/usr/bin/killall -HUP spamlogd"); mwexec("/sbin/pfctl -t spamd-white -T add {$spamd['ip']}"); conf_mount_ro(); config_unlock(); } sync_package_spamd_whitelist(); sync_package_spamd_whitelist();