diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-02-05 10:02:24 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-02-05 20:10:15 -0200 |
commit | 07cf2c4b20230ddedee1bf9dddc1e7cd407385f5 (patch) | |
tree | 44d40561519e0018ad586bb1449e107c9ae431f3 /config/archive/clamsmtp.inc | |
parent | e526e4aa28867b7743b0e76993f5f6bebd15bc1b (diff) | |
download | pfsense-packages-07cf2c4b20230ddedee1bf9dddc1e7cd407385f5.tar.gz pfsense-packages-07cf2c4b20230ddedee1bf9dddc1e7cd407385f5.tar.bz2 pfsense-packages-07cf2c4b20230ddedee1bf9dddc1e7cd407385f5.zip |
Packages repo cleanup:
- Drop support for pfSense < 2
- Remove archive/, old files can be reached using git
- Remove old and unused packages
- Move stale files from config subdir to a package subdir
Diffstat (limited to 'config/archive/clamsmtp.inc')
-rw-r--r-- | config/archive/clamsmtp.inc | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/config/archive/clamsmtp.inc b/config/archive/clamsmtp.inc deleted file mode 100644 index cc16cf82..00000000 --- a/config/archive/clamsmtp.inc +++ /dev/null @@ -1,57 +0,0 @@ -<?php -require_once('globals.inc'); -require_once('config.inc'); -require_once('service-utils.inc'); - -if(!function_exists("filter_configure")) - require_once("filter.inc"); - -function clamsmtp_install_command() { - global $g; - - $clamav_rundir = "{$g['varrun_path']}/clamav"; - $pidfile = "$clamav_rundir/clamsmtpd.pid"; - $rcfile = array(); - $rcfile['file'] = 'clamsmtp.sh'; - $rcfile['start'] = "mkdir -p $clamav_rundir\n\tchown proxy:proxy $clamav_rundir\n\tclamsmtpd"; - $rcfile['stop'] = "kill `cat $pidfile`"; - write_rcfile($rcfile); - - clamsmtp_resync(); -} - -function clamsmtp_validate_input($post, &$input_errors) { - if (!is_ipaddr(trim($post['smtp_server']))) - $input_errors[] = 'The field \'SMTP server\' must contain a valid IP address.'; - $port = trim($post['smtp_port']); - if (!is_numeric($port) || ($port < 0) || ($port > 65535)) - $input_errors[] = 'The field \'SMTP server\' must contain a port ranging from 0 to 65535'; -} - -function clamsmtp_resync() { - global $g, $config; - - $avconf = $config['installedpackages']['clamav']['config'][0]; - if ($avconf['scan_smtp'] == 'on') - $outaddress = "{$avconf['smtp_server']}:{$avconf['smtp_port']}"; - else - $outaddress = '127.0.0.1:25'; - $clamav_rundir = "{$g['varrun_path']}/clamav"; - $clamsocket = "$clamav_rundir/clamd.socket"; - $pidfile = "$clamav_rundir/clamsmtpd.pid"; - $conf = <<<EOD -Listen: 127.0.0.1:10025 -OutAddress: $outaddress -ClamAddress: $clamsocket -User: proxy -PidFile: $pidfile - -EOD; - - file_put_contents('/usr/local/etc/clamsmtpd.conf', $conf); - - restart_service('clamsmtp'); - filter_configure(); -} - -?>
\ No newline at end of file |