Skip to content

Instantly share code, notes, and snippets.

@hennevogel
Created July 23, 2019 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hennevogel/8ddd00f09eb5e83d3a8596119e1ad894 to your computer and use it in GitHub Desktop.
Save hennevogel/8ddd00f09eb5e83d3a8596119e1ad894 to your computer and use it in GitHub Desktop.
require ["copy","fileinto","imap4flags"];
# rule:[alerts]
if anyof (header :contains "subject" "[obs-errors] (100) [OBS Frontend][production]", header :contains "subject" "(100) [api.suse.de][production]", exists "X-Errbit-Comment-Author", header :is "subject" "[obs-errors] Job obs-server has exited with state 'failed'", header :contains "subject" "[obs-errors] Build failed in openQA", header :contains "subject" "[obs-errors] Build incomplete in openQA")
{
fileinto :copy "INBOX/alerts";
fileinto "INBOX/notifications";
stop;
}
# rule:[alerts-package-opensuse]
if allof (header :is "x-mailinglist" "obs-errors", header :contains "x-obs-package" "OBS:Server:Unstable/obs-server", header :is "x-obs-event-type" "build_fail", header :is "x-obs-repository" "openSUSE_42.3/x86_64")
{
fileinto :copy "INBOX/alerts";
fileinto "INBOX/notifications";
stop;
}
# rule:[alerts-package-sle]
if allof (header :is "x-mailinglist" "obs-erros", header :contains "x-obs-package" "OBS:Server:Unstable/obs-server", header :is "x-obs-event-type" "build_fail", header :is "x-obs-repository" "SLE_12_SP4/x86_64")
{
fileinto :copy "INBOX/alerts";
fileinto "INBOX/notifications";
stop;
}
# rule:[alerts-appliance]
if allof (header :is "x-mailinglist" "obs-errors", header :contains "x-obs-package" "OBS:Server:Unstable/OBS-Appliance", header :is "x-obs-event-type" "build_failed", header :is "x-obs-repository" "images/x86_64")
{
fileinto :copy "INBOX/alerts";
fileinto "INBOX/notifications";
stop;
}
# rule:[rule:[notifications]]
if anyof (exists "X-Bugzilla-Reason", exists "X-Redmine-Issue-Id", header :is "x-mailer" "OBS Notification System", header :is "x-mailer" "Errbit", header :contains "message-id" "gitlab.suse.de", header :is "x-mailinglist" "obs-errors", header :contains "from" "rocket_no_reply")
{
fileinto "INBOX/notifications";
stop;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment