Mail Notifications NG

This a work in progress.

Mail notifications NG issue: http://projects.theforeman.org/issues/7586

Redmine tracker for mail-related issues:
http://projects.theforeman.org/issues/7585

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.

mail_system.png (23.5 KB) Preview Stephen Benjamin, 09/23/2014 07:02 AM

mail_system2.png (16.6 KB) Preview Stephen Benjamin, 09/26/2014 09:19 AM

Mail_system Mail_system2