smeserver-mini-qmail/root/etc/e-smith/db/accounts/migrate/10AdminEmail

25 lines
489 B
Plaintext

{
my $conf = esmith::ConfigDB->open;
return unless $conf;
my $admin_email = $conf->get_value_and_delete('AdminEmail');
return unless defined $admin_email;
my $admin = $DB->get('admin') ||
$DB->new_record('admin', {type => 'system'});
if ($admin_email)
{
$admin->merge_props(
EmailForward => 'forward',
ForwardAddress => $admin_email,
);
}
else
{
$admin->merge_props(
EmailForward => 'local',
ForwardAddress => '',
);
}
}