You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2018/09/17 16:55:40 UTC
svn commit: r1841096 - in /spamassassin/trunk: spamassassin.raw
spamd/spamd.raw
Author: hege
Date: Mon Sep 17 16:55:40 2018
New Revision: 1841096
URL: http://svn.apache.org/viewvc?rev=1841096&view=rev
Log:
Add --pre option to spamassassin and spamd (like mass-check has)
Modified:
spamassassin/trunk/spamassassin.raw
spamassassin/trunk/spamd/spamd.raw
Modified: spamassassin/trunk/spamassassin.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamassassin.raw?rev=1841096&r1=1841095&r2=1841096&view=diff
==============================================================================
--- spamassassin/trunk/spamassassin.raw (original)
+++ spamassassin/trunk/spamassassin.raw Mon Sep 17 16:55:40 2018
@@ -158,7 +158,7 @@ if ($Mail::SpamAssassin::VERSION ne '@@V
# - create user preference files
# - have ArchiveIterator detect the input message format (file vs dir)
#
-my %opt = ( 'create-prefs' => 1, 'format' => 'detect', cf => [] );
+my %opt = ( 'create-prefs' => 1, 'format' => 'detect', pre => [], cf => [] );
my $doing_whitelist_operation = 0;
my $count = 0;
@@ -180,6 +180,7 @@ GetOptions(
'add-to-whitelist|W' => \$opt{'add-to-whitelist'},
'configpath|config-file|config-dir|c|C=s' => \$opt{'configpath'},
'create-prefs!' => \$opt{'create-prefs'},
+ 'pre=s' => \@{$opt{'pre'}},
'cf=s' => \@{$opt{'cf'}},
'debug|D:s' => \$opt{'debug'},
'error-code|exit-code|e:i' => \$opt{'error-code'},
@@ -261,6 +262,7 @@ my $spamtest = new Mail::SpamAssassin(
local_tests_only => $opt{'local'},
debug => $opt{'debug'},
dont_copy_prefs => ( $opt{'create-prefs'} ? 0 : 1 ),
+ pre_config_text => join("\n", @{$opt{'pre'}})."\n",
post_config_text => join("\n", @{$opt{'cf'}})."\n",
require_rules => 1,
PREFIX => $PREFIX,
Modified: spamassassin/trunk/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamd/spamd.raw?rev=1841096&r1=1841095&r2=1841096&view=diff
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw (original)
+++ spamassassin/trunk/spamd/spamd.raw Mon Sep 17 16:55:40 2018
@@ -332,6 +332,7 @@ my %opt = (
'min-children' => 1, # min kids to have running
'min-spare' => 1, # min kids that must be spare
'max-spare' => 2, # max kids that should be spare
+ 'pre' => [], # extra .pre lines
'cf' => [], # extra config lines
);
@@ -404,6 +405,7 @@ GetOptions(
'setuid-with-ldap' => \$opt{'setuid-with-ldap'},
'setuid-with-sql' => \$opt{'setuid-with-sql'},
'siteconfigpath=s' => \$opt{'siteconfigpath'},
+ 'pre=s' => \@{$opt{'pre'}},
'cf=s' => \@{$opt{'cf'}},
'socketgroup=s' => \$opt{'socketgroup'},
'socketmode=s' => \$opt{'socketmode'},
@@ -1153,6 +1155,7 @@ my $spamtest = Mail::SpamAssassin->new(
dont_copy_prefs => $dontcopy,
rules_filename => ( $opt{'configpath'} || 0 ),
site_rules_filename => ( $opt{'siteconfigpath'} || 0 ),
+ pre_config_text => join("\n", @{$opt{'pre'}})."\n",
post_config_text => join("\n", @{$opt{'cf'}})."\n",
force_ipv4 => ( $opt{'force_ipv4'} || 0 ),
local_tests_only => ( $opt{'local'} || 0 ),
@@ -3233,6 +3236,7 @@ Options:
-C path, --configpath=path Path for default config files
--siteconfigpath=path Path for site configs
--cf='config line' Additional line of configuration
+ --pre='config line' Additional line of ".pre" (prepended to configuration)
-d, --daemonize Daemonize
-h, --help Print usage message
-i [ip_or_name[:port]], --listen=[ip_or_name[:port]] Listen on IP addr and port
Re: svn commit: r1841096 - in /spamassassin/trunk: spamassassin.raw
spamd/spamd.raw
Posted by "Kevin A. McGrail" <km...@apache.org>.
Nice!
On 9/17/2018 12:55 PM, hege@apache.org wrote:
> Author: hege
> Date: Mon Sep 17 16:55:40 2018
> New Revision: 1841096
>
> URL: http://svn.apache.org/viewvc?rev=1841096&view=rev
> Log:
> Add --pre option to spamassassin and spamd (like mass-check has)
>
> Modified:
> spamassassin/trunk/spamassassin.raw
> spamassassin/trunk/spamd/spamd.raw
>
> Modified: spamassassin/trunk/spamassassin.raw
> URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamassassin.raw?rev=1841096&r1=1841095&r2=1841096&view=diff
> ==============================================================================
> --- spamassassin/trunk/spamassassin.raw (original)
> +++ spamassassin/trunk/spamassassin.raw Mon Sep 17 16:55:40 2018
> @@ -158,7 +158,7 @@ if ($Mail::SpamAssassin::VERSION ne '@@V
> # - create user preference files
> # - have ArchiveIterator detect the input message format (file vs dir)
> #
> -my %opt = ( 'create-prefs' => 1, 'format' => 'detect', cf => [] );
> +my %opt = ( 'create-prefs' => 1, 'format' => 'detect', pre => [], cf => [] );
>
> my $doing_whitelist_operation = 0;
> my $count = 0;
> @@ -180,6 +180,7 @@ GetOptions(
> 'add-to-whitelist|W' => \$opt{'add-to-whitelist'},
> 'configpath|config-file|config-dir|c|C=s' => \$opt{'configpath'},
> 'create-prefs!' => \$opt{'create-prefs'},
> + 'pre=s' => \@{$opt{'pre'}},
> 'cf=s' => \@{$opt{'cf'}},
> 'debug|D:s' => \$opt{'debug'},
> 'error-code|exit-code|e:i' => \$opt{'error-code'},
> @@ -261,6 +262,7 @@ my $spamtest = new Mail::SpamAssassin(
> local_tests_only => $opt{'local'},
> debug => $opt{'debug'},
> dont_copy_prefs => ( $opt{'create-prefs'} ? 0 : 1 ),
> + pre_config_text => join("\n", @{$opt{'pre'}})."\n",
> post_config_text => join("\n", @{$opt{'cf'}})."\n",
> require_rules => 1,
> PREFIX => $PREFIX,
>
> Modified: spamassassin/trunk/spamd/spamd.raw
> URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamd/spamd.raw?rev=1841096&r1=1841095&r2=1841096&view=diff
> ==============================================================================
> --- spamassassin/trunk/spamd/spamd.raw (original)
> +++ spamassassin/trunk/spamd/spamd.raw Mon Sep 17 16:55:40 2018
> @@ -332,6 +332,7 @@ my %opt = (
> 'min-children' => 1, # min kids to have running
> 'min-spare' => 1, # min kids that must be spare
> 'max-spare' => 2, # max kids that should be spare
> + 'pre' => [], # extra .pre lines
> 'cf' => [], # extra config lines
> );
>
> @@ -404,6 +405,7 @@ GetOptions(
> 'setuid-with-ldap' => \$opt{'setuid-with-ldap'},
> 'setuid-with-sql' => \$opt{'setuid-with-sql'},
> 'siteconfigpath=s' => \$opt{'siteconfigpath'},
> + 'pre=s' => \@{$opt{'pre'}},
> 'cf=s' => \@{$opt{'cf'}},
> 'socketgroup=s' => \$opt{'socketgroup'},
> 'socketmode=s' => \$opt{'socketmode'},
> @@ -1153,6 +1155,7 @@ my $spamtest = Mail::SpamAssassin->new(
> dont_copy_prefs => $dontcopy,
> rules_filename => ( $opt{'configpath'} || 0 ),
> site_rules_filename => ( $opt{'siteconfigpath'} || 0 ),
> + pre_config_text => join("\n", @{$opt{'pre'}})."\n",
> post_config_text => join("\n", @{$opt{'cf'}})."\n",
> force_ipv4 => ( $opt{'force_ipv4'} || 0 ),
> local_tests_only => ( $opt{'local'} || 0 ),
> @@ -3233,6 +3236,7 @@ Options:
> -C path, --configpath=path Path for default config files
> --siteconfigpath=path Path for site configs
> --cf='config line' Additional line of configuration
> + --pre='config line' Additional line of ".pre" (prepended to configuration)
> -d, --daemonize Daemonize
> -h, --help Print usage message
> -i [ip_or_name[:port]], --listen=[ip_or_name[:port]] Listen on IP addr and port
>
>
--
Kevin A. McGrail
VP Fundraising, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171