Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Getting started page #1192

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7d5a753
config/optimization: Add MALLOC_MMAP_THRESHOLD_
sirainen Feb 27, 2025
df86310
config: Remove basic configuration page
sirainen Feb 27, 2025
60ac736
config/overview: Remove basic_config link
sirainen Feb 27, 2025
473c67b
config/quick: Simplify split configuration files section
sirainen Feb 27, 2025
1ec9d16
data/settings: mail_home - Replace quick_config link
sirainen Feb 27, 2025
6e6833f
data/settings: Remove service_process_min_avail seealso-linking to it…
sirainen Feb 27, 2025
9a973ff
global: Use links to service settings
sirainen Feb 27, 2025
31402c0
global: Refer to %{system:cpu_count} where useful
sirainen Feb 27, 2025
12a8c3a
config/ssl: Remove pointless links
sirainen Feb 27, 2025
148c837
config/ssl: Remove duplicated examples of multiple SSL certificates
sirainen Feb 27, 2025
4218d20
settings/syntax: Explain how to override group settings
sirainen Feb 28, 2025
a5bf663
lib/settings.js: Add GROUP setting type
sirainen Feb 28, 2025
8908b9f
settings/syntax: Show how to expand default group settings
sirainen Feb 28, 2025
ee11e8d
data/settings: Add @metric_defaults
sirainen Feb 28, 2025
907b643
debug: Move debug out of core, since this is specific to CE
slusarz Feb 28, 2025
450dc97
config: Move time synchronization topic to its own page
slusarz Mar 4, 2025
9c9a5a3
optimization: Add dovecot link to the page
slusarz Mar 4, 2025
488dbb2
Fix spelling issue
slusarz Mar 4, 2025
679a0b0
docs/core/admin/errors.md: Add link for time-moved-backwards-error
Mar 7, 2025
607967f
data/settings: Add @mailbox_defaults=english
sirainen Mar 11, 2025
46300d0
config/imap: Document special-use flags
sirainen Mar 11, 2025
cdaf908
config/imap: Merge imap-hibernation "how it works" section into the o…
sirainen Mar 11, 2025
2bb1be9
config/imap: Split the page into include files
sirainen Mar 11, 2025
3cb6055
settings/syntax: Describe the new config redesign briefly
sirainen Mar 13, 2025
208e700
config/auth: Use titlecase for link texts
sirainen Mar 13, 2025
5b617d9
auth/ldap: Move Active Directory to its own howto page
sirainen Mar 13, 2025
c42ddb1
auth/ldap: Various cleanups
sirainen Mar 13, 2025
f830c73
auth/ldap: Remove Variables and Domains
sirainen Mar 13, 2025
6ac0134
auth/ldap: Reorder sections
sirainen Mar 13, 2025
c3317d0
auth/ldap: Clarify ldap_connection_group should be used without auth-…
sirainen Mar 13, 2025
0fe5fd7
auth/ldap: Fix ldap_starttls setting link
sirainen Mar 13, 2025
1dd8c20
auth/ldap: Add Connection Authentication and merge SASL binds section…
sirainen Mar 13, 2025
8ceeb12
auth/ldap: Fix ssl-ldap SettingsComponent level
sirainen Mar 13, 2025
829672b
auth/ldap: Update DN template section
sirainen Mar 13, 2025
2598af4
auth/static: Mention that you can use mail_uid/gid/home as alternativ…
sirainen Mar 13, 2025
eef3121
auth/ldap: Update userdb ldap
sirainen Mar 13, 2025
3a6c38f
auth/ldap: Add commonly used ldap_* settings to most examples
sirainen Mar 14, 2025
8c14517
auth/ldap: Rewrite "Multiple Queries via userdbs" example
sirainen Mar 14, 2025
91a6b74
config/proxy/referrals: Mention this page is mainly for historical re…
sirainen Mar 14, 2025
6be07ad
config/proxy/overview: Remove proxy_always
sirainen Mar 14, 2025
1d5106d
config/proxy/overview: Various fixes, cleanups, removals of obsolete …
sirainen Mar 14, 2025
851dcd7
config/proxy/overview: Split to proxy-auth-methods.inc
sirainen Mar 14, 2025
02e8daa
proxy-auth-methods.inc: Refer to master passwords, not master users
sirainen Mar 14, 2025
fc06382
quota: Move Settings list to bottom of the page
sirainen Mar 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions data/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -7541,7 +7541,7 @@ This can be overridden via the \`gid\` [[link,userdb_fields,userdb field]].`
},

mail_home: {
seealso: [ 'mail_path', '[[link,quick_config]]' ],
seealso: [ 'mail_path', '[[link,home_directories_for_virtual_users]]' ],
values: setting_types.STRING,
text: `
There are various possible ways of specifying this parameter and
Expand Down Expand Up @@ -10056,7 +10056,6 @@ no longer in "setuid" mode. This setting can't be used with non-empty chroot.`
seealso: [
'service_client_limit',
'service_restart_request_count',
'service_process_min_avail',
],
text: `
Minimum number of processes that always should be available to accept more
Expand All @@ -10075,8 +10074,9 @@ is launched.
time to check mails.
* For [[setting,service_restart_request_count]] to a value \`!=1\` and
[[setting,service_client_limit]] to a value \`>1\` processes it could be set
to the number of CPU cores on the system to balance the load among them. This
is commonly used with \`*-login\` processes.
to the number of CPU cores (you can use \`%{system:cpu_count}\`) on the
system to balance the load among them. This is commonly used with \`*-login\`
processes.
* For [[setting,service_restart_request_count]] with a value of \`!=1\` and
[[setting,service_client_limit,1]] processes it is likely not useful to use
this, because generally there are already some idling processes waiting to
Expand Down Expand Up @@ -11361,4 +11361,23 @@ userdb ldap {
\`\`\``
},

/* Default groups. */

'@metric_defaults': {
values: setting_types.GROUP,
values_enum: [ 'proxy', 'backend' ],
seealso: [ 'metric' ],
text: `
Group that expands to recommended [[setting,metric]] settings in proxies or
backends.`
},

'@mailbox_defaults': {
values: setting_types.GROUP,
values_enum: [ 'english' ],
seealso: [ 'mailbox_special_use' ],
text: `
Group that expands to recommended English language mailbox names with
[[setting,mailbox_special_use]] flags added.`
},
}
1 change: 1 addition & 0 deletions data/updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const updates = {
auth_protocol_handshake_changed: '2.4.0',
auth_server_common_secured: '2.4.0',
auth_sql_workers_changed: '2.4.1',
config_design_changed: '2.4.0',
dcrypt_same_cipher_algo_added: '2.4.0',
dict_protocol_v4: '2.4.0',
doveadm_ex_expired_code: '2.4.0',
Expand Down
94 changes: 13 additions & 81 deletions docs/core/admin/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ layout: doc
title: Errors
dovecotlinks:
troubleshooting: Dovecot troubleshooting
error_time_moved_backwards:
hash: time-moved-backwards-error
text: Time Moved Backwards Error
---

# Dovecot Errors and Troubleshooting
Expand Down Expand Up @@ -127,79 +130,7 @@ There are usually three possibilities why it's moving backwards:

3. Dovecot is started before time is synchronized at server startup.

Moving time backwards might cause various problems (see below).

### Time Synchronization

There are two choices for synchronizing your clock:

1. Use [ntpd](https://www.ntp.org/). It periodically checks the
current time from NTP server and slows down or speeds up the clock if
necessary. Unlike ntpdate, it doesn't just move the time forwards or
backwards (unless the difference is large).

- If the time difference is too large for ntpd and it "steps", then
use "-x" as a command line option for ntpd or use "tinker step 0"
in `/etc/ntp.conf`.

- This shows up in logs as: `ntpd[17697]: time reset -2.075483 s`

2. If ntpd doesn't work well (e.g. a bad network connection), you can
use [clockspeed](https://cr.yp.to/clockspeed.html) or
[chrony](https://chrony.tuxfamily.org/) as well.

In some systems ntpd/ntpdate is run at boot, but only after Dovecot has
started. That can cause Dovecot to die immediately. If you have this
problem, fix your init scripts to run ntpd/ntpdate first, before
starting Dovecot. Also, seriously consider running ntp-wait before
starting Dovecot.

### Server Startup Time Synchronization

With systemd add `time-sync.target` to the `After` setting. This isn't
enough though, because it only waits for time-sync to start, not finish.
To do that, enable also `systemd-time-wait-sync.service`.

### What about Daylight Saving/Summer Time?

On Unix-like systems, time is stored internally as the number of seconds
since January 1, 1970, 00:00:00 UTC
(see [UNIX time](https://en.wikipedia.org/wiki/Unix_time)); concepts
such as time zones and daylight saving time are applied in user space by the C
library, and will normally not have an impact on Dovecot's behavior.

### Dovecot Shouldn't Just Die!

Dovecot's behavior when time moves backwards is:

- Existing imap and pop3 processes either sleep or die

- Master process stops creating new processes until either the original
time is reached, or after a maximum wait of 3 minutes.

- Other processes log a warning, but do nothing else.

- Timeouts are updated so that the timeout is executed approximately at
the original intended time.

Dovecot also notices when time unexpectedly jumps forwards. In that
situation it logs a warning and also updates timeouts.

The reason why imap/pop3 processes get killed and new ones can't be
created for a while is to avoid problems related to timestamps. Some
issues are:

- Uniqueness of Maildir filenames and dbox global unique identifiers
relies on a growing timestamp.

- Dotlock files' staleness is detected by looking at its mtime.

- Timestamps are stored internally all around in memory (as well as in
index files) and compared to current time. Those checks may or may
not be buggy if current time shrinks.

While killing mail processes doesn't fully solve any of those issues,
they're at least less likely to happen then.
See [[link,time_synchronization]].

## CentOS/RHEL8 Mail Location

Expand Down Expand Up @@ -329,22 +260,23 @@ forking less processes:
This alone might be enough.

- You can also switch (most of the) other commonly forked processes to
be reused. For example `service imap { restart_request_count = 100 }`
reuses the imap process for 100 different IMAP connections before it
dies. This is useful mainly for imap, pop3 and managesieve services.
It's better to avoid using `restart_request_count=unlimited` in case
there are memory leaks.
be reused. For example [[setting,service_restart_request_count,100]]
reuses the process for 100 different connections before it dies. This is
useful especially for imap, pop3 and managesieve services.
It's better to avoid using [[setting,service_restart_request_count,unlimited]]
in case there are memory leaks.

- You can pre-fork some idling processes to handle bursts with
`service { process_min_avail }`.
[[setting,service_process_min_avail]].

See [[link,service_configuration]] before changing any service
settings. Some services require specific values to work correctly.

### Listener Queue Size

Dovecot uses `service { client_limit } * service { process_limit }` as the
listener queue size. There is no upper limit in Dovecot.
Dovecot uses [[setting,service_client_limit]] *
[[setting,service_process_limit]] as the listener queue size. There is no upper
limit in Dovecot.

Most OSes use an even lower limit, typically `128`. In Linux you can
increase this through: `/proc/sys/net/core/somaxconn`.
Expand Down
2 changes: 1 addition & 1 deletion docs/core/config/auth/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: doc
title: Caching
dovecotlinks:
auth_caching: authentication caching
auth_caching: Authentication Caching
---

# Authentication Caching
Expand Down
Loading
Loading