NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

[PHP-FPM, Config] API key generated via mailcow.conf as rw access

730fa16a
andryyy <[email protected]> 6 years ago
data/Dockerfiles/phpfpm/docker-entrypoint.sh | 2 +-
 docker-compose.yml                           | 2 +-
 generate_config.sh                           | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

Diff

diff --git a/data/Dockerfiles/phpfpm/docker-entrypoint.sh b/data/Dockerfiles/phpfpm/docker-entrypoint.sh
index 1357b5ae..6cc867f8 100755
--- a/data/Dockerfiles/phpfpm/docker-entrypoint.sh
+++ b/data/Dockerfiles/phpfpm/docker-entrypoint.sh
@@ -132,7 +132,7 @@ if [[ ${API_ALLOW_FROM} != "invalid" ]] && \
   if [[ ! -z ${VALIDATED_IPS} ]]; then
     mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} << EOF
 DELETE FROM api;
-INSERT INTO api (api_key, active, allow_from) VALUES ("${API_KEY}", "1", "${VALIDATED_IPS}");
+INSERT INTO api (api_key, active, allow_from, access) VALUES ("${API_KEY}", "1", "${VALIDATED_IPS}", "rw");
 EOF
   fi
 fi
diff --git a/docker-compose.yml b/docker-compose.yml
index c477d15b..e1f1d683 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -102,7 +102,7 @@ services:
             - rspamd
 
     php-fpm-mailcow:
-      image: mailcow/phpfpm:1.58
+      image: mailcow/phpfpm:1.59
       command: "php-fpm -d date.timezone=${TZ} -d expose_php=0"
       depends_on:
         - redis-mailcow
diff --git a/generate_config.sh b/generate_config.sh
index ccc78828..e37eaff8 100755
--- a/generate_config.sh
+++ b/generate_config.sh
@@ -277,6 +277,7 @@ IPV6_NETWORK=fd4d:6169:6c63:6f77::/64
 
 # Create or override API key for web ui
 # You _must_ define API_ALLOW_FROM, which is a comma separated list of IPs
+# The API key defined here has read-write access
 # API_KEY allowed chars: a-z, A-Z, 0-9, -
 
 #API_KEY=