sieve: destination folder lookup in database?

Hadmut Danisch hadmut at danisch.de
Tue Feb 8 01:59:05 UTC 2022


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







More information about the dovecot mailing list