You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2004/09/30 05:23:10 UTC

[Bug 3849] New: Help app for upgrading large numbers of users from SA 2.x to 3.x

http://bugzilla.spamassassin.org/show_bug.cgi?id=3849

           Summary: Help app for upgrading large numbers of users from SA
                    2.x to 3.x
           Product: Spamassassin
           Version: 3.0.0
          Platform: Other
               URL: http://www.scms.waikato.ac.nz/~jnewman/opensource/sa3-
                    upgrade.pl
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Tools
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: jnewman@scms.waikato.ac.nz


Hi there,

In case you're interested in hanging this off the main site somewhere (might be
useful???)

We permit our users (via a web interface) to modify their individual user
preferences (stored in a flat file) and train the classifier on their own ham
and spam corpus's.  As such, I whacked together this script to:
1)  Remove the deprecated user options (subject_tag and rewrite_subject) on a
per user basis, replacing the options with the new notation as it goes.
2)  Run an 'sa-learn --sync' to convert the bayes databases into their new format.

In short, I do a 'getpwent' (for all UID's over 500) and look in their home dirs
for pref files to convert and dbs to update.  Because it does an 'sa-learn' (and
to be safe), it drops privileges to the user it's processing as it goes.  If
it's already converted the user prefs, it does nothing.  All modified files
(including the databases) are backed up and can be restored via the '-r' command
line switch.  '-p' forces the script into pretend mode.

The script *should* work on most Unicies and may prevent other Sys Admins form
having to write something similar.

Cheers,
John.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.