smeserver-roundcube/root/etc/e-smith/db/configuration/migrate/80ROUNDCUBE_IMAPS_ACCESS
2024-09-02 00:01:36 -04:00

18 lines
519 B
Plaintext

{
# If you set the server dns resolver to external
# (for the main domain) you can not login in roundcube
# with the imap authentication
use esmith::DomainsDB;
my $d = esmith::DomainsDB->open_ro;
my $domainname = $DB->get_value('DomainName') or
die ("Unable to retrieve the domain name: $!");
my $dns = $d->get_prop("$domainname",'Nameservers') or
die ("Unable to retrieve the Name Servers: $!");
if ($dns ne 'localhost') {
$DB->set_prop('imaps','access','public');
}
}