Works on Ubuntu 16.04 with some tinkering

Wow, I am now self hosting my /e/ data!!

So it took me about 3 hours from spinning up a new VPS, locking down ssh and installing a firewall, and completing the self-hosting directions. I have photos uploading to my cloud, but email is not working yet. I have about 6 months experience with docker, so still fairly new at it but knowing how to install docker-ce and docker-compose already saved a bunch of time since I knew right away what some of the errors were when running the bootstrap script before those were installed.

There were some missing instructions when starting with a brand new Ubuntu install. To start out I already had ufw installed and was only allowing my ssh port. I found out from failures in the bootstrap script that these commands should be run to install prerequisites:

apt-get update
apt upgrade
apt install curl
apt install certbot
sudo ufw allow http
sudo ufw allow https
follow https://docs.docker.com/install/linux/docker-ce/ubuntu/
then https://docs.docker.com/compose/install/

It’s late now, so more to follow later.

2 Likes

Thanks @Tycho for trying out self-hosting. Will await your inputs to add the documentation to make it better.

More notes.
Creating a new mailbox in postfix.admin results in an error.

Go into the docker:
sudo docker exec -it eelomailserver bash
cat /etc/postfix/main.cf | grep virtual_mailbox_base
virtual_mailbox_base = /var/mail
root@mail:/# ls -l /var/mail
total 40
drwxr-xr-x 3 clamav clamav 4096 Oct 24 21:00 clamav
drwxr-xr-x 3 vmail vmail 4096 Oct 23 02:30 dkim
drwxr-xr-x 2 root root 4096 Oct 23 02:32 dovecot
drwxr-xr-x 3 root root 4096 Oct 23 02:30 postfix
drwxr-x— 2 _rspamd _rspamd 12288 Oct 23 02:49 rspamd
drwxr-xr-x 2 vmail vmail 4096 Oct 23 02:30 sieve
drwxr-xr-x 2 root root 4096 Oct 23 02:30 ssl
drwxr-xr-x 3 vmail vmail 4096 Oct 23 02:30 vhosts

That doesn’t look right, where are the mailboxes?

errors in /var/log/mail.warn
2019-10-23T02:49:19.681846+00:00 mail dovecot: master: Fatal: Dovecot is already running with PID 58 (read from /var/run/dovecot/master.pid)

root@mail:/# service --status-all
[ - ] clamav-daemon
[ + ] clamav-freshclam
[ + ] cron
[ + ] dovecot
[ - ] fetchmail
[ ? ] hwclock.sh
[ - ] postfix
[ - ] procps
[ - ] rsync
[ + ] rsyslog
[ + ] unbound

root@mail:/# service postfix status
[ ok ] postfix is not running.
root@mail:/# service dovecot status
doveconf: Warning: service auth { client_limit=1000 } is lower than required under max. load (1400)
doveconf: Warning: service anvil { client_limit=1000 } is lower than required under max. load (1203)
[ ok ] dovecot is running.
root@mail:/# service postfix restart
[ ok ] Stopping Postfix Mail Transport Agent: postfix.
[…] Starting Postfix Mail Transport Agent: postfixpostfix/postfix-script: fatal: the Postfix mail system is already running
failed!

root@mail:/# nano /etc/dovecot/conf.d/10-master.conf

Add:
default_client_limit = 1500

root@mail:/# service dovecot restart
[ ok ] Restarting IMAP/POP3 mail server: dovecot.
root@mail:/# rm /var/spool/postfix/pid/master.pid
root@mail:/# service postfix restart
[ ok ] Stopping Postfix Mail Transport Agent: postfix.
[ ok ] Starting Postfix Mail Transport Agent: postfix.

Also,

root@mail:/# tail -10 /var/log/mail.err
2019-10-25T02:19:32.064288+00:00 mail postfix/master[4912]: fatal: bind 0.0.0.0 port 25: Address already in use
2019-10-25T02:35:27.118920+00:00 mail postfix/master[5130]: fatal: bind 0.0.0.0 port 587: Address already in use

There could be something wrong with /etc/postfix/master.cf
I wish I knew more about this stuff. Packing it in for tonight.

Thanks @Tycho will pass on to the dev team. Let them have a look at the error you have encountered and get back.

Actually the bootstrapping should do all those prerequisites by itself and it is tested/confirmed to be working on 18.04.
It should theoretically also working on 16 but that is not tested so who knows

Mailboxes should be in /var/mail/vhosts/yourdomain/username
However they are also mounted to the outside /mnt/repo-base/volumes/somfolder (can’t remember). As you know as you have some docker experience changes inside the container are not persisting a recreation.

Have you considered starting from scratch with Ubuntu 18 instead of 16. That has two benefits. It is tested to be working and comes with for more years of support (speaking about lts)

1 Like

Let’s not focus on container internals for trouble shooting. Let us assume that as they are containers they are reproducibly configured correctly.
It is some issue outside on the host. It starts with the prerequisite steps you had to take. They should be not necessary. It would be great if you could start over (blank, brand new system) and just follow docs (ideally with 18) and if it fails share the logs/messages here to find out what is going on. Thank you!

Thanks @thilo. /mnt/repo-base/volumes/mail/vhosts/mydomian is empty.

My VPS provider does not yet offer 18 as an option but they say they will do so soon. So I am stuck at 16 for now.

One question I did have about the setup instructions. At one point the bootstrap script asks for (from the instructions):

Enter alternative email:
someone@example.org

I thought this meant to enter an email I already own as something like a recovery email address. So I did that, using another email address from a domain other than the one I am using for my self hosted e cloud. Was that the right thing to do?

OK I looked back at a bunch of notes I took while doing the install and noticed this output:


Adding email accounts used by system senders (drive, …)

Config::read(): attempt to read undefined config option “database_socket”, returning null

Welcome to Postfixadmin-CLI v0.2


PHP Warning: A non-numeric value encountered in /postfixadmin/model/MailboxHandler.php on line 227

Warning: A non-numeric value encountered in /postfixadmin/model/MailboxHandler.php on line 227

fsockopen failed - errno: 110 - errstr: Operation timed out

The mailbox drive@mydomain.com has been added to the mailbox table.


Config::read(): attempt to read undefined config option “database_socket”, returning null

Welcome to Postfixadmin-CLI v0.2


PHP Warning: A non-numeric value encountered in /postfixadmin/model/MailboxHandler.php on line 227

Warning: A non-numeric value encountered in /postfixadmin/model/MailboxHandler.php on line 227

fsockopen failed - errno: 110 - errstr: Operation timed out

The mailbox welcome@mydomain.com has been added to the mailbox table.


Your understanding of the alternative email question is correct. Maybe we need to clarify this in the docs.
What provider is this? I can recommend Hetzner cloud, good price/value. Hetzner.de has various fresh os images. If you are skipping the office set up (currently anyways broken) a machine of type cx11 is sufficient. Under 3€/month. With 7 daily db snapshots 3,50€, So quite affordable

I tried Hetzner but they wanted me to send a scanned image of my drivers license. I wasn’t willing to do that. I use schnellno.de, I won’t use anything from Amazon or 5 eyes based.

1 Like

Or Goolag based… Or 14 eyes bases…