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 2023/05/11 05:40:55 UTC
svn commit: r1909738 - in /spamassassin/trunk: lib/spamassassin-run.pod spamassassin.raw
Author: hege
Date: Thu May 11 05:40:55 2023
New Revision: 1909738
URL: http://svn.apache.org/viewvc?rev=1909738&view=rev
Log:
Add -u / --username option to spamassassin (Bug 8126)
Modified:
spamassassin/trunk/lib/spamassassin-run.pod
spamassassin/trunk/spamassassin.raw
Modified: spamassassin/trunk/lib/spamassassin-run.pod
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/spamassassin-run.pod?rev=1909738&r1=1909737&r2=1909738&view=diff
==============================================================================
--- spamassassin/trunk/lib/spamassassin-run.pod (original)
+++ spamassassin/trunk/lib/spamassassin-run.pod Thu May 11 05:40:55 2023
@@ -59,6 +59,8 @@ Options:
--add-addr-to-welcomelist=addr Add addr to persistent address welcomelist
--add-addr-to-blocklist=addr Add addr to persistent address blocklist
--remove-addr-from-welcomelist=addr Remove addr from persistent address list
+ -u username, --username=username Override username taken from the runtime
+ environment, used with SQL
-4 --ipv4only, --ipv4-only, --ipv4 Use IPv4, disable use of IPv6 for DNS etc.
-6 Use IPv6, disable use of IPv4 where possible
--progress Print progress bar
@@ -219,6 +221,17 @@ Remove the named email address from a pe
you must be running C<spamassassin> or C<spamd> with a persistent address
list plugin enabled for this to work.
+=item B<-u> I<username>, B<--username>=I<username>
+
+If specified this username will override the username taken from the runtime
+environment. You can use this option to specify users in a virtual user
+configuration when using SQL as the Bayes backend.
+
+NOTE: This option will not change to the given I<username>, it will only attempt
+to act on behalf of that user. Because of this you will need to have proper
+permissions to be able to change files owned by I<username>. In the case of SQL
+this generally is not a problem.
+
=item B< --ipv4only>, B<--ipv4-only>, B<--ipv4>
Do not use IPv6 for DNS tests. Normally, SpamAssassin will try to detect if
Modified: spamassassin/trunk/spamassassin.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamassassin.raw?rev=1909738&r1=1909737&r2=1909738&view=diff
==============================================================================
--- spamassassin/trunk/spamassassin.raw (original)
+++ spamassassin/trunk/spamassassin.raw Thu May 11 05:40:55 2023
@@ -182,6 +182,7 @@ GetOptions(
'add-to-welcomelist|W' => \$opt{'add-to-welcomelist'},
'add-to-blacklist' => \$opt{'add-to-blocklist'}, # removed in 4.1
'add-to-whitelist' => \$opt{'add-to-welcomelist'}, # removed in 4.1
+ 'username|u=s' => \$opt{'username'},
'configpath|config-file|config-dir|c|C=s' => \$opt{'configpath'},
'create-prefs!' => \$opt{'create-prefs'},
'pre=s' => \@{$opt{'pre'}},
@@ -265,6 +266,7 @@ my $spamtest = Mail::SpamAssassin->new(
rules_filename => $opt{'configpath'},
site_rules_filename => $opt{'siteconfigpath'},
userprefs_filename => $opt{'prefspath'},
+ username => $opt{'username'},
force_ipv4 => $opt{'force_ipv4'},
force_ipv6 => $opt{'force_ipv6'},
local_tests_only => $opt{'local'},