Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docs/core/config/mailbox_formats/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ that you are comfortable with data loss. Example:
mail_fsync = optimized

protocol pop3 {
# Enable fsyncing for POP3
# Disable fsyncing for POP3
mail_fsync = never
}
```
Expand Down
4 changes: 4 additions & 0 deletions docs/core/man/include/doveadm-backup-sync.inc
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,13 @@ parameters.

**-t** *start date*
: Skip any mails whose received-timestamp is older than the specified time.
The format follows IMAP4rev1 standard format, e.g. "13-Apr-2007 14:23:05
+0200"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only partially true. Better would be to add a reference to the full syntax possibilities: For the timestamp format, see the DATE SPECIFICATION in [[man,doveadm-search-query,,7]].


**-e** *end date*
: Skip any mails whose received-timestamp is newer than the specified time.
The format follows IMAP4rev1 standard format, e.g. "13-Apr-2007 14:23:05
+0200"

**-O** *sync flag*
: Sync only mails that have the specified flag. If the flag name begins
Expand Down
2 changes: 1 addition & 1 deletion docs/core/man/include/doveadm-fs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ doveadm -o fs=compress,posix -o fs/compress/fs_driver=compress -o fs/posix/fs_dr
Using a named filter.
```sh
doveadm mail fs -u testuser get obox path/to/file
doveadm mail fs get -u testuser obox path/to/file
```
## SEE ALSO
Expand Down
4 changes: 4 additions & 0 deletions docs/core/man/sieve-test.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ and it can provide more detailed information about script execution
problems that are reported by the Sieve plugin, for example by tracing
the execution and evaluation of commands and tests respectively.

The tool does not parse the userdb database. If virtual users have different
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • "The tool does not perform a userdb lookup." is a more correct way of saying this.
  • "If users have ..." - there's no need to say "virtual" since the same applies to system users as well.

user and group IDs, these should be specified on the command line using the
following syntax: **-o mail_uid=5000 -o mail_gid=5000**.

## OPTIONS

**-a** *orig-recipient-address*
Expand Down
9 changes: 6 additions & 3 deletions docs/core/plugins/imap_sieve.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ which requires no additional configuration.

Script storages for administrator scripts are defined in
[[setting,sieve_script]] blocks with [[setting,sieve_script_type]]
[[link,sieve_storage_type_before,before]] or
[[link,sieve_storage_type_before,before]] or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary whitespace change?

[[link,sieve_storage_type_after,after]]. These execute administrator scripts
before or after the user's personal script, respectively. The
[[setting,sieve_script_cause]] setting for the administrator storages used by
Expand All @@ -81,7 +81,7 @@ The applicability of administrator scripts can be limited to a destination
mailbox by placing the corresponding [[setting,sieve_script]] blocks inside
a [[setting,mailbox]] block for that mailbox. For a source mailbox, limiting the
applicability of administrator scripts can similarly be achieved by placing the
corresponding [[setting,sieve_script]] blocks inside a
corresponding [[setting,sieve_script]] blocks inside an
[[setting,imapsieve_from]] block with that mailbox name. The [[setting,mailbox]]
and [[setting,imapsieve_from]] blocks can be nested when both are required.

Expand All @@ -108,9 +108,12 @@ This plugin registers the `imapsieve` extension with the Sieve
interpreter. This extension is enabled implicitly, which means that it
does not need to be added to the [[setting,sieve_extensions]] setting.

Additional information about using the plugin with virtual mailboxes can be
found at [[link,plugin_virtual_imapsieve,virtual mailbox plugin]].

## Example Configuration

```[dovecot.conf]]]
```[dovecot.conf]
imapsieve_from Spam {
sieve_script ham {
type = before
Expand Down
48 changes: 34 additions & 14 deletions docs/core/plugins/virtual.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
layout: doc
title: virtual
dovecotlinks:
plugin_virtual_imapsieve:
hash: imapsieve
text: IMAPSieve script for virtual plugins
---

# Virtual Mailbox Plugin (`virtual`)
Expand Down Expand Up @@ -32,27 +36,33 @@ Then, you'll have to create a [[link,namespaces,namespace]] for the virtual
mailboxes, for example:

```[dovecot.conf]
namespace {
namespace virtual {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there are a ton of these missing. Fixing them all in #1376

prefix = virtual/
separator = /
mail_driver = virtual
mail_path = ~/Maildir/virtual

mailbox All {
auto = no
special_use = \All
}
[...]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think better not include [...] since there's not necessarily any additional configs, and makes copypasting more difficult.

}
```

After this you can create virtual mailboxes under `~/Maildir/virtual`. By
default it uses the `fs` layout, so you can create directories such as:

* INBOX: `~/Maildir/virtual/INBOX/`
* All: `~/Maildir/virtual/All/`
* Sub/mailbox: `~/Maildir/virtual/Sub/mailbox/`

If you prefer to use the Maildir++ layout instead, set
[[setting,mailbox_list_layout,maildir++]].

### Virtual Mailboxes

For each virtual directory you need to create a `dovecot-virtual` file. Its
syntax is like:
For each directory (virtual mailbox) you need to create a `dovecot-virtual` file.
Its syntax is like:

```
<1+ mailbox patterns>
Expand All @@ -71,14 +81,16 @@ aren't noticed.
prefix. For example if you have namespaces with an empty prefix and a prefix
`mail/`:

* `*` matches only mailboxes from the namespace with empty prefix
* `mail*` matches mailboxes beginning with name `mail` from the namespace
with empty prefix
* `mail/*` matches only mailboxes from the `mail/` namespace
* `*` only matches mailboxes from the namespace with an empty prefix.
* `mail*` matches mailboxes that begin with `mail` from the namespace with
an empty prefix.
* `mail/*` only matches mailboxes from the `mail/` namespace.

Beware that `*` will not match any mailbox which already has a more
Beware that `*` will not match any mailbox that already has a more
specialized match!

Currently, `*` doesn't match INBOX.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can debug that further in the mailing list why you're seeing that, but this definitely is not generally true, so can't include it in documentation.


The mailbox names have special prefixes:

* `-`: Don't include this mailbox.
Expand Down Expand Up @@ -120,7 +132,7 @@ The `!-prefixed` virtual mailbox is also selected from; you don't need to
list it again without an ! or you'll get two copies of your messages in the
virtual mailbox.

## IMAPSieve Filters
## IMAPSieve Filters {#imapsieve}

[[added,imapsieve_filters]]

Expand All @@ -131,14 +143,22 @@ Virtual/All folder was configured with INBOX as the save destination, this
Virtual/All folder:

```[sieve.before]
imapsieve_mailbox_name = INBOX # Virtual/All would NOT work
imapsieve_mailbox_causes = COPY
imapsieve_mailbox_before = /etc/dovecot/sieve.before
mailbox INBOX { # Virtual/All would NOT work
sieve_script before-copy {
type = before
cause = copy
path = /etc/dovecot/sieve.before
}
}
```

Also, the `imap.mailbox` environment always contains INBOX, even when
Also, the `imap.mailbox` Sieve `environment` variable always contains INBOX, even when
saving via Virtual/All folder.

::: warning
Currently, imapsieve scripts that are defined within a virtual mailbox are not being called.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this just restating what the text above is trying to say? "When saving to a virtual mailbox is configured, imapsieve scripts act as if the save was done directly to the physical destination mailbox". Maybe it could be further clarified, but now this sounds like a separate issue, while I think it's the same. I.e. Sieve scripts work only on physical mailboxes, not virtual mailboxes.

:::

## Mailbox Selection Based on METADATA

Instead of a mailbox name, you can specify a metadata filter:
Expand Down
31 changes: 31 additions & 0 deletions docs/core/settings/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,37 @@ group @mailboxes finnish {
@mailboxes = finnish # Does not work - name is still Trash
```

Within one `group` it's not possible to enumerate different kind of settings,
like `prefix`, `separator`, and multiple `mailboxes`. For these cases, group
the hierarchy one above, like `namespace`. For example:

```[dovecot.conf]
group @namespaces-virtual english {
namespace virtual {
prefix = virtual/

mail_driver = virtual
mail_path = /var/lib/dovecot/virtual/en
mail_index_path = %{home}/index/virtual/en

mailbox All {
auto = no
special_use = \All
}
mailbox Flagged {
auto = no
special_use = \Flagged
}
}
}
Comment on lines +375 to +392
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is something wrong in group handling here, but if it is documented, it needs to be clearer what is wrong. This is both a too specific example of what doesn't work, and also at the same time it's too wide, like I don't think the mailbox { .. } are relevant. I'll see if I can understand what is going wrong there.


@namespaces-virtual = english
```

::: warning
Currently, indices are not created for namespaces that are defined within groups.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the same bug as above. Something's not working right in group handling.

:::

It's possible to override groups using the command line parameter `-o` or
userdb. For example above you can return `namespace/inbox/@mailboxes=finnish`
from userdb to change mailbox names to Finnish language. Note that groups can't
Expand Down