From ee73b1ef02eaf2a62699755fa71c25e8cc70a747 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 26 Feb 2005 03:50:31 +0000 Subject: Say hello to spamd! --- packages/spamd.xml | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 packages/spamd.xml (limited to 'packages/spamd.xml') diff --git a/packages/spamd.xml b/packages/spamd.xml new file mode 100644 index 00000000..f029404f --- /dev/null +++ b/packages/spamd.xml @@ -0,0 +1,123 @@ + + + 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 &"); + + + +
-- cgit v1.2.3