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>*" { set "list" "${2}"; set "domain" "${3}"; } elsif header :matches "From" "*<*@*.*>*" { set "list" "${2}"; set "domain" "${3}"; } fileinto :create "Listes+${domain}+${list}"; stop; } elsif exists "List-Id" { if header :matches "List-Id" "*<*.*.*.*>*" { set "list" "${2}"; set "domain" "${4}"; } elsif header :matches "List-Id" "*<*.*.*>*" { set "list" "${2}"; set "domain" "${3}"; } fileinto :create "Listes+${domain}+${list}"; stop; }