Creating a backup of incoming mail
LuKreme
kremels at kreme.com
Tue Sep 2 22:14:54 UTC 2014
On 02 Sep 2014, at 01:26 , Robert Schetterer <rs at sys4.de> wrote:
> with listescape plugin enabled something like
>
> require
> ["reject","variables","date","fileinto","mailbox","envelope","subaddress","regex","copy","include"];
> # 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 :lower "to" "${1}"; }
> if true {
> if header :contains "Return-Path" "${to}@domain.de" { fileinto :create
> "user-backup/${year}/${month}/${day}/${to}/out";}
> else { fileinto :create "user-backup/${year}/${month}/${day}/${to}/in";}
> stop;
> }
Oh, thanks for that. I'd made very little progress in finding "fileinto :create"
--
'Pardon me for living, I'm sure.' NO-ONE GETS PARDONED FOR LIVING.
More information about the dovecot
mailing list