Mail Notifications NG

This a work in progress.

Mail notifications NG issue:

Redmine tracker for mail-related issues:

1. Mail Notifications

Mail notifications are recurring or ad hoc emails that provide a user with essential information. They genreally fall into two types:

  • summaries
  • alerts

Summaries would be:

  • List of new hosts built today
  • Puppet summary (interesting reports)
  • Hosts discovered (Foreman Discovery)
  • Daily errata report (Katello)
    • Table of hosts with columns showing the # of security, bug fix, and enhancement errata

Alerts are ad hoc:

  • Build complete
  • Puppet failure
  • Host discovered
  • New errata after sync/promotion
  • etc

2. Design

The logic and templating for the reports would go into ActionMailer objects, just like the HostMailer today. Plugins can provide their own mailers, and register them as MailNotifications. This design just bolts on a framework to keep track of these mailers, and which users want to get them. This keeps things pretty simple.

A user may subscribe to individual notifications in their "My Account" page. Ad hoc e-mails are immediately sent, while recurring e-mails would be instantiated by cron job(s), defaulting to something like 4am

It would be a nice idea to add some user-customizable scheduling later.