at that point, why not run scripts already?

On October 5, 2025 12:54:48 AM GMT+03:00, Hadmut Danisch via dovecot 
<[email protected]> wrote:
>Hi,
>
>can dovecot sieve query any external database ( berkeley database file, rest 
>api, whatever) to determine the target folder by sender address?
>
>
>
>Background:
>
>I have to migrate a mailbox from an old ubuntu system running with mailfilter 
>as a local delivery agent, and dovecot just as an IMAP server.
>
>Since recent ubuntu versions do not have mailfilter anymore (abandoned for a 
>decade) I need to substitute the mailfilter file with dovecot sieve.
>
>
>The old mailfilter script contained something like
>
>
>if (gdbmopen(".mailfilter.gdbm", "R") == 0)
>    {
>       if ( (box=gdbmfetch(tolower($FROM),"D")) ne "" )
>           to $box
>
>       if ( /^From: .*<(.*)>/ )
>       {
>         if ( (box=gdbmfetch(tolower($MATCH1),"D")) ne "" )
>           to $box
>       }
>
>       gdbmclose
>    }
>
>
>which allowed to sort mails into mailboxes depending on the sender for 
>hundreds of sender addresses in a fast end efficient way.
>
>
>It wouldn't make sense and be too slow to translate this into a sieve script 
>with a thousand
>
>if header :matches ...
>
>elsif header :matches
>
>...
>
>
>Is there a way to do this efficently in dovecot's sieve?
>
>
>regards
>
>Hadmut
>
>
>
>
>
>
>_______________________________________________
>dovecot mailing list -- [email protected]
>To unsubscribe send an email to [email protected]
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to