2
0

updates to core

This commit is contained in:
2025-05-30 14:24:00 +02:00
parent fc3d7dd80a
commit fbcd7798ca
10 changed files with 30 additions and 93 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
.vscode
.DS_Store
piler.conf
build/piler*

View File

@@ -1,6 +1,6 @@
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
of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,34 +1,6 @@
# piler-docker
[![License](https://img.shields.io/github/license/simatec/piler-docker?style=flat)](https://github.com/simatec/piler-docker/blob/master/LICENSE)
[![Donate](https://img.shields.io/badge/paypal-donate%20|%20spenden-blue.svg)](https://paypal.me/mk1676)
**************************************************************************************************************
**If you like it, please consider a donation:**
[![paypal](https://www.paypalobjects.com/en_US/DK/i/btn/btn_donateCC_LG.gif)](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
*******************************************************************************************************
Originated from: https://github.com/simatec/piler-docker
### Installation Guide:

View File

@@ -1,25 +1,25 @@
FROM ubuntu:22.04
FROM ubuntu:24.04
ARG PACKAGE
ARG TARGETARCH
LABEL description="piler ubuntu jammy image" \
LABEL description="piler ubuntu noble image" \
maintainer="Janos SUTO, sj@acts.hu" \
package="${PACKAGE}"
ENV DEBIAN_FRONTEND="noninteractive" \
DISTRO="jammy" \
DISTRO="noble" \
PILER_USER="piler" \
MYSQL_DATABASE="piler"
COPY ${PACKAGE}_${TARGETARCH}.deb /
COPY ${PACKAGE} /
# hadolint ignore=DL3008
RUN apt-get update && \
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 \
php8.1-gd php8.1-curl php8.1-xml php8.1-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 && \
wget openssl sysstat php8.3-cli php8.3-cgi php8.3-mysql php8.3-fpm php8.3-zip php8.3-ldap \
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 python3 python3-mysqldb ca-certificates curl rsyslog gnupg && \
wget https://repo.manticoresearch.com/manticore-repo.noarch.deb && \
dpkg -i manticore-repo.noarch.deb && \
rm -f manticore-repo.noarch.deb && \
@@ -28,10 +28,10 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
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 && \
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
VOLUME ["/etc/piler","/var/piler/store","/var/piler/manticore","/var/piler/imap","/var/piler/stat","/var/spool/cron/crontabs"]

View File

@@ -1,10 +1,10 @@
# 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="1.4.5"
PILER_VERSION="1.4.7"
# MariaDB Version

View File

@@ -22,13 +22,13 @@ chmod a+x start.sh
rm -f $buildPth/*.deb
#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 pipefail
set -o nounset
IMAGE_NAME="simatec/piler:$PILER_VERSION"
IMAGE_NAME="servercow/piler:$PILER_VERSION"
if [ ! -f $buildPth/$PILER_PACKAGE ]; then
echo "ERROR: missing package name" 1>&2; exit 1;

0
build/start.sh Normal file → Executable file
View File

View File

@@ -196,9 +196,9 @@ if [ ! -f $installPth/.configDone ]; then
sed -i 's/LETSENCRYPT_EMAIL=.*/LETSENCRYPT_EMAIL="'$acmeContact'"/g' ./piler.conf
fi
# use Mailcow
# use mailcow
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
[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;;
@@ -210,13 +210,13 @@ if [ ! -f $installPth/.configDone ]; then
. ./piler.conf
if [ "$USE_MAILCOW" = true ]; then
# Mailcow API-Key
read -ep "Please set your Mailcow API-Key (current: $MAILCOW_APIKEY): " apiKey
# mailcow API-Key
read -ep "Please set your mailcow API-Key (current: $MAILCOW_APIKEY): " apiKey
apiKey=${apiKey:=$MAILCOW_APIKEY}
sed -i 's/MAILCOW_APIKEY=.*/MAILCOW_APIKEY="'$apiKey'"/g' ./piler.conf
# Mailcow Host Domain
read -ep "Please set your Mailcow Host Domain (Enter for default: $imapServer): " mailcowHost
# mailcow Host Domain
read -ep "Please set your mailcow Host Domain (Enter for default: $imapServer): " mailcowHost
mailcowHost=${mailcowHost:=$imapServer}
sed -i 's/MAILCOW_HOST=.*/MAILCOW_HOST="'$mailcowHost'"/g' ./piler.conf
fi
@@ -418,31 +418,6 @@ cat >> $etcPth/config-site.php <<EOF
\$config['IMAP_PORT'] = 993;
\$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.
//\$config['MEMCACHED_ENABLED'] = 1;
\$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 "${blue}${HLINE}"
echo "set Mailcow Api-Key config"
echo "set mailcow Api-Key config"
echo "${blue}${HLINE}${normal}"
echo
cat >> $etcPth/config-site.php <<EOF
// ### Begin added by Piler-Installer ###
// Mailcow API
// mailcow API
\$config['MAILCOW_API_KEY'] = '$MAILCOW_APIKEY';
\$config['MAILCOW_SET_REALNAME'] = true;
\$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';

View File

@@ -147,17 +147,6 @@ cat >> $configSite <<EOF
\$config['IMAP_PORT'] = 993;
\$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';
@@ -187,7 +176,7 @@ if ! grep -qF "// Mailcow API" "$configSite"; then
cat >> $configSite <<EOF
// ### Begin added by Piler-Installer ###
// Mailcow API
// mailcow API
\$config['MAILCOW_API_KEY'] = '$MAILCOW_APIKEY';
\$config['MAILCOW_SET_REALNAME'] = true;
\$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
fi
echo "Patch Mailcow Api-Key config"
echo "Patch mailcow Api-Key config"
#######################################################################################

View File

@@ -60,15 +60,15 @@ NGINX_ENABLE_IPV6=true
# ------ optional Mailcow Settings --------
# if Use Mailcow API Options set "true"
# if Use mailcow API Options set "true"
USE_MAILCOW=false
# your Mailcow API-Key
# your mailcow API-Key
MAILCOW_APIKEY="your_Mailcow_API-Key"
# your Mailcow Host Domain
# your mailcow Host Domain
MAILCOW_HOST="mail.example.com"