Home Assistant Add-on: Postfix Mail Forwarder

Tags: #<Tag:0x00007f7393700248> #<Tag:0x00007f7393700108>

Home Assistant Add-on: Postfix Mail Forwarder

A simple email forwarding service.

Supports aarch64 Architecture Supports amd64 Architecture Supports armhf Architecture Supports armv7 Architecture Supports i386 Architecture


Sets up a postfix server to host a simple email forwarding service. This is typically used to setup and forward email from a domain you own to your primary email address.

Make sure you have generated a certificate before you start this add-on. The LetsEncrypt add-on can generate a Let’s Encrypt certificate that can be used by this add-on. Please ensure that your mail domain is covered by the certificate.

You will also need to setup an MX record for your domain and forward ports 25 and 587 in your router. If you are seeing Connect Time Out in the logs, your ISP has likely blocked outbound port 25 on their end. You will need to contact them to remove the block.


Follow these steps to get the add-on installed on your system:

  1. Navigate in your Home Assistant frontend to Supervisor -> Add-on Store.

  2. Click -> Repositories

  3. Add https://github.com/hunterjm/hassio-addons

  4. Find the “Postfix Mail Forwarder” add-on and click it.

  5. Click on the “INSTALL” button.

How to use

The Postfix Mail Forwarder add-on is commonly used in conjunction with the LetsEncrypt add-on to set up email forwarding for a custom domain. The following instructions covers this scenario.

  1. Create an MX record in your DNS provider for your mail server to use. i.e. mail.mydomain.com. This domain should also resolve to your IP via an A record or CNAME.

  2. The certificate to your MX domain should already be created via the LetsEncrypt add-on or another method. Make sure that the certificate files exist in the /ssl directory.

  3. Change the domain option to the domain name in your MX record.

  4. Configure your forwarding preferences.

  5. Save configuration.

  6. Start the add-on.

  7. Have some patience and wait a minute.

  8. Check the add-on log output to see the result.


Add-on configuration:

- from: [email protected]
  password: test
    - [email protected]
domain: mail.testo.com
certfile: fullchain.pem
keyfile: privkey.pem

Option forward.from (required)

The email address on your domain that you wish to forward to your other email address(es).

Option forward.password (required)

The password to use for SASL authentication. A common use case is setting this up as an alias in Gmail to be able to send messages from this domain.

Option forward.to (required)

The email address(es) that this addon should forward mail to.

Option: domain (required)

The domain name to use for the mail service.

Option: certfile (required)

The certificate file to use in the /ssl directory. Keep filename as-is if you used default settings to create the certificate with the LetsEncrypt add-on.

Option: keyfile (required)

Private key file to use in the /ssl directory.

Known issues and limitations

  • Many residential ISPs block outbound traffic on port 25 by default. In that case, you will likely see a Connect Time Out message in the logs. You may be able to contact your ISP to remove this block.

  • Some email service providers require a PTR record for reverse DNS lookup. Your residential ISP may not provide one for dynamically assigned IP addresses. These emails will bounce.

  • Gmail may not deliver messages to the user’s inbox unless the forward.from domain is also configured as an alias. This article will walk you through setting that up.


In case you’ve found a bug, please open an issue on our GitHub.