require [ "date", "fileinto", "mailbox", "variables" ]; #if currentdate :matches "year" "*" { set "year" "${1}"; } #if currentdate :matches "month" "*" { set "month" "${1}"; } if exists "X-MC-User" { if header :matches "From" "*<*@*.asso.fr>*" { fileinto :create "Listes+${3}+${2}"; stop; } elsif header :matches "From" "*<*@*.*>*" { fileinto :create "Listes+${3}+${2}"; stop; } } elsif exists "List-Id" { if header :matches "List-Id" "*<*.*.*.*>*" { fileinto :create "Listes+${4}+${3}+${2}"; stop; } elsif header :matches "List-Id" "*<*.*.*>*" { fileinto :create "Listes+${3}+${2}"; stop; } }