Using Mailpit as my default MTA
Three years ago I blogged about Using Mailhog as my default MTA and that worked great for me. However, Mailhog development seems to be stalled and it had occasional problems with some perfectly fine mails. So when I stumbled across Mailpit, it was time to switch.
The setup is basically the same.
Install via AUR:
yay -Sy mailpit-bin
Adjust the systemd service file using `systemctl edit mailpit.service` and use the following:
[Service] Environment="MP_SMTP_BIND_ADDR=0.0.0.0:25" Environment="MP_UI_BIND_ADDR=0.0.0.0:8026" User=root
Enable the service
systemctl enable mailpit systemctl start mailpit
Configure PHP to use it's mailpit's delivery agent:
- /etc/php/conf.d/mailpit.ini
sendmail_path = "/usr/bin/mailpit sendmail -S=localhost:25"