erik73 / addon-mail Goto Github PK
View Code? Open in Web Editor NEWMail server based on Postfix, Dovecot and Postfix Admin - Home Assistant Add-on by Erik73
Home Page: https://erik73.github.io
License: MIT License
Mail server based on Postfix, Dovecot and Postfix Admin - Home Assistant Add-on by Erik73
Home Page: https://erik73.github.io
License: MIT License
I cannot get the setup right, have struggled a lot!
Being able to send and receive emails using my domain.
Nothing
I have my own domain using Cloudflare DNS connect using a reverse proxy from Nginx Proxy Manager HassOS add-on to secure the connection. Though, locally I can still use 192.168.178.100:8123 over http (no s) and send tts messages to my google devices. Before I got my own domain abc***.de, I used abc***.duckdns.org, which I also linked through the proxy. So the old duckdns url still works encrypted and all, but I do not really use it anymore.
I am getting stuck at setting up the email client because of the Nginx reverse proxy. I have no idea what links I need to connect with what ports and which records I need to make in Cloudflare. Nginx Proxy Manger also only allows for http or https types, I was not really sure if this would be an issue. Additionally, my router cannot forwards port 25 as internal nor external address. Though, I did forward 465 to 192:168.178.100:465 for tcp, 587 to 192:168.178.100:587 for tcp and 993 to 192:168.178.100:993 for tcp.
Using a combination of tutorials and bits of information online I made the following records, proxy settings and add-on configurations (these include a couple for the home assistant to domain itself)
Domain = bc***.de
Host N. = Hostname given on info page of mailserver add-on.
Public IP = my public IP where the raspberri pi with home assistant is located.
Cloudflare IP = some IP I got when doing nslookup on my domain name.
Random IP = the Cloudflare IP + 1, as some tutorials stated I should do??
Obviously, the log gives a whole lot of:
mail.info: Feb 22 22:13:29 postfix/smtp[813]: connect to gmail-smtp-in.l.google.com[108.177.126.27]:25: Operation timed out mail.info: Feb 22 22:13:29 postfix/smtp[810]: connect to gmail-smtp-in.l.google.com[108.177.126.27]:25: Operation timed out mail.info: Feb 22 22:13:29 postfix/smtp[812]: connect to gmail-smtp-in.l.google.com[108.177.126.27]:25: Operation timed out mail.info: Feb 22 22:13:29 postfix/smtp[811]: connect to gmail-smtp-in.l.google.com[108.177.126.27]:25: Operation timed out mail.info: Feb 22 22:13:29 postfix/smtp[814]: connect to gmail-smtp-in.l.google.com[108.177.126.27]:25: Operation timed out mail.info: Feb 22 22:13:59 postfix/smtp[813]: connect to alt1.gmail-smtp-in.l.google.com[209.85.233.27]:25: Operation timed out mail.info: Feb 22 22:13:59 postfix/smtp[810]: connect to alt1.gmail-smtp-in.l.google.com[209.85.233.27]:25: Operation timed out mail.info: Feb 22 22:13:59 postfix/smtp[812]: connect to alt1.gmail-smtp-in.l.google.com[209.85.233.27]:25: Operation timed out mail.info: Feb 22 22:13:59 postfix/smtp[811]: connect to alt1.gmail-smtp-in.l.google.com[209.85.233.27]:25: Operation timed out mail.info: Feb 22 22:13:59 postfix/smtp[814]: connect to alt1.gmail-smtp-in.l.google.com[209.85.233.27]:25: Operation timed out mail.info: Feb 22 22:14:29 postfix/smtp[811]: connect to alt2.gmail-smtp-in.l.google.com[142.250.4.27]:25: Operation timed out mail.info: Feb 22 22:14:29 postfix/smtp[812]: connect to alt2.gmail-smtp-in.l.google.com[142.250.4.27]:25: Operation timed out mail.info: Feb 22 22:14:29 postfix/smtp[814]: connect to alt2.gmail-smtp-in.l.google.com[142.250.4.27]:25: Operation timed out mail.info: Feb 22 22:14:29 postfix/smtp[813]: connect to alt2.gmail-smtp-in.l.google.com[142.250.4.27]:25: Operation timed out mail.info: Feb 22 22:14:29 postfix/smtp[810]: connect to alt2.gmail-smtp-in.l.google.com[142.250.4.27]:25: Operation timed out
The log starts as follow:
` [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
Add-on: Mailserver
Postfix and Dovecot mail server for Home Assistant, with Postfix Admin web interface
Add-on version: 1.1.4
You are running the latest version of this add-on.
System: Home Assistant OS 5.10 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2021.1.5
Home Assistant Supervisor: 2021.02.11
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 10-create-config.sh: executing...
[23:36:09] INFO: Let's Encrypt certs will be used...
Database is up to date: 1843/0
[cont-init.d] 10-create-config.sh: exited 0. [cont-init.d] ~-socklog: executing... [cont-init.d] ~-socklog: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [23:36:11] INFO: Starting Postfix.... [23:36:11] INFO: Starting PHP-FPM... listening on /run/systemd/journal/dev-log, gid=65534, uid=65534, starting. mail.info: Feb 22 22:36:12 postfix/master[652]: daemon started -- version 3.5.9, configuration /etc/postfix [23:36:12] INFO: Starting Dovecot.... mail.info: Feb 22 22:36:12 dovecot: master: Dovecot v2.3.13 (89f716dc2) starting up for imap, lmtp [23:36:13] INFO: Starting NGinx.... `More info here.
Hi!
Don't know what I am doing wrong, but seems it need some API service?
see log below... what should I do?
Oops! Something went wrong.
We are so sorry, but something went terribly wrong when
starting or running this add-on.
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
Hi!
Thanks allot for working on and providing this addon.
I need some help with the setup. Let me explain my use case first so you can tell me if what I’m looking for is even possible: I have a small, 1 man, business that has a website (tonymaakt.nl) and I would like to run my own mail server because that way i don’t have to pay extra for mail hosting, I already have HomeAssistant running on a raspberrypi 4B.
I looked for documentation but didn’t find any. I looked at the two closed issues but couldn’t make sense of it.
What should I fill in to the addon settings (domain, hostname) and how can I setup my domain in postfix so I can send and receive email with [email protected]?
Thank you very much in advance for your help!
Starting today I am not able to send emails. Every time I try I get an instant email back saying that my ip address has been listed at SpamHaus. This never used to happen. I have duckdns setup so my io address shouldn’t be used anyway. What am I doing wrong?
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
mail/Dockerfile
ghcr.io/erik73/base/amd64 3.0.19
.github/workflows/ci.yaml
.github/workflows/deploy.yaml
.github/workflows/labels.yaml
.github/workflows/lock.yaml
.github/workflows/pr-labels.yaml
.github/workflows/release-drafter.yaml
.github/workflows/stale.yaml
mail/Dockerfile
ghcr.io/erik73/base/amd64 3.0.19
mail/build.yaml
ghcr.io/erik73/base/aarch64 3.0.19
ghcr.io/erik73/base/amd64 3.0.19
ghcr.io/erik73/base/armv7 3.0.19
ghcr.io/erik73/base/i386 3.0.19
mail/Dockerfile
just-containers/s6-overlay v3.1.6.2
mail/Dockerfile
postfixadmin/postfixadmin 3.3.13
mail/Dockerfile
alpine_3_20/mariadb-client 10.11.8-r0
alpine_3_20/nginx 1.26.1-r0
alpine_3_20/php82 8.2.19-r0
alpine_3_20/php82-fpm 8.2.19-r0
alpine_3_20/php82-imap 8.2.19-r0
alpine_3_20/php82-session 8.2.19-r0
alpine_3_20/php82-opcache 8.2.19-r0
alpine_3_20/php82-mbstring 8.2.19-r0
alpine_3_20/php82-mysqli 8.2.19-r0
alpine_3_20/php82-pdo_mysql 8.2.19-r0
alpine_3_20/postfix 3.9.0-r1
alpine_3_20/postfix-mysql 3.9.0-r1
alpine_3_20/dovecot 2.3.21-r17
alpine_3_20/dovecot-lmtpd 2.3.21-r17
alpine_3_20/dovecot-mysql 2.3.21-r17
alpine_3_20/dovecot-pigeonhole-plugin 2.3.21-r17
alpine_3_20/rspamd-client 3.8.4-r0
Is it possible, as an end user, to add my own entries to some files under /etc/postfix, especially main.cf, canonical and virtual?
I'm not very experienced with Docker, but I assume changes are lost with every restart. Can persistent changes be made via the GUI or via the command line?
Admin web interface doesn't accept username and password from config file. How to log in?
whats the default password to access or file configuration to setup?
Try a lot times configure admin_user and admin_passord and not work
Unable to login following install. Postfixadmin db appears to be empty.
Unexpected error in install log:
/var/www/postfixadmin/scripts/postfixadmin-cli: line 34: exec: php: not found
cont-init: info: /etc/cont-init.d/10-create-config.sh exited 127
cont-init: warning: some scripts exited nonzero
s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
I'm trying to test the Add-on but installation fails as
https://github.com/erik73/addon-mail is not a valid add-on repository
Add on will install
Add on does not install
Click Add-Ons > Add on store > Repositories > enter URL for repo https://github.com/erik73/addon-mail/
and click Add
No suggestion to fix.
Is it possible to access the emails from home assistant?
It would be nice to see each email as a file and open them in a text editor.
As far as I know the email file format should be mbox right?
It is probably only possible to access the email files by using portainer.
But I dont know where they are located...
Maybe its possible to show the directory containing the emails somewhere in /share directory or the new /addon_configs directory.
Erik - is there a sample script to reference to send an email inside a HA YAML script? Can you please point me to an example I can copy? I am running HA in Docker under Ubuntu on a very small Intel computer. I am brand new to HA and Docker. Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.