spamd 0.1.0 SpamD
Services
spamd.xml
SpamD Settings /pkg_edit.php?xml=spamd.xml SpamD Whitelist /pkg_edit.php?xml=spamd_whitelist.xml http://www.pfsense.com/packages/config/spamd.tgz ['installedpackages']['spamd']['config'] Provider Name provider_name Provider Name provider_name Enter the name of the source input Provider Type provider_type Select the Provider Type select black Reject message reject_message Enter the message to display to emailing parties that are on this providers list input Provider Method provider_method Select the Provider Metho select http Provider URL or Filename provider_url Enter the URL to the provider. textarea function sync_package() { global $config; $fd = fopen("/usr/local/etc/spamd.conf","w"); /* all header */ fwrite($fd, "# this file was automatically generated by the pfSense"); fwrite($fd, "# package management system"); fwrite($fd, "all:whitelist:\\\n\t"); foreach($config['installedpackages']['spamd']['config'] as $spamd) { fwrite($fd, ":" . $spamd['provider_name']; } fwrite($fd, "whitelist:\\ \n"); fwrite($fd, ":white:\\ \n"); fwrite($fd, ":file=/var/mail/whitelist.txt\n\n"); /* loop through each item and write out its configuration */ foreach($config['installedpackages']['spamd']['config'] as $spamd) { fwrite($fd, $spamd['provider_name'] . ":\\ \n"); fwrite($fd, ":" . $spamd['provider_method'] . ":\\ \n"); fwrite($fd, ":msg=\"" . $spamd['reject_message'] . "\":\\ \n": fwrite($fd, ":" . $spamd['provider_method'] . ":\\ \n"); fwrite($fd, ":file=" . $spamd['provider_url'] . ":\n\m"); } fwrite($fd, ":\n\n"); fclose($fd); $fd = fopen("/var/mail/whitelist.txt","w"); foreach($config['installedpackages']['spamd-greylist']['config'] as $spamd) { fwrite($fd, $spamd['ip'] . "\n"); } } sync_package(); sync_package(); mwexc("touch /var/db/spammer-whitelist"); mwexec("/usr/libexec/spamd-setup &"); mwexec("/usr/libexec/spamlogd &");