smeserver-email/root/etc/e-smith/db/accounts/migrate/10AdminEmail
Jean-Philippe Pialasse 6dd24d9479 * Mon Dec 30 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-7.sme
- fix CGI::param called in list context [SME: 12789]
- update webmail settings for roundcube [SME: 12743]
- remove requires runit [SME: 12566]
- move action pseudonym-cleanup and migrate 10AdminEmail from smeserver-mini-qmail [SME: 12808]
2024-12-30 22:09:15 -05:00

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 => '',
);
}
}