2020-11-07 21:31:47 +00:00
|
|
|
require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];
|
|
|
|
|
|
|
|
if environment :matches "imap.mailbox" "*" {
|
2021-02-17 09:56:18 +00:00
|
|
|
set "mailbox" "${1}";
|
2020-11-07 21:31:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if string "${mailbox}" "Trash" {
|
2021-02-17 09:56:18 +00:00
|
|
|
stop;
|
2020-11-07 21:31:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if environment :matches "imap.user" "*" {
|
2021-02-17 09:56:18 +00:00
|
|
|
set "username" "${1}";
|
2020-11-07 21:31:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pipe :copy "sa-learn-ham.sh" [ "${username}" ];
|