initial commit of file from CVS for e-smith-qmail on Wed 12 Jul 09:06:46 BST 2023

This commit is contained in:
Brian Read
2023-07-12 09:06:46 +01:00
parent 522798702f
commit 2d08981b2a
67 changed files with 2072 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
#!/usr/bin/perl -w
use strict;
use esmith::AccountsDB;
use esmith::event;
my $accounts = esmith::AccountsDB->open() or
die "Unable to open accounts db: $!";
my ($self, $account) = @ARGV;
# Find all "pseudonyms" entries in the e-smith accounts database and
# if the pseudonyms has an unexisting Account associated we change
# it to user "admin".
foreach my $pseudo ( $accounts->pseudonyms ) {
unless ( $accounts->get($pseudo->prop('Account')) ) {
$pseudo->set_prop( 'Account', 'admin' );
print "orphaned pseudonym " . $pseudo->key. " has been associated to admin account"
}
}