sieve: destination folder lookup in database?
Hi,
is there a way to lookup the action for an incoming mail, especially which folder to move the mail in, in a database?
Given Problem:
I want to replace the mda mailfilter/maildrop with dovecot/sieve.
The mailfilter script is rather short, but looksup the destination folder by querying a berkeley database file with the sender's address to find the target folder, using the sender's address as an index. This way, it can store the target folder for hunders or thousands of senders, without needing to compare every single one of them by if == elsif == else...
Is there a similar method for dovecot / sieve?
I found that dovecot's sieve has some database connections, e.g. LDAP or
https://doc.dovecot.org/configuration_manual/sieve/dict/
but rather to receive the whole sieve script for a given recipient as the owner of the mailbox.
Is there a way to determine the target folder where to drop a mail into quickly by the sender's address, even for thousands, without the need to compare every single one of them?
regards
Hadmut
On 8. Feb 2022, at 3.59, Hadmut Danisch hadmut@danisch.de wrote:
I found that dovecot's sieve has some database connections, e.g. LDAP or
https://doc.dovecot.org/configuration_manual/sieve/dict/
but rather to receive the whole sieve script for a given recipient as the owner of the mailbox.
Is there a way to determine the target folder where to drop a mail into quickly by the sender's address, even for thousands, without the need to compare every single one of them?
Maybe you should check the extdata plugin for pigeonhole: https://doc.dovecot.org/configuration_manual/sieve/plugins/extdata/ https://doc.dovecot.org/configuration_manual/sieve/plugins/extdata/
Sami
On 08.02.22 15:37, Sami Ketola wrote:
Maybe you should check the extdata plugin for pigeonhole: https://doc.dovecot.org/configuration_manual/sieve/plugins/extdata/
I had seen that. But after reading that page it appeared to my rather as a lookup for static data, e.g. the vacation message as given in the page as an example.
I've seen from the example, that sieve can lookup the vacation message with the box owner's mail address as an index, configured in /etc/dovecot/pigeonhole-sieve.dict, i.e. vacation message per recipient, but not how to use the sender's address as an index to lookup the folder name.
regards
Hadmut
participants (2)
-
Hadmut Danisch
-
Sami Ketola