1 require [ "copy", "environment", "imapsieve", "variables", "vnd.dovecot.pipe" ];
3 if environment :matches "imap.mailbox" "*" { set "mailbox" "${1}"; }
4 if string "${mailbox}" "Trash" { stop; }
5 if string "${mailbox}" "Corbeille" { stop; }
7 if environment :matches "imap.user" "*" { set "username" "${1}"; }
9 pipe :copy :try "learn-ham.sh" [ "${username}" ];