Testing
This commit is contained in:
parent
7ef70e4c81
commit
2a3be413f0
19
README.md
19
README.md
|
@ -1,8 +1,13 @@
|
|||
# mailcow-dockerized
|
||||
# mailcow-dockerized 🐮 🐋
|
||||
|
||||
mailcow dockerized comes with 11 containers linked in a mailcow network:
|
||||
mailcow dockerized comes with 11 containers linked in a bridged docker network ("mailcow-network"):
|
||||
Dovecot, Memcached, Redis, MariaDB, PowerDNS Recursor, PHP-FPM, Postfix, Nginx, Rmilter, Rspamd and SOGo.
|
||||
|
||||
4 volumes to keep dynamic data. Feel free to use a 3rd-party driver to host your mail directory (vmail) in the cloud or whatever else.
|
||||
vmail-vol-1, dkim-vol-1, redis-vol-1, mysql-vol-1
|
||||
|
||||
Important configuration files are mounted into the related containers and can be changed. Services should be restarted after they were changed (`docker-compose restart x-mailcow`).
|
||||
|
||||
All configurations were written with security in mind.
|
||||
|
||||
### Containers and volumes
|
||||
|
@ -17,13 +22,13 @@ All configurations were written with security in mind.
|
|||
| Container | mariadb-mailcow | mysql | - | 3306/tcp | mysql-vol-1:/var/lib/mysql/, ./data/conf/mysql/:/etc/mysql/conf.d/:ro |
|
||||
| Container | rmilter-mailcow | rmilter | - | 9000/tcp | ./data/conf/rmilter/:/etc/rmilter.conf.d/:ro |
|
||||
| Container | phpfpm-mailcow | phpfpm | - | 9000/tcp | dkim-vol-1:/data/dkim, ./data/web:/web:ro, ./data/conf/rspamd/dynmaps:/dynmaps:ro |
|
||||
| Container | sogo-mailcow | sogo | - | 20000/tcp | ./data/conf/sogo/:/etc/sogo/,exposes /usr/lib/GNUstep/SOGo/WebServerResources/ |
|
||||
| Container | sogo-mailcow | sogo | - | 20000/tcp | ./data/conf/sogo/:/etc/sogo/, /usr/lib/GNUstep/SOGo/WebServerResources/ |
|
||||
| Container | redis-mailcow | redis | - | 6379/tcp | redis-vol-1:/data/ |
|
||||
| Container | memcached-mailcow | memcached | - | 11211/tcp | - |
|
||||
| Volume | vmail-vol-1 | - | - | - | Mounts to dovecot |
|
||||
| Volume | dkim-vol-1 | - | - | - | Mounts to rspamd + phpfpm |
|
||||
| Volume | redis-vol-1 | - | - | - | Mounts to redis |
|
||||
| Volume | mysql-vol-1 | - | - | - | Mounts to mysql |
|
||||
| Volume | vmail-vol-1 | - | - | - | Mounts to dovecot-mailcow |
|
||||
| Volume | dkim-vol-1 | - | - | - | Mounts to rspamd-mailcow + phpfpm-mailcow |
|
||||
| Volume | redis-vol-1 | - | - | - | Mounts to redis-mailcow |
|
||||
| Volume | mysql-vol-1 | - | - | - | Mounts to mysql-mailcow |
|
||||
|
||||
All containers share a network "mailcow-network" with the subnet 172.22.1.0/24 - if you want to change it, set it in the composer file.
|
||||
IPs are dynamic except for PowerDNS resolver which has a static ip address 172.22.1.254.
|
||||
|
|
|
@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive
|
|||
|
||||
ENV GOSU_VERSION 1.9
|
||||
RUN set -x \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget cron && rm -rf /var/lib/apt/lists/* \
|
||||
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
|
||||
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
|
||||
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \
|
||||
|
|
|
@ -9,4 +9,8 @@ ${AS_SOGO} defaults write sogod OCSFolderInfoURL "mysql://${DBUSER}:${DBPASS}@my
|
|||
${AS_SOGO} defaults write sogod OCSEMailAlarmsFolderURL "mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_alarms_folder"
|
||||
${AS_SOGO} defaults write sogod OCSSessionsFolderURL "mysql://${DBUSER}:${DBPASS}@mysql:3306/${DBNAME}/sogo_sessions_folder"
|
||||
|
||||
echo '* * * * * sogo /usr/sbin/sogo-tool expire-sessions 60' > /etc/cron.d/sogo
|
||||
echo '* * * * * sogo /usr/sbin/sogo-ealarms-notify' > /etc/cron.d/sogo
|
||||
cron &
|
||||
|
||||
exec ${AS_SOGO} "$@"
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
SOGoSieveScriptsEnabled = YES;
|
||||
SOGoTimeZone = "Europe/Berlin";
|
||||
SOGoTrashFolderName = "Trash";
|
||||
SOGoVacationEnabled = YES;
|
||||
SOGoVacationEnabled = NO;
|
||||
|
||||
//SOGoDebugRequests = YES;
|
||||
//SoDebugBaseURL = YES;
|
||||
|
|
|
@ -21,7 +21,14 @@ $opt = [
|
|||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
PDO::ATTR_EMULATE_PREPARES => false,
|
||||
];
|
||||
try {
|
||||
$pdo = new PDO($dsn, $database_user, $database_pass, $opt);
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
?>
|
||||
<center style='font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;'>🐮 Connection failed, database may be in warm-up state, please try again later.<br /><br />The following error was reported:<br/> <?=$e->getMessage();?></center>
|
||||
<?php
|
||||
}
|
||||
$_SESSION['mailcow_locale'] = strtolower(trim($DEFAULT_LANG));
|
||||
setcookie('language', $DEFAULT_LANG);
|
||||
if (isset($_COOKIE['language'])) {
|
||||
|
|
Loading…
Reference in New Issue