Hello,
we have integrated the mail app into the Nextcloud of our school (900 users).
We have specified the school mail account for all users via the admin mail settings. Works!
Now, however, the students are integrating external accounts (GMX, Hotmail, …) via IMAP, which the data protection officer at the school see as critical.
Could this option be activated / deactivated in the new version using the global setting as admin?
Further problems:
The groups from the app “Circels” are not available in the mail app Sending New Mail “TO”.
When I click on “Send Mail” in the “Contacts” app, the mail app does not open, but my external mail program.
The useres and groups are not available in the mail app Sending New Mail “TO” (see older thread).
Thanks @rakekniven. I’m actually subscribed to all new topics here so I get a notification anyway. I just try not to work on the weekends, that is why I’m sometimes slow with my responses
I really needed this functionality so i performed this hack in my config.php:
$user = !empty($_COOKIE['nc_username']) ? $_COOKIE['nc_username'] : '';
if (empty($user) && !empty($_SERVER['PHP_AUTH_USER']) ) {
$user = $_SERVER['PHP_AUTH_USER'];
}
else if (empty($user) && !empty($_SERVER['REQUEST_URI']) && preg_match('/\/(dav\/files|users?)\/([^\/]+)/',$_SERVER['REQUEST_URI'],$matches) ) {
$user = $matches[2];
}
else if (empty($user) && strpos($_SERVER['PHP_SELF'],'/cron.php') > 0 ) {
$user = '> CRON call <';
}
if ( !empty($user) && $user != '> CRON call <'
############### exclude your users here that do get access #
&& ($user != 'admin_user' && $user != 'another_admin_user')
############################################################
&& strpos($_SERVER['PHP_SELF'],'/mail/') > 0 # or put 'mail/setup' here if you want to disable the ability to create/add a mail account
) {
die('you have no access to this part of the site');
}
This works perfectly for my needs (I do think I’ll need to keep an eye out for my config.php when I run an update… )
note: the config.php is in your main web-folder named ‘config’
Ok. i thought only JSON is possible. When is this executed at all or how often is the file read? In this file I would have hidden probably last a program.
The config.php contains the variables for Nextcloud to function… like database passwords etc.
Therefore, this file is read absolutely always with every possible call to the Nextcloud software…
Oh yes. The php scripts needs the access to the database. Actually quite logical. Years ago I wrote applications myself that needed access to a database.