Home > mailroomd

mailroomd

Mailroomd is a project mainly written in Ruby, it's free.

An EventMachine daemon for rotating and submitting mail spools to an application for processing.

An EventMachine daemon for rotating and submitting mail spools to an application for processing.

Calling: mailroomd start

Configuring: Configuration is loaded from config.yml in the project directory. Possible configuration keys:

  • mail_spools -- a list of the mail spools to process
  • s3 -- a hash of details for the s3 connection
  • api -- a hash of details for the api to which the snapshots will be posted
    • url -- where to post the snapshot
    • username -- basic auth username
    • password -- basic auth password
  • airbrake_key -- The API key for Airbrake/Hoptoad. Leave out to not report errors
  • log_level -- specify the verboseness of the log. Default: INFO

Events:

  1. Timer tick -> acquire lock
  2. Lock acquired -> move file
  3. File moved -> transfer to s3, restart timer
  4. Transfered to s3 -> Post to API
  5. Posted to API -> log

Signals: INT - Immediate stop TERM - Graceful exit. Finish created snapshots and exit

To Do:

  • Make sure locking/moving is enough to safely move files
    • Make sure file is not cut in mid-message
    • Make sure postfix does not continue to write to the moved file
  • Allow config location to passed as an argument
  • Don't take new snapshots after TERM (Will currently take one last snapshot)
  • Environments?
    • Make Hoptoad automatically not send in development
    • Change default log level?
  • Make Hoptoad dependency optional
Previous:inspezilla