updates to core
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
.git
|
.git
|
||||||
.vscode
|
.vscode
|
||||||
.DS_Store
|
.DS_Store
|
||||||
piler.conf
|
piler.conf
|
||||||
|
build/piler*
|
||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2022 - 2023 simatec
|
Copyright (c) 2022 - 2023 simatec and Servercow
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -1,34 +1,6 @@
|
|||||||
# piler-docker
|
# piler-docker
|
||||||
|
|
||||||
[](https://github.com/simatec/piler-docker/blob/master/LICENSE)
|
Originated from: https://github.com/simatec/piler-docker
|
||||||
[](https://paypal.me/mk1676)
|
|
||||||
|
|
||||||
|
|
||||||
**************************************************************************************************************
|
|
||||||
|
|
||||||
**If you like it, please consider a donation:**
|
|
||||||
|
|
||||||
[](https://paypal.me/mk1676)
|
|
||||||
|
|
||||||
**************************************************************************************************************
|
|
||||||
|
|
||||||
|
|
||||||
### Mailpiler for Docker
|
|
||||||
|
|
||||||
This is a project to get the Mailpiler running in a docker compose system in a simple and uncomplicated way.
|
|
||||||
|
|
||||||
You can find more information about the Piler project here.
|
|
||||||
|
|
||||||
https://www.mailpiler.org/ or https://github.com/jsuto/piler
|
|
||||||
|
|
||||||
*******************************************************************************************************
|
|
||||||
|
|
||||||
### DockerHub
|
|
||||||
|
|
||||||
https://hub.docker.com/r/simatec/piler
|
|
||||||
|
|
||||||
*******************************************************************************************************
|
|
||||||
|
|
||||||
|
|
||||||
### Installation Guide:
|
### Installation Guide:
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
FROM ubuntu:22.04
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
ARG PACKAGE
|
ARG PACKAGE
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
LABEL description="piler ubuntu jammy image" \
|
LABEL description="piler ubuntu noble image" \
|
||||||
maintainer="Janos SUTO, sj@acts.hu" \
|
maintainer="Janos SUTO, sj@acts.hu" \
|
||||||
package="${PACKAGE}"
|
package="${PACKAGE}"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND="noninteractive" \
|
ENV DEBIAN_FRONTEND="noninteractive" \
|
||||||
DISTRO="jammy" \
|
DISTRO="noble" \
|
||||||
PILER_USER="piler" \
|
PILER_USER="piler" \
|
||||||
MYSQL_DATABASE="piler"
|
MYSQL_DATABASE="piler"
|
||||||
|
|
||||||
COPY ${PACKAGE}_${TARGETARCH}.deb /
|
COPY ${PACKAGE} /
|
||||||
|
|
||||||
# hadolint ignore=DL3008
|
# hadolint ignore=DL3008
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get -y --no-install-recommends install \
|
apt-get -y --no-install-recommends install \
|
||||||
wget openssl sysstat php8.1-cli php8.1-cgi php8.1-mysql php8.1-fpm php8.1-zip php8.1-ldap \
|
wget openssl sysstat php8.3-cli php8.3-cgi php8.3-mysql php8.3-fpm php8.3-zip php8.3-ldap \
|
||||||
php8.1-gd php8.1-curl php8.1-xml php8.1-memcached catdoc unrtf poppler-utils nginx tnef sudo libzip4 \
|
php8.3-gd php8.3-curl php8.3-xml php8.3-memcached catdoc unrtf poppler-utils nginx tnef sudo libzip4 \
|
||||||
libtre5 cron libmariadb-dev mariadb-client-core-10.6 python3 python3-mysqldb ca-certificates curl rsyslog && \
|
libtre5 cron libmariadb-dev mariadb-client-core python3 python3-mysqldb ca-certificates curl rsyslog gnupg && \
|
||||||
wget https://repo.manticoresearch.com/manticore-repo.noarch.deb && \
|
wget https://repo.manticoresearch.com/manticore-repo.noarch.deb && \
|
||||||
dpkg -i manticore-repo.noarch.deb && \
|
dpkg -i manticore-repo.noarch.deb && \
|
||||||
rm -f manticore-repo.noarch.deb && \
|
rm -f manticore-repo.noarch.deb && \
|
||||||
@@ -28,10 +28,10 @@ RUN apt-get update && \
|
|||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
sed -i '/session required pam_loginuid.so/c\#session required pam_loginuid.so' /etc/pam.d/cron && \
|
sed -i '/session required pam_loginuid.so/c\#session required pam_loginuid.so' /etc/pam.d/cron && \
|
||||||
dpkg -i ${PACKAGE}_${TARGETARCH}.deb && \
|
dpkg -i ${PACKAGE} && \
|
||||||
touch /etc/piler/MANTICORE && \
|
touch /etc/piler/MANTICORE && \
|
||||||
ln -sf /etc/piler/piler-nginx.conf /etc/nginx/sites-enabled && \
|
ln -sf /etc/piler/piler-nginx.conf /etc/nginx/sites-enabled && \
|
||||||
rm -f ${PACKAGE}_${TARGETARCH}.deb /etc/nginx/sites-enabled/default /etc/piler/piler.key /etc/piler/piler.pem /etc/piler/config-site.php && \
|
rm -f ${PACKAGE}.deb /etc/nginx/sites-enabled/default /etc/piler/piler.key /etc/piler/piler.pem /etc/piler/config-site.php && \
|
||||||
crontab -u $PILER_USER /usr/share/piler/piler.cron
|
crontab -u $PILER_USER /usr/share/piler/piler.cron
|
||||||
|
|
||||||
VOLUME ["/etc/piler","/var/piler/store","/var/piler/manticore","/var/piler/imap","/var/piler/stat","/var/spool/cron/crontabs"]
|
VOLUME ["/etc/piler","/var/piler/store","/var/piler/manticore","/var/piler/imap","/var/piler/stat","/var/spool/cron/crontabs"]
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# Piler Package
|
# Piler Package
|
||||||
|
|
||||||
PILER_PACKAGE="piler_1.4.5-jammy-c13432f_amd64.deb"
|
PILER_PACKAGE="piler_1.4.7-noble-874c0a6_amd64.deb"
|
||||||
|
|
||||||
# Piler Version
|
# Piler Version
|
||||||
|
|
||||||
PILER_VERSION="1.4.5"
|
PILER_VERSION="1.4.7"
|
||||||
|
|
||||||
# MariaDB Version
|
# MariaDB Version
|
||||||
|
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ chmod a+x start.sh
|
|||||||
rm -f $buildPth/*.deb
|
rm -f $buildPth/*.deb
|
||||||
|
|
||||||
#curl -OL https://bitbucket.org/jsuto/piler/downloads/$PILER_PACKAGE
|
#curl -OL https://bitbucket.org/jsuto/piler/downloads/$PILER_PACKAGE
|
||||||
wget https://bitbucket.org/jsuto/piler/downloads/$PILER_PACKAGE -O $PILER_PACKAGE
|
wget https://github.com/jsuto/piler/releases/download/piler-$PILER_VERSION/$PILER_PACKAGE -O $PILER_PACKAGE
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
IMAGE_NAME="simatec/piler:$PILER_VERSION"
|
IMAGE_NAME="servercow/piler:$PILER_VERSION"
|
||||||
|
|
||||||
if [ ! -f $buildPth/$PILER_PACKAGE ]; then
|
if [ ! -f $buildPth/$PILER_PACKAGE ]; then
|
||||||
echo "ERROR: missing package name" 1>&2; exit 1;
|
echo "ERROR: missing package name" 1>&2; exit 1;
|
||||||
|
|||||||
0
build/start.sh
Normal file → Executable file
0
build/start.sh
Normal file → Executable file
@@ -196,9 +196,9 @@ if [ ! -f $installPth/.configDone ]; then
|
|||||||
sed -i 's/LETSENCRYPT_EMAIL=.*/LETSENCRYPT_EMAIL="'$acmeContact'"/g' ./piler.conf
|
sed -i 's/LETSENCRYPT_EMAIL=.*/LETSENCRYPT_EMAIL="'$acmeContact'"/g' ./piler.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# use Mailcow
|
# use mailcow
|
||||||
while true; do
|
while true; do
|
||||||
read -ep "If Use Mailcow API Options (yes/no)? / Y|N: " jn
|
read -ep "If Use mailcow API Options (yes/no)? / Y|N: " jn
|
||||||
case $jn in
|
case $jn in
|
||||||
[Yy]* ) sed -i 's/USE_MAILCOW=.*/USE_MAILCOW=true/g' ./piler.conf; break;;
|
[Yy]* ) sed -i 's/USE_MAILCOW=.*/USE_MAILCOW=true/g' ./piler.conf; break;;
|
||||||
[Nn]* ) sed -i 's/USE_MAILCOW=.*/USE_MAILCOW=false/g' ./piler.conf; break;;
|
[Nn]* ) sed -i 's/USE_MAILCOW=.*/USE_MAILCOW=false/g' ./piler.conf; break;;
|
||||||
@@ -210,13 +210,13 @@ if [ ! -f $installPth/.configDone ]; then
|
|||||||
. ./piler.conf
|
. ./piler.conf
|
||||||
|
|
||||||
if [ "$USE_MAILCOW" = true ]; then
|
if [ "$USE_MAILCOW" = true ]; then
|
||||||
# Mailcow API-Key
|
# mailcow API-Key
|
||||||
read -ep "Please set your Mailcow API-Key (current: $MAILCOW_APIKEY): " apiKey
|
read -ep "Please set your mailcow API-Key (current: $MAILCOW_APIKEY): " apiKey
|
||||||
apiKey=${apiKey:=$MAILCOW_APIKEY}
|
apiKey=${apiKey:=$MAILCOW_APIKEY}
|
||||||
sed -i 's/MAILCOW_APIKEY=.*/MAILCOW_APIKEY="'$apiKey'"/g' ./piler.conf
|
sed -i 's/MAILCOW_APIKEY=.*/MAILCOW_APIKEY="'$apiKey'"/g' ./piler.conf
|
||||||
|
|
||||||
# Mailcow Host Domain
|
# mailcow Host Domain
|
||||||
read -ep "Please set your Mailcow Host Domain (Enter for default: $imapServer): " mailcowHost
|
read -ep "Please set your mailcow Host Domain (Enter for default: $imapServer): " mailcowHost
|
||||||
mailcowHost=${mailcowHost:=$imapServer}
|
mailcowHost=${mailcowHost:=$imapServer}
|
||||||
sed -i 's/MAILCOW_HOST=.*/MAILCOW_HOST="'$mailcowHost'"/g' ./piler.conf
|
sed -i 's/MAILCOW_HOST=.*/MAILCOW_HOST="'$mailcowHost'"/g' ./piler.conf
|
||||||
fi
|
fi
|
||||||
@@ -418,31 +418,6 @@ cat >> $etcPth/config-site.php <<EOF
|
|||||||
\$config['IMAP_PORT'] = 993;
|
\$config['IMAP_PORT'] = 993;
|
||||||
\$config['IMAP_SSL'] = true;
|
\$config['IMAP_SSL'] = true;
|
||||||
|
|
||||||
// authentication against an ldap directory (disabled by default)
|
|
||||||
//\$config['ENABLE_LDAP_AUTH'] = 1;
|
|
||||||
//\$config['LDAP_HOST'] = '$SMARTHOST';
|
|
||||||
//\$config['LDAP_PORT'] = 389;
|
|
||||||
//\$config['LDAP_HELPER_DN'] = 'cn=administrator,cn=users,dc=mydomain,dc=local';
|
|
||||||
//\$config['LDAP_HELPER_PASSWORD'] = 'myxxxxpasswd';
|
|
||||||
//\$config['LDAP_MAIL_ATTR'] = 'mail';
|
|
||||||
//\$config['LDAP_AUDITOR_MEMBER_DN'] = '';
|
|
||||||
//\$config['LDAP_ADMIN_MEMBER_DN'] = '';
|
|
||||||
//\$config['LDAP_BASE_DN'] = 'ou=Benutzer,dc=krs,dc=local';
|
|
||||||
|
|
||||||
// authentication against an Uninvention based ldap directory
|
|
||||||
//\$config['ENABLE_LDAP_AUTH'] = 1;
|
|
||||||
//\$config['LDAP_HOST'] = '$SMARTHOST';
|
|
||||||
//\$config['LDAP_PORT'] = 7389;
|
|
||||||
//\$config['LDAP_HELPER_DN'] = 'uid=ldap-search-user,cn=users,dc=mydomain,dc=local';
|
|
||||||
//\$config['LDAP_HELPER_PASSWORD'] = 'myxxxxpasswd';
|
|
||||||
//\$config['LDAP_AUDITOR_MEMBER_DN'] = '';
|
|
||||||
//\$config['LDAP_ADMIN_MEMBER_DN'] = '';
|
|
||||||
//\$config['LDAP_BASE_DN'] = 'cn=users,dc=mydomain,dc=local';
|
|
||||||
//\$config['LDAP_MAIL_ATTR'] = 'mailPrimaryAddress';
|
|
||||||
//\$config['LDAP_ACCOUNT_OBJECTCLASS'] = 'person';
|
|
||||||
//\$config['LDAP_DISTRIBUTIONLIST_OBJECTCLASS'] = 'person';
|
|
||||||
//\$config['LDAP_DISTRIBUTIONLIST_ATTR'] = 'mailAlternativeAddress';
|
|
||||||
|
|
||||||
// special settings.
|
// special settings.
|
||||||
//\$config['MEMCACHED_ENABLED'] = 1;
|
//\$config['MEMCACHED_ENABLED'] = 1;
|
||||||
\$config['SPHINX_STRICT_SCHEMA'] = 1; // required for Sphinx see https://bitbucket.org/jsuto/piler/issues/1085/sphinx-331.
|
\$config['SPHINX_STRICT_SCHEMA'] = 1; // required for Sphinx see https://bitbucket.org/jsuto/piler/issues/1085/sphinx-331.
|
||||||
@@ -464,14 +439,14 @@ if [ "$USE_MAILCOW" = true ]; then
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo "${blue}${HLINE}"
|
echo "${blue}${HLINE}"
|
||||||
echo "set Mailcow Api-Key config"
|
echo "set mailcow Api-Key config"
|
||||||
echo "${blue}${HLINE}${normal}"
|
echo "${blue}${HLINE}${normal}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
cat >> $etcPth/config-site.php <<EOF
|
cat >> $etcPth/config-site.php <<EOF
|
||||||
|
|
||||||
// ### Begin added by Piler-Installer ###
|
// ### Begin added by Piler-Installer ###
|
||||||
// Mailcow API
|
// mailcow API
|
||||||
\$config['MAILCOW_API_KEY'] = '$MAILCOW_APIKEY';
|
\$config['MAILCOW_API_KEY'] = '$MAILCOW_APIKEY';
|
||||||
\$config['MAILCOW_SET_REALNAME'] = true;
|
\$config['MAILCOW_SET_REALNAME'] = true;
|
||||||
\$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';
|
\$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';
|
||||||
|
|||||||
15
patch.sh
15
patch.sh
@@ -147,17 +147,6 @@ cat >> $configSite <<EOF
|
|||||||
\$config['IMAP_PORT'] = 993;
|
\$config['IMAP_PORT'] = 993;
|
||||||
\$config['IMAP_SSL'] = true;
|
\$config['IMAP_SSL'] = true;
|
||||||
|
|
||||||
// authentication against an ldap directory (disabled by default)
|
|
||||||
//\$config['ENABLE_LDAP_AUTH'] = 1;
|
|
||||||
//\$config['LDAP_HOST'] = '$SMARTHOST';
|
|
||||||
//\$config['LDAP_PORT'] = 389;
|
|
||||||
//\$config['LDAP_HELPER_DN'] = 'cn=administrator,cn=users,dc=mydomain,dc=local';
|
|
||||||
//\$config['LDAP_HELPER_PASSWORD'] = 'myxxxxpasswd';
|
|
||||||
//\$config['LDAP_MAIL_ATTR'] = 'mail';
|
|
||||||
//\$config['LDAP_AUDITOR_MEMBER_DN'] = '';
|
|
||||||
//\$config['LDAP_ADMIN_MEMBER_DN'] = '';
|
|
||||||
//\$config['LDAP_BASE_DN'] = 'ou=Benutzer,dc=krs,dc=local';
|
|
||||||
|
|
||||||
// authentication against an Uninvention based ldap directory
|
// authentication against an Uninvention based ldap directory
|
||||||
//\$config['ENABLE_LDAP_AUTH'] = 1;
|
//\$config['ENABLE_LDAP_AUTH'] = 1;
|
||||||
//\$config['LDAP_HOST'] = '$SMARTHOST';
|
//\$config['LDAP_HOST'] = '$SMARTHOST';
|
||||||
@@ -187,7 +176,7 @@ if ! grep -qF "// Mailcow API" "$configSite"; then
|
|||||||
cat >> $configSite <<EOF
|
cat >> $configSite <<EOF
|
||||||
|
|
||||||
// ### Begin added by Piler-Installer ###
|
// ### Begin added by Piler-Installer ###
|
||||||
// Mailcow API
|
// mailcow API
|
||||||
\$config['MAILCOW_API_KEY'] = '$MAILCOW_APIKEY';
|
\$config['MAILCOW_API_KEY'] = '$MAILCOW_APIKEY';
|
||||||
\$config['MAILCOW_SET_REALNAME'] = true;
|
\$config['MAILCOW_SET_REALNAME'] = true;
|
||||||
\$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';
|
\$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';
|
||||||
@@ -200,7 +189,7 @@ fi
|
|||||||
wget https://raw.githubusercontent.com/patschi/mailpiler-mailcow-integration/master/auth-mailcow.php -O $etcPth/auth-mailcow.php
|
wget https://raw.githubusercontent.com/patschi/mailpiler-mailcow-integration/master/auth-mailcow.php -O $etcPth/auth-mailcow.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Patch Mailcow Api-Key config"
|
echo "Patch mailcow Api-Key config"
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -60,15 +60,15 @@ NGINX_ENABLE_IPV6=true
|
|||||||
|
|
||||||
# ------ optional Mailcow Settings --------
|
# ------ optional Mailcow Settings --------
|
||||||
|
|
||||||
# if Use Mailcow API Options set "true"
|
# if Use mailcow API Options set "true"
|
||||||
|
|
||||||
USE_MAILCOW=false
|
USE_MAILCOW=false
|
||||||
|
|
||||||
# your Mailcow API-Key
|
# your mailcow API-Key
|
||||||
|
|
||||||
MAILCOW_APIKEY="your_Mailcow_API-Key"
|
MAILCOW_APIKEY="your_Mailcow_API-Key"
|
||||||
|
|
||||||
# your Mailcow Host Domain
|
# your mailcow Host Domain
|
||||||
|
|
||||||
MAILCOW_HOST="mail.example.com"
|
MAILCOW_HOST="mail.example.com"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user