I finished a patch to sa-learn which adds the option
-u --username Username to run sa-learn under
With this option an email alias can be setup so that users can send spam or
ham, using a virtual user configuration.
Its against SpamAssassin version 3.0.0
Greetings,
Rodrigo A. Diaz Leven
--- sa-learn Mon Oct 11 00:00:00 2004
+++ /usr/bin/sa-learn Mon Oct 18 00:36:30 2004
@@ -103,7 +103,8 @@
'configpath|config-file|config-dir|c|C=s' => \$opt{'configpath'},
'prefspath|prefs-file|p=s' => \$opt{'prefspath'},
'siteconfigpath=s' => \$opt{'siteconfigpath'},
-
+ 'username|u=s' => \$opt{'username'},
+
'folders|f=s' => \$opt{'folders'},
'force-expire|expire' => \$opt{'force-expire'},
'local|L' => \$opt{'local'},
@@ -199,7 +200,15 @@
);
$spamtest->init(1);
-
+if( $opt{'username'} ne "" )
+{
+ $spamtest->signal_user_changed(
+ {
+ username => $opt{'username'},
+ user_dir => undef
+ }
+ );
+}
# kluge to support old check_bayes_db operation
if ( defined $bayes_override_path ) {
@@ -522,6 +531,7 @@
-C path, --configpath=path, --config-file=path Path to standard configuration dir
-p prefs, --prefspath=file, --prefs-file=file Set user preferences file
--siteconfigpath=path Path for site configs (def: /etc/spamassassin)
+ -u --username Username to run sa-learn under
-D, --debug-level Print debugging messages
-V, --version Print version
-h, --help Print usage message