[Dovecot] Using replaceable variables in sieve

Jerry dovecot.user at seibercom.net
Sun Apr 24 23:29:35 EEST 2011

I am not even sure if this is possible. I cannot find an example of it

I am in the process of setting up a "plus" addressing system. The
addresses would be addresses to accounts like
<sales+USERNAME at domain.com>. there are presently 50 such names in sales.

This is the one line entry I presently have in the sieve script:

if envelope :detail "To" "joe" {fileinto "joe"; stop;}

Now, what I would like to do is find a way to do this:

if envelope :detail "To" "joe" {fileinto :detail; stop}

That does not work though. I really do not want to list every available
user individually since it will eventually become a nightmare to
maintain. Is there any way in a sieve script to assign the value of
":detail" to another variable and use that variable in the "fileinto"
portion of the script? I would also need to maintain the same case
folding so as not to create multiple folders with the same name; ie,
Joe, joe, jOe.


Jerry ✌
Dovecot.user at seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
Between grand theft and a legal fee, there only stands a law degree.

More information about the dovecot mailing list