Skip to content

Commit 96fd7a7

Browse files
committed
fix(groupware): Move admin and user documentation for mail app out of mail repo and update debug logging
Signed-off-by: David Dreschner <github-2017@dreschner.net>
1 parent 48666ff commit 96fd7a7

3 files changed

Lines changed: 367 additions & 14 deletions

File tree

admin_manual/groupware/mail.rst

Lines changed: 120 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,119 @@
22
Mail
33
====
44

5+
Configuration
6+
-------------
7+
8+
Anti-abuse alerts
9+
^^^^^^^^^^^^^^^^^
10+
11+
The app can write alerts to the logs when users send messages to a high number of recipients or sends a high number of messages for a short period of time. These events might indicate that the account is abused for sending spam messages.
12+
13+
To enable anti-abuse alerts, you'll have to set a few configuration options :doc:`via occ <../occ_command>` .
14+
15+
::
16+
17+
# Turn alerts on
18+
occ config:app:set mail abuse_detection --value=on
19+
# Turn alerts off
20+
occ config:app:set mail abuse_detection --value=off
21+
22+
# Alert when 50 or more recipients are used for one single message
23+
occ config:app:set mail abuse_number_of_recipients_per_message_threshold --value=50
24+
25+
# Alerts can be configured for three intervals: 15m, 1h and 1d
26+
# Alert when more than 10 messages are sent in 15 minutes
27+
occ config:app:set mail abuse_number_of_messages_per_15m --value=10
28+
# Alert when more than 30 messages are sent in one hour
29+
occ config:app:set mail abuse_number_of_messages_per_1h --value=30
30+
# Alert when more than 100 messages are sent in one day
31+
occ config:app:set mail abuse_number_of_messages_per_1d --value=100
32+
33+
Attachment size limit
34+
^^^^^^^^^^^^^^^^^^^^^
35+
36+
Admins can prevent users from attaching large attachments to their emails. Users will be asked to use link shares instead.
37+
38+
::
39+
40+
'app.mail.attachment-size-limit' => 3*1024*1024,
41+
42+
The unit is bytes. The example about with limit to 3MB attachments. The default is 0 bytes which means no upload limit.
43+
44+
Background sync interval
45+
^^^^^^^^^^^^^^^^^^^^^^^^
46+
47+
Configure how often Mail keeps users' mailboxes updated in the background in seconds. Defaults to 3600, minimum 300.
48+
49+
::
50+
51+
'app.mail.background-sync-interval' => 7200,
52+
53+
Disable TLS verification for IMAP/SMTP
54+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55+
56+
Turn off TLS verification for IMAP/SMTP. This happens globally for all accounts and is only needed in edge cases like with email servers that have a self-signed certificate.
57+
58+
::
59+
60+
'app.mail.verify-tls-peer' => false
61+
62+
Google OAuth
63+
^^^^^^^^^^^^
64+
65+
This app can allow users to connect their Google accounts with OAuth. This makes it possible to use accounts without 2FA or app password.
66+
67+
1. `Create authorization credentials <https://developers.google.com/identity/protocols/oauth2/web-server#prerequisites>`_. You will receive a client ID and a client secret.
68+
2. Open the Nextcloud settings page. Navigate to *Groupware* and scroll down to *Gmail integration*. Enter and save the client ID and client secret.
69+
70+
Local IMAP and SMTP servers
71+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
72+
73+
By default, Nextcloud does not allow local hostnames and IP addresses as remote servers. This includes IMAP, SMTP and Sieve servers
74+
like ``localhost``, ``mx.local`` and ``10.0.0.3``. This check can be disabled with via ``config/config.php``.
75+
76+
::
77+
78+
'allow_local_remote_servers' => true,
79+
80+
Timeouts
81+
^^^^^^^^
82+
83+
Depending on your mail host, it may be necessary to increase your IMAP and/or SMTP timeout threshold.
84+
Currently IMAP defaults to 5 seconds and SMTP defaults to 20 seconds. They can be changed as follows:
85+
86+
IMAP timeout
87+
~~~~~~~~~~~~
88+
89+
::
90+
91+
'app.mail.imap.timeout' => 5
92+
93+
SMTP timeout
94+
~~~~~~~~~~~~
95+
96+
::
97+
98+
'app.mail.smtp.timeout' => 20
99+
100+
Sieve timeout
101+
~~~~~~~~~~~~~
102+
103+
::
104+
105+
'app.mail.sieve.timeout' => 5
106+
107+
Use php-mail for sending mail
108+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109+
110+
.. warning:: Support for using php-mail was removed in version 4.4 of the mail app!
111+
112+
You can use the php-mail function to send mails. This is needed for some web hosters (1&1 (1und1)).
113+
114+
::
115+
116+
'app.mail.transport' => 'php-mail'
117+
5118
Account delegation
6119
------------------
7120

@@ -25,56 +138,49 @@ XOAUTH2 Authentication with Microsoft Azure AD
25138

26139
The Mail app supports XOAUTH2 authentication with hosted Microsoft Outlook accounts. An app has to be registered in the Microsoft Azure web interface and its credentials have to be supplied to the Nextcloud instance. You can find relevant settings in the Groupware section of the admin settings.
27140

28-
Step 1: Open the Azure AD Dashboard
29-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141+
**Step 1: Open the Azure AD Dashboard**
30142

31143
Visit the `Azure portal <https://portal.azure.com>`_ and navigate to the Azure AD dashboard.
32144

33145
.. figure:: images/azure_xoauth2/1.png
34146

35-
Step 2: Create a new app registration
36-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147+
**Step 2: Create a new app registration**
37148

38149
.. figure:: images/azure_xoauth2/2.png
39150

40151
Chose a name, allow organizational and personal Microsoft accounts. Configure a web app and copy the redirect URI from the groupware settings of your Nextcloud instance. Have a look at step 8 on where to find the redirect URI. Finally, click on register to proceed.
41152

42153
.. figure:: images/azure_xoauth2/3.png
43154

44-
Step 3: Copy the client ID
45-
~~~~~~~~~~~~~~~~~~~~~~~~~~
155+
**Step 3: Copy the client ID**
46156

47157
This ID will be needed later for the Nextcloud settings.
48158

49159
.. figure:: images/azure_xoauth2/4.png
50160

51-
Step 4: Create a new client secret
52-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161+
**Step 4: Create a new client secret**
53162

54163
.. figure:: images/azure_xoauth2/5.png
55164

56165
Chose a descriptive name for the secret and set the an appropriate expiration date. Click on add to create the secret.
57166

58167
.. figure:: images/azure_xoauth2/6.png
59168

60-
Step 5: Copy the client secret
61-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169+
**Step 5: Copy the client secret**
62170

63171
Copy the client secret manually or by clicking on the copy button. You can find it in the value column. The secret will also be needed later for the Nextcloud settings.
64172

65173
.. figure:: images/azure_xoauth2/7.png
66174

67-
Step 6: Configure Nextcloud
68-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
175+
**Step 6: Configure Nextcloud**
69176

70177
Open the groupware settings in the Nextcloud admin settings and fill in the client ID and client secret. Leave the tenant ID as is (common). You can also find the redirect URI here. Click on save to proceed.
71178

72179
.. warning:: Using a custom tenant ID is not covered by this guide. Only configure it if you are an expert and changed the supported account types in step 2.
73180

74181
.. figure:: images/azure_xoauth2/8.png
75182

76-
Step 7: Connect Microsoft Outlook accounts
77-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183+
**Step 7: Connect Microsoft Outlook accounts**
78184

79185
Congratulations! You are now able to use hosted Microsoft Outlook accounts in the Mail app. Use your Microsoft account email and any password when adding your account. The password will be discarded and you will be prompted with a Microsoft consent popup to log in to your account.
80186

0 commit comments

Comments
 (0)