You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
5
118
Account delegation
6
119
------------------
7
120
@@ -25,56 +138,49 @@ XOAUTH2 Authentication with Microsoft Azure AD
25
138
26
139
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.
27
140
28
-
Step 1: Open the Azure AD Dashboard
29
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141
+
**Step 1: Open the Azure AD Dashboard**
30
142
31
143
Visit the `Azure portal <https://portal.azure.com>`_ and navigate to the Azure AD dashboard.
32
144
33
145
.. figure:: images/azure_xoauth2/1.png
34
146
35
-
Step 2: Create a new app registration
36
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147
+
**Step 2: Create a new app registration**
37
148
38
149
.. figure:: images/azure_xoauth2/2.png
39
150
40
151
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.
41
152
42
153
.. figure:: images/azure_xoauth2/3.png
43
154
44
-
Step 3: Copy the client ID
45
-
~~~~~~~~~~~~~~~~~~~~~~~~~~
155
+
**Step 3: Copy the client ID**
46
156
47
157
This ID will be needed later for the Nextcloud settings.
48
158
49
159
.. figure:: images/azure_xoauth2/4.png
50
160
51
-
Step 4: Create a new client secret
52
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161
+
**Step 4: Create a new client secret**
53
162
54
163
.. figure:: images/azure_xoauth2/5.png
55
164
56
165
Chose a descriptive name for the secret and set the an appropriate expiration date. Click on add to create the secret.
57
166
58
167
.. figure:: images/azure_xoauth2/6.png
59
168
60
-
Step 5: Copy the client secret
61
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169
+
**Step 5: Copy the client secret**
62
170
63
171
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.
64
172
65
173
.. figure:: images/azure_xoauth2/7.png
66
174
67
-
Step 6: Configure Nextcloud
68
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
175
+
**Step 6: Configure Nextcloud**
69
176
70
177
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.
71
178
72
179
.. 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.
73
180
74
181
.. figure:: images/azure_xoauth2/8.png
75
182
76
-
Step 7: Connect Microsoft Outlook accounts
77
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183
+
**Step 7: Connect Microsoft Outlook accounts**
78
184
79
185
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.
0 commit comments