Home Assistant Add-on: Postfix Mail Forwarder
A simple email forwarding service.
About
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.
Installation
Follow these steps to get the add-on installed on your system:
-
Navigate in your Home Assistant frontend to Supervisor -> Add-on Store.
-
Click -> Repositories
-
Add
https://github.com/hunterjm/hassio-addons
-
Find the “Postfix Mail Forwarder” add-on and click it.
-
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.
-
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 anA
record orCNAME
. -
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. -
Change the
domain
option to the domain name in yourMX
record. -
Configure your forwarding preferences.
-
Save configuration.
-
Start the add-on.
-
Have some patience and wait a minute.
-
Check the add-on log output to see the result.
Configuration
Add-on configuration:
forward:
- from: [email protected]
password: test
to:
- [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.
Support
In case you’ve found a bug, please open an issue on our GitHub.