dockerized icon indicating copy to clipboard operation
dockerized copied to clipboard

Amavis breaks when stored on host

Open BigBrainAFK opened this issue 3 years ago • 6 comments
trafficstars

So I wanted to add my second domain to the DKIM config of amavis for which I stored /etc/amavis on the host. This breaks the random SQL password on startup and causes amavis to reboot when mails come in or are to be send out.

It would be cool to have a better way to add more DKIM domains or document the environment variable AMAVISD_DB_PASSWORD

BigBrainAFK avatar Apr 03 '22 10:04 BigBrainAFK

Do you get lines like this after editing amavis config?

INFO spawned: 'amavisd' with pid 17519
INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
INFO exited: amavisd (exit status 13; not expected)

tpimh avatar Apr 16 '22 15:04 tpimh

Just starting the container with the config stored on the host caused this. I then just predetermined the password by setting MYSQL_ROOT_PASSWORD= and AMAVIS_DB_PASSWORD= in my config file that I pass into environment.

The main issue according to the amavis log was incorrect mysql login details.

BigBrainAFK avatar Apr 16 '22 15:04 BigBrainAFK

I'm trying to solve this now. I will also recreate my container (keeping all my volumes) as soon as I figure out what is my current database password.

tpimh avatar Apr 16 '22 15:04 tpimh

The Amavis password is in one of the config files and the mysql password you set via env is propogated to all files as far as i can tell. Also I only moved amavis out to add my second domain to the dkim entry

BigBrainAFK avatar Apr 16 '22 15:04 BigBrainAFK

I ended up copying all the following variables: MYSQL_ROOT_PASSWORD, VMAIL_DB_PASSWORD, VMAIL_DB_ADMIN_PASSWORD, AMAVISD_DB_PASSWORD, ROUNDCUBE_DB_PASSWORD, IREDAPD_DB_PASSWORD, IREDADMIN_DB_PASSWORD, FAIL2BAN_DB_PASSWORD, SA_BAYES_DB_PASSWORD. It seems to be working. But adding a more convenient way is important.

tpimh avatar Apr 16 '22 15:04 tpimh

Like I said for me the 2 passwords completely fixed

BigBrainAFK avatar Apr 16 '22 15:04 BigBrainAFK