# global_sieve_before script
# global_sieve_before -> user sieve_before (netzmail UI) -> user sieve_after (netzmail UI) -> global_sieve_after

require "fileinto";
require "mailbox";

if header :contains ["Chat-Version"] [""] {
  if mailboxexists "DeltaChat" {
    fileinto "DeltaChat";
  } else {
    fileinto :create "DeltaChat";
  }
  stop;
}