On 4/10/2012 11:08 PM, Robert Schetterer wrote:
Hi, i am playing about mail archive

this is what allready works for me

require
["variables","date","fileinto","mailbox","envelope","subaddress","regex"];

# Extract date info
if currentdate :matches "year" "*" { set "year" "${1}"; }
if currentdate :matches "month" "*" { set "month" "${1}"; }
if currentdate :matches "day" "*" { set "day" "${1}"; }
if envelope :detail :matches "to" "*" { set "to" "${1}"; }

if true {
     fileinto :create "INBOX.${year}.${month}.${day}.${to}";
     stop;
}

but ${to} may have a dot included, foldernames
with dot are not allowed in my dove setup yet ( and i dont want to
change it )

i am looking for a way ( guess regex )
for replace a dot  in string replaced by a space char
on the fly

Hmm, no, I see no possibilities for that really. Sieve doesn't have such advanced string manipulation capabilities unfortunately.

You could use the vnd.dovecot.execute extension (extprograms plugin) for that, but I wouldn't call that a nice solution by any means.

Regards,

Stephan.



Reply via email to