Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geerlingguy/ansible-role-mailhog
Ansible Role - MailHog for catching and viewing emails
https://github.com/geerlingguy/ansible-role-mailhog
ansible catch debug development email local mail mailhog role
Last synced: 8 days ago
JSON representation
Ansible Role - MailHog for catching and viewing emails
- Host: GitHub
- URL: https://github.com/geerlingguy/ansible-role-mailhog
- Owner: geerlingguy
- License: mit
- Created: 2014-12-17T15:22:10.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-07-17T03:49:58.000Z (4 months ago)
- Last Synced: 2024-10-10T04:06:31.178Z (25 days ago)
- Topics: ansible, catch, debug, development, email, local, mail, mailhog, role
- Language: Shell
- Homepage: https://galaxy.ansible.com/geerlingguy/mailhog/
- Size: 65.4 KB
- Stars: 64
- Watchers: 9
- Forks: 40
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-list-ansible - ansible-role-mailhog - MailHog for catching and viewing emails (role)
README
# Ansible Role: MailHog
[![CI](https://github.com/geerlingguy/ansible-role-mailhog/workflows/CI/badge.svg?event=push)](https://github.com/geerlingguy/ansible-role-mailhog/actions?query=workflow%3ACI)
Installs [MailHog](https://github.com/mailhog/MailHog), a Go-based SMTP server and web UI/API for displaying captured emails, on RedHat or Debian-based linux systems.
Also installs [mhsendmail](https://github.com/mailhog/mhsendmail) so you can redirect system mail to MailHog's built-in SMTP server.
If you're using PHP and would like to route all PHP email into MailHog, you will need to update the `sendmail_path` configuration option in php.ini, like so:
sendmail_path = "{{ mailhog_install_dir }}/mhsendmail"
(Replace `{{ mailhog_install_dir }}` with the actual MailHog installation directory, which is `/opt/mailhog` by default—e.g. `/opt/mailhog/mhsendmail`).
## Requirements
None.
## Role Variables
Available variables are listed below, along with default values (see `defaults/main.yml`):
mailhog_install_dir: /opt/mailhog
The directory into which the MailHog binary will be installed.
mailhog_version: 1.0.0
The version of MailHog that will be installed. You can find the latest version by visiting the [MailHog project releases page](https://github.com/mailhog/MailHog/releases).
mailhog_binary_url: "https://github.com/mailhog/MailHog/releases/download/v{{ mailhog_version }}/MailHog_linux_amd64"
The MailHog binary that will be installed. You can find the latest version or a 32-bit version by visiting the [MailHog project releases page](https://github.com/mailhog/MailHog/releases).
mailhog_daemonize_bin_path: /usr/sbin/daemonize
The path to `daemonize`, which is used to launch MailHog via init script.
mhsendmail_version: 0.2.0
The version of the mhsendmail binary that will be installed. You can find the latest version by visiting the [mhsendmail project releases page](https://github.com/mailhog/mhsendmail/releases).mhsendmail_binary_url: "https://github.com/mailhog/mhsendmail/releases/download/v{{ mhsendmail_version }}/mhsendmail_linux_amd64"
The mhsendmail binary that will be installed. You can find the latest version or a 32-bit version by visiting the [mhsendmail project releases page](https://github.com/mailhog/mhsendmail/releases).
## Dependencies
- geerlingguy.daemonize
## Example Playbook
- hosts: servers
roles:
- { role: geerlingguy.mailhog }## License
MIT / BSD
## Author Information
This role was created in 2014 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).