diff options
Diffstat (limited to 'services/templates/roundcube.inc.php.template')
-rw-r--r-- | services/templates/roundcube.inc.php.template | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/services/templates/roundcube.inc.php.template b/services/templates/roundcube.inc.php.template new file mode 100644 index 0000000..70b0aff --- /dev/null +++ b/services/templates/roundcube.inc.php.template @@ -0,0 +1,56 @@ +<?php + +// tell PHP that it should work as under secure connection +// even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set) +// e.g. when you're running Roundcube behind a https proxy +// this option is mutually exclusive to 'force_https' and only either one of them should be set to true. +$config['use_https'] = true; + +// The IMAP host (and optionally port number) chosen to perform the log-in. +// Leave blank to show a textbox at login, give a list of hosts +// to display a pulldown menu or set one host as string. +// Enter hostname with prefix ssl:// to use Implicit TLS, or tls:// for STARTTLS. +// If port number is omitted it will be set to 993 (for ssl://) or 143 otherwise. +// Supported replacement variables: +// %n - hostname ($_SERVER['SERVER_NAME']) +// %t - hostname without the first part +// %d - domain (http hostname, $_SERVER['HTTP_HOST'] without the first part) +// %s - domain name after the '@' from e-mail address provided at login screen +// For example %n = mail.domain.tld, %t = domain.tld +// WARNING: After hostname change update of mail_host column in users table is +// required to match old user data records with the new host. +$config['imap_host'] = 'ssl://outlook.office365.com:993'; + +// SMTP server host (and optional port number) for sending mails. +// Enter hostname with prefix ssl:// to use Implicit TLS, or tls:// for STARTTLS. +// If port number is omitted it will be set to 465 (for ssl://) or 587 otherwise. +// Supported replacement variables: +// %h - user's IMAP hostname +// %n - hostname ($_SERVER['SERVER_NAME']) +// %t - hostname without the first part +// %d - domain (http hostname, $_SERVER['HTTP_HOST'] without the first part) +// %z - IMAP domain (IMAP hostname without the first part) +// For example %n = mail.domain.tld, %t = domain.tld +// To specify different SMTP servers for different IMAP hosts provide an array +// of IMAP host (no prefix or port) and SMTP server e.g. ['imap.example.com' => 'smtp.example.net'] +$config['smtp_host'] = 'tls://smtp-mail.outlook.com:587'; + +// Register your OAuth client at https://portal.azure.com +// - use https://<your-roundcube-url>/index.php/login/oauth as redirect URL +// - grant permissions to Microsoft Graph API "IMAP.AccessAsUser.All", "SMTP.Send", "User.Read" and "offline_access" + +$config['oauth_provider'] = 'outlook'; +$config['oauth_provider_name'] = 'Outlook.com'; +$config['oauth_client_id'] = "@@CRUPEST_ROUNDCUBE_OAUTH_CLIENT_ID@@"; +$config['oauth_client_secret'] = "@@CRUPEST_ROUNDCUBE_OAUTH_CLIENT_SECRET@@"; +$config['oauth_auth_uri'] = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"; +$config['oauth_token_uri'] = "https://login.microsoftonline.com/common/oauth2/v2.0/token"; +$config['oauth_identity_uri'] = "https://graph.microsoft.com/v1.0/me"; +$config['oauth_identity_fields'] = ['email', 'userPrincipalName']; +$config['oauth_scope'] = "https://outlook.office365.com/IMAP.AccessAsUser.All https://outlook.office365.com/SMTP.Send User.Read offline_access"; +$config['oauth_auth_parameters'] = ['nonce' => mt_rand()]; + +// Logon username filter. Regular expression for use with preg_match(). +// Use special value 'email' if you accept only full email addresses as user logins. +// Example: '/^[a-z0-9_@.-]+$/' +$config['login_username_filter'] = '@@CRUPEST_EMAIL@@'; |