roots.mailpit

Ansible Role: Mailpit

MIT License Release Build Status Follow Roots

This role installs Mailpit, a tool for testing emails on RedHat or Debian-based Linux systems. Mailpit works as an SMTP server and has a web interface to see all the emails it captures. It is inspired by MailHog but works much faster.

This role is based on https://github.com/geerlingguy/ansible-role-mailhog.

If you are using PHP and want to send all PHP emails to Mailpit, you need to change the sendmail_path setting in php.ini like this:

sendmail_path = "{{ mailpit_install_dir }}/mailpit sendmail"

Requirements

You need a Debian-based (like Ubuntu) or RedHat system that uses systemd.

Role Variables

Here are the variables you can use, along with their default values (see defaults/main.yml):

mailpit_install_dir: /opt/mailpit

This is the directory where the MailHog binary will be installed.

mailpit_version: 1.3.8

This is the version of Mailpit that will be installed. To find the latest version, visit the Mailpit project releases page.

mailpit_release_url: "https://github.com/axllent/mailpit/releases/download/v{{ mailpit_version }}/mailhog-linux-amd64"

Example Playbook

Here is a simple example of how to use the role:

- hosts: servers
  roles:
    - { role: roots.mailpit }

Community

Stay updated with development and community news:

Installa
ansible-galaxy install roots.mailpit
Licenza
mit
Download
30.1k
Proprietario
Advanced WordPress Development Tools