Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Mark for deletion issue 1657 #2246

Closed
wants to merge 5,171 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
5171 commits
Select commit Hold shift + click to select a range
57fbdf8
Added: allow setting the supported THREAD algorithm
Mar 26, 2024
07710f6
Drop hooks `service.app-delay-start-*` in favour of the existing `jso…
Mar 26, 2024
f9048d1
v2.36.0
Mar 26, 2024
b96cb41
Added Autoconfig detect through DNS SRV (RFC 6186 & 8314) and disable MX
Mar 26, 2024
f38e5a4
Solution for #1521
Mar 26, 2024
a70a7c4
Update Portuguese
ner00 Mar 26, 2024
c77edf3
Merge pull request #1522 from ner00/master
the-djmaze Mar 26, 2024
652fbce
Improved translator a bit
Mar 26, 2024
f745a54
ErrorTip use `white-space: pre`
Mar 27, 2024
b6df505
logMask all AUTHENTICATE requests
Mar 27, 2024
35db1f4
SASL OAuth rename 3rd parameter to accessToken
Mar 27, 2024
7213395
Throw more errors when using PHP mail()
Mar 27, 2024
6be84f8
Added ConnectionSecurityType::TLS
Mar 27, 2024
7422947
Update polish translation
tinola Mar 27, 2024
47e427a
Update polish translation
tinola Mar 27, 2024
62f2fe4
Update user.json
tinola Mar 27, 2024
6fe336e
Update user.json
hguilbert Mar 27, 2024
987ed0f
Update admin.json
hguilbert Mar 27, 2024
3017f8c
Simplify LoginProcess handling
Mar 28, 2024
1430501
Resolve #1520
Mar 28, 2024
8c9468d
Merge pull request #1525 from hguilbert/patch-18
the-djmaze Mar 28, 2024
721e731
Merge pull request #1524 from hguilbert/patch-17
the-djmaze Mar 28, 2024
336f7d4
Merge pull request #1523 from tinola/master
the-djmaze Mar 28, 2024
bdd9a80
[plugins][two-factor-auth] rename language files names (rfc5646)
tinola Mar 28, 2024
04896f5
Merge pull request #1527 from tinola/master
the-djmaze Mar 28, 2024
2a56595
Rename languages in extensions
Mar 29, 2024
5580ada
Update fr.json
hguilbert Mar 29, 2024
274fd9d
Update fr.json
hguilbert Mar 29, 2024
7c79b0e
Update user.json
hguilbert Mar 29, 2024
4ded93c
update Chinese translation
mayswind Mar 30, 2024
29d3010
Update Belarusian translation.
Mar 30, 2024
a745972
Merge pull request #1532 from spoooyders/localization-be-by
the-djmaze Mar 31, 2024
a828c3e
Merge pull request #1531 from mayswind/master
the-djmaze Mar 31, 2024
c673f5f
Merge pull request #1530 from hguilbert/patch-21
the-djmaze Mar 31, 2024
8056bf8
Merge pull request #1529 from hguilbert/patch-20
the-djmaze Mar 31, 2024
a76564f
Merge pull request #1528 from hguilbert/patch-19
the-djmaze Mar 31, 2024
b9e2d6c
Bugfix content encoding and type detection.
Mar 31, 2024
a9e5f1c
Improved comments
Mar 31, 2024
c4acb26
Bugfix: extensions set logger failed
Mar 31, 2024
a424c6a
Extensions use \MailSo\Log\Inherit
Mar 31, 2024
8e0303f
Resolve #1533
Mar 31, 2024
9b309c3
fabrica('login') never used, so drop it
Apr 1, 2024
f6b440a
Put available encrypt and sign options in corresponding menu options …
Apr 1, 2024
84ffe1e
Predis to v2.2.2
Apr 2, 2024
78178ec
Everything to ES2020
Apr 2, 2024
cab81d5
Small code reduction in Knockout
Apr 2, 2024
ad417c7
ES2020
Apr 2, 2024
ed673fd
Bugfix: mime parser headerValue() is null
Apr 2, 2024
3988ea9
cleanup unused js parameters
Apr 2, 2024
2bcaf3c
Prevent mbstring error before setup.php
Apr 5, 2024
d59a326
Bugfix: hide pagination when search has 0 messages
Apr 8, 2024
9510347
DoAttachmentsActions $mResult not used
Apr 8, 2024
969dca5
Predis to v2.2.2
Apr 8, 2024
bcc2c7b
Prevent `Infinity` #1540
Apr 8, 2024
41fc419
Improved MessagesPerPage valid value #1540
Apr 8, 2024
3ced479
Example Nextcloud login override for #1544
Apr 13, 2024
fffc044
Resolve #1543
Apr 13, 2024
24681f8
Improved example for #1544
Apr 14, 2024
8a461e7
Speedup Knockout a bit
Apr 14, 2024
daf0f08
Ignore text/x-amp-html https://www.caniemail.com/features/amp/
Apr 14, 2024
326d35e
Bugfix: connect settings stripLogin domain failed
Apr 14, 2024
f8790a3
Rename account IncLogin to ImapUser and OutLogin to SmtpUser
Apr 14, 2024
1592c84
Handle RFC 5987 in Content-Disposition header
Apr 16, 2024
3a6a5a6
small quotation change
Apr 16, 2024
e554bcc
Extend handling login credentials by allowing to modify SMTP username
Apr 16, 2024
f2c4b8a
cPanel use extension login-cpanel instead of login-remote
Apr 16, 2024
0ff66f8
set min-width for attachmentParent and flagParent to line them up
Apr 16, 2024
e304b1d
Nextcloud merge oidcLogin into beforeLogin
Apr 16, 2024
ff80235
Put modified Squire more in line with v2.2.8
Apr 16, 2024
325c748
Check open basedir for #1555
Apr 21, 2024
1b0962c
GnuPG check if shell_exec is disabled
Apr 22, 2024
027ce6c
Resolve #1552
Apr 22, 2024
c9d3f3d
Example haveibeenpwned integration
Apr 22, 2024
6739ec2
Bugfix haveibeenpwned suffix handling
Apr 22, 2024
b4dbf24
ChangePasswordPlugin also use Have I Been Pwned
Apr 22, 2024
d198ad5
Improved the compactcomposer #1498
Apr 23, 2024
24dbe4f
AskPopupView.password default is to only ask passphrase
Apr 23, 2024
2656d36
Added idea to ask SMTP credentials on AUTH failure
Apr 23, 2024
aaae0a3
Remove `date_from_headers` from application.ini and `internalTimestamp`
Apr 23, 2024
17fc379
Rename application.ini `[labs]login_fault_delay` to `[login]fault_delay`
Apr 23, 2024
372e4bc
Rename application.ini `[labs]log_ajax_response_write_limit` to `[log…
Apr 23, 2024
b7a11d4
Don't input password in command, ask in prompt #1552
Apr 23, 2024
7df1d55
Nextcloud don't use RainLoop login credentials
Apr 23, 2024
944edef
password => passphrase
Apr 23, 2024
fdc019e
Resolve #1557
Apr 23, 2024
cd8b393
Move OAuth2 to core
Apr 24, 2024
4b63adb
v2.36.1
Apr 24, 2024
c73736a
properly escape path sep in tar file list regex
sevmonster Apr 26, 2024
f4e81a1
Bugfix: Undefined variable $sFilename
Apr 28, 2024
9ec8ac8
Resolve #1561
Apr 28, 2024
0c081cf
Merge pull request #1562 from sevmonster/patch-1
the-djmaze Apr 28, 2024
f9b5a37
Simple solution for #1562
Apr 28, 2024
685b2ea
Fix GPG/PGP exec() return false handling
Apr 28, 2024
0aa48a8
Prevent mkdir() error #1565
Apr 28, 2024
53a6f04
Added "copy to" action in menu's for #1559
Apr 28, 2024
e9f2b71
Log RFC 2822 date parse error for #1554
Apr 28, 2024
1ec4930
resolved problems arised from changes in v2.36
cm-schl Apr 29, 2024
cc36083
Improved "remember me" cookie handling
Apr 29, 2024
73ac962
Log signal info for #1569
Apr 30, 2024
6cafd65
Bugfix Log RFC 2822 date parse error for #1554
Apr 30, 2024
1d8ed48
remove debug messages
cm-schl Apr 30, 2024
cda2aad
small cleanup
cm-schl Apr 30, 2024
3d0b166
oidc login
May 2, 2024
0dbf992
Update Portuguese
ner00 May 2, 2024
f33e231
update squire to v2.2.8
SergeyMosin May 9, 2024
3c178a5
fix caret in the root node and wrong field focused on compose dialog …
SergeyMosin May 9, 2024
c0d3c35
version bump
SergeyMosin May 9, 2024
1f5613b
Merge branch 'the-djmaze:master' into master
cm-schl May 9, 2024
34f5f83
Bugfix SCRAM auth response #1575
May 13, 2024
c0c0106
Merge pull request #1573 from ner00/master
the-djmaze May 13, 2024
ad3313f
Merge pull request #1578 from SergeyMosin/compact-composer-plugin-v1.0.4
the-djmaze May 13, 2024
2786485
don't pass a smtp password to setCredentials
cm-schl May 13, 2024
f8af48c
Merge branch 'the-djmaze:master' into master
cm-schl May 14, 2024
23fe3a9
Add new function to overwrite the cryptkey
cm-schl May 14, 2024
0dcc468
Resolve #1575
May 14, 2024
c3c75c2
Resolve #1580
May 14, 2024
e81cf80
update readme
cm-schl May 15, 2024
0cbeba2
update readme
cm-schl May 15, 2024
3d845f6
Update Basque translation
Thadah May 20, 2024
263dbab
reorder steps to speed up the process and make sure that removed addi…
cm-schl May 21, 2024
97391a3
Changes for #1587
May 21, 2024
d069ca0
Merge pull request #1588 from Thadah/patch-1
the-djmaze May 21, 2024
4ad2518
Merge pull request #1572 from Murena-SAS/fix-oidc-sso-login
the-djmaze May 21, 2024
4365892
Resolve #1589
May 21, 2024
b5dbd0c
OpenPGP.js automatically import backup keys from server
May 26, 2024
4dc7ad0
Updates for #1572
May 26, 2024
478087f
Updated Amazon avatar
May 26, 2024
429a0eb
v2.36.2
May 26, 2024
92bfa7b
Merge pull request #1 from the-djmaze/master
PhilippMundhenk May 26, 2024
8d3f4f5
introduced SensitiveString handling
PhilippMundhenk May 26, 2024
6ef3390
adding support for snappymail in subdirectories
PhilippMundhenk May 26, 2024
df1e592
Bugfix: Undefined variable $aTokenData #1567
May 26, 2024
aa91623
Merge pull request #1597 from PhilippMundhenk/master
the-djmaze May 26, 2024
4bb1b41
Bump version for #1597
May 26, 2024
ab2f646
Bugfix: Nextcloud getPrimaryEMailAddress() on null
May 27, 2024
69cd876
Bugfix: Nextcloud login failed due to undefined email address
May 27, 2024
365a5ef
UserAuth prevent plugin errors (like the Nextcloud plugin did)
May 27, 2024
68218e4
v2.36.3
May 27, 2024
047fd62
Hopefully solved Nextcloud login issues #1602
May 27, 2024
99c79a8
Update Portuguese
ner00 May 27, 2024
dd39d18
Changes #1603
May 27, 2024
92ab56b
Add AdvancedSearch support for filtering older mails
codiflow May 27, 2024
614c7ac
Merge pull request #1605 from ner00/master
the-djmaze May 27, 2024
998eb8c
Bugfix: default language error
May 28, 2024
55b8620
Merge branch 'master' of github.com:the-djmaze/snappymail
May 28, 2024
caf1ee3
Merge branch 'the-djmaze:master' into master
cm-schl May 28, 2024
82fb6fe
update readme and version number to 2.2.0
cm-schl May 28, 2024
c6b9f22
Small change to report bug template
May 28, 2024
c2e558c
Resolve #1611
May 28, 2024
6d15cab
Improved signing messages by allowing to choose between the options
May 28, 2024
ba400a9
Merge pull request #1612 from cm-schl/master
the-djmaze May 28, 2024
44c0407
access token updated listener
May 31, 2024
5323a1b
Merge pull request #1620 from Murena-SAS/access-token-updated
the-djmaze Jun 3, 2024
1acaa5d
Prepare for #1606
Jun 3, 2024
9633956
Fixed: Undefined $sEmail in DoAdminDomainMatch
Jun 3, 2024
9954e25
Resolve #1609
Jun 3, 2024
ba46e99
Resolve #1608
Jun 4, 2024
e68179c
Add `dateTimestampSource` for #1554
Jun 4, 2024
f4a11c9
Resolve #1607
Jun 4, 2024
d40f211
Added some info about the viewModelTemplateID in the example extension
Jun 4, 2024
b840e52
Update admin.json
hguilbert Jun 4, 2024
3e7eb46
Merge pull request #1622 from hguilbert/patch-23
the-djmaze Jun 4, 2024
2daa299
Update admin.json
tinola Jun 5, 2024
7beb712
Merge pull request #1623 from tinola/master
the-djmaze Jun 5, 2024
92ed4fc
Merge branch 'master' into patch-1
the-djmaze Jun 9, 2024
e0219c0
translate dutch
Jun 9, 2024
02e6198
Improve Decrypt errors
Jun 9, 2024
3bac68d
Improved language detection code
Jun 9, 2024
4538123
Solve *Decrypt does not exists of previous change
Jun 9, 2024
13543e3
Merge pull request #1606 from codiflow/patch-1
the-djmaze Jun 9, 2024
a3fb5a3
Translation strings for #1606
Jun 9, 2024
5d657ab
Update user.json
hguilbert Jun 10, 2024
bc6abee
Update user.json
tinola Jun 10, 2024
740e239
Merge pull request #1630 from tinola/master
the-djmaze Jun 10, 2024
ca67e9f
Merge pull request #1629 from hguilbert/patch-24
the-djmaze Jun 10, 2024
13c76d3
Added for #1545
Jun 10, 2024
ca3d3b4
Merge branch 'master' of github.com:the-djmaze/snappymail
Jun 10, 2024
70e4fed
Allow resize of compose window
Jun 10, 2024
dfe5bba
Update user.json
hguilbert Jun 10, 2024
009eb74
Merge pull request #1631 from hguilbert/patch-25
the-djmaze Jun 10, 2024
fdd1d98
Update user.json
tinola Jun 11, 2024
5d52382
Merge pull request #1632 from tinola/master
the-djmaze Jun 11, 2024
26c3a2c
Add Magnetic theme
TheCuteFoxxy Jun 15, 2024
d2ff0bc
Fix images
TheCuteFoxxy Jun 15, 2024
3e18c52
Update user.json Español
huloza Jun 16, 2024
944d117
Merge pull request #1637 from TheCuteFoxxy/master
the-djmaze Jun 17, 2024
e1b0286
Merge pull request #1638 from huloza/patch-1
the-djmaze Jun 17, 2024
43f54b3
Resized Magnetic theme preview.png #1637
Jun 17, 2024
021b332
Log mailto protocol for #1635
Jun 17, 2024
614715f
Resolve #1641
Jun 23, 2024
8d11ad4
undefined dateTimestampSource
Jun 23, 2024
b2b3dac
Resolve #1640 workaround PHP issue
Jun 23, 2024
e867000
Idea for #1641
Jun 24, 2024
700543c
Changes for #1640
Jun 24, 2024
0b494a1
Added option to load known favicon of domainname
Jun 24, 2024
5a63b02
Cleanup avatars nextcloud handling
Jun 24, 2024
c872e5a
Disable OBJECTID capability by default due to #1640
Jun 25, 2024
26cc746
Resolve type errors #1638
Jun 25, 2024
28aefdd
v2.36.4
Jun 25, 2024
16f71ab
Update Portuguese
ner00 Jun 25, 2024
eda85cb
Resolve #1603
Jun 29, 2024
9f3f41f
Merge pull request #1643 from ner00/master
the-djmaze Jun 29, 2024
7f7ee97
Draft code for #1645
Jul 1, 2024
139d3e6
Small improvements for #1645
Jul 1, 2024
60abc83
#1645 Mail.ReadWrite
Jul 1, 2024
dcfe7d3
Draftcode Microsoft restrictions #1645
Jul 1, 2024
47d18ca
Workaround for #1645
Jul 1, 2024
f177bb2
#1645 requires v2.36.5+
Jul 1, 2024
fad4dea
Resolve #1647
Jul 1, 2024
f49f606
https://github.com/the-djmaze/snappymail/issues/1645#issuecomment-220…
Jul 2, 2024
acaa5ba
#1645 forgot the workaround `?LoginO365` to `/LoginO365`
Jul 2, 2024
ae5c1db
Update user.json
tkasch Jul 4, 2024
cc8ce3f
Update user.json
tkasch Jul 4, 2024
0893a2f
Update user.json
tkasch Jul 4, 2024
4dc9dfa
Update user.json
tkasch Jul 4, 2024
a39f097
Update user.json
tkasch Jul 4, 2024
bebee2f
Update user.json
tkasch Jul 4, 2024
448d5c4
Update admin.json
tkasch Jul 4, 2024
c0a198f
Update admin.json
tkasch Jul 4, 2024
63c5dbb
Update relativetimeformat.js
tkasch Jul 4, 2024
7803bfe
Update admin.json
tkasch Jul 4, 2024
8ceb4e8
Update admin.json
tkasch Jul 4, 2024
9fa5b6b
Update user.json
tkasch Jul 4, 2024
54ef583
Update user.json
tkasch Jul 4, 2024
1a4e2c5
Nextcloud failed loading due to missing app_path
Jul 6, 2024
9771ece
Align save button in admin security settings
Jul 6, 2024
7f64dee
Merge pull request #1651 from tkasch/master
the-djmaze Jul 6, 2024
288ff23
Improved InvalidToken handling for #1653
Jul 7, 2024
7a16529
Detailed error message on account switch failure for #1594
Jul 7, 2024
f8d358a
Added JavaScript `rl-vm-visible` event so that demo extension can pre…
Jul 7, 2024
60c35f7
Added `rl-vm-visible` to the extensions README
Jul 7, 2024
3251971
Bugfix: prevent multiple afterShow() and afterHide() due to `transiti…
Jul 7, 2024
a3d9d98
Made registerProtocolHandler('mailto') optional by activating at Sett…
Jul 7, 2024
f644430
console.log the mailto handler
Jul 7, 2024
cd5ba2b
transitionend listen to `opacity` as `top` changed on resize of view
Jul 7, 2024
1a19d25
Updated gulp to v5 and replaced vulnerable gulp-header with gulp-appe…
Jul 7, 2024
637ec00
Removed abandoned vulnerable rollup-plugin-html
Jul 7, 2024
34a8ff3
Resolve #1649
Jul 7, 2024
823ad47
Update user.json
hguilbert Jul 8, 2024
ed0223f
Improved InvalidToken debugging
Jul 8, 2024
0460731
Merge pull request #1655 from hguilbert/patch-26
the-djmaze Jul 8, 2024
37fd424
Translate dutch
Jul 8, 2024
10450de
Cleanup localizations
Jul 8, 2024
57d1021
Improved cache handling of remote avatars (delayed or not)
Jul 8, 2024
9543634
Resolve #1660
Jul 10, 2024
50e30db
Slightly modified patch code of #1657
Jul 10, 2024
dc49a00
Bugfix: Call to a member function SmtpSettings() on null #1664
Jul 14, 2024
b70860c
Only set flag \Deleted when Trash is set to "do not use"
Jul 14, 2024
3ff2c4f
Hide undeleteCommand command when deleted messages are hidden #1657
Jul 14, 2024
d7bf80e
Merge branch 'master' into mark-for-deletion-issue-1657
Jul 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 4 additions & 4 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
last 3 version
> 1%
ie >= 11
firefox esr
last 1 version
> 30%
not IE 11
not IE_Mob 11
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

server {
listen 80 default;
listen 443 ssl;
Expand Down
File renamed without changes.
31 changes: 31 additions & 0 deletions .docker/dev/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM php:7.4-fpm

RUN apt-get update

RUN apt-get install -y \
git unzip wget zip curl mlocate \
libicu-dev libpcre3-dev libicu-dev \
build-essential chrpath libssl-dev \
libxft-dev libfreetype6 libfreetype6-dev \
libpng-dev libjpeg62-turbo-dev \
libfontconfig1 libfontconfig1-dev libzip-dev libldap2-dev

RUN pecl install xxtea-1.0.11 && \
docker-php-ext-enable xxtea

RUN docker-php-ext-configure intl && \
docker-php-ext-configure ldap && \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ && \
docker-php-ext-install opcache pdo_mysql zip intl gd ldap

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN curl --location --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar && chmod +x /usr/local/bin/phpunit

RUN apt-get -y autoremove && apt-get clean

RUN sed -i '/^;catch_workers_output/ccatch_workers_output = yes' '/usr/local/etc/php-fpm.d/www.conf'

EXPOSE 9000

CMD ["php-fpm"]
8 changes: 8 additions & 0 deletions .docker/dev/php/snappymail.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
date.timezone = UTC
upload_max_filesize = 24M
post_max_size = 25M

# log_errors = On
# display_errors = On
# error_reporting = E_ALL
# error_log = /dev/stderr
6 changes: 0 additions & 6 deletions .docker/node/Dockerfile

This file was deleted.

32 changes: 0 additions & 32 deletions .docker/php/Dockerfile

This file was deleted.

8 changes: 0 additions & 8 deletions .docker/php/rainloop.ini

This file was deleted.

188 changes: 188 additions & 0 deletions .docker/release/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
# syntax=docker/dockerfile:1

FROM alpine:3.18.5 AS builder
RUN apk add --no-cache php82 php82-json php-phar php-zip
RUN apk add --no-cache npm
RUN npm install -g gulp yarn
WORKDIR /source
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
# Patch release.php with hotfix from: https://github.com/xgbstar1/snappymail-docker/blob/main/Dockerfile, so that release.php doesn't fail with error
RUN sed -i 's_^if.*rename.*snappymail.v.0.0.0.*$_if (!!system("mv snappymail/v/0.0.0 snappymail/v/{$package->version}")) {_' cli/release.php || true
RUN php release.php
RUN set -eux; \
VERSION=$( ls build/dist/releases/webmail ); \
ls -al build/dist/releases/webmail/$VERSION/snappymail-$VERSION.tar.gz; \
mkdir -p /snappymail; \
tar -zxvf build/dist/releases/webmail/$VERSION/snappymail-$VERSION.tar.gz -C /snappymail; \
find /snappymail -type d -exec chmod 550 {} \; ; \
find /snappymail -type f -exec chmod 440 {} \; ; \
find /snappymail/data -type d -exec chmod 750 {} \; ; \
# Remove unneeded files
rm -v /snappymail/README.md /snappymail/_include.php

# Inspired by the original Rainloop dockerfile from youtous on GitLab
FROM php:8.2-fpm-alpine AS final

LABEL org.label-schema.description="SnappyMail webmail client image using nginx, php-fpm on Alpine"

# Install dependencies such as nginx
RUN apk add --no-cache ca-certificates nginx supervisor bash

# Install PHP extensions
# apcu
RUN set -eux; \
apk add --no-cache --virtual .build-dependencies $PHPIZE_DEPS; \
pecl install apcu; \
docker-php-ext-enable apcu; \
docker-php-source delete; \
apk del .build-dependencies;

# gd
RUN set -eux; \
apk add --no-cache freetype libjpeg-turbo libpng; \
apk add --no-cache --virtual .deps freetype-dev libjpeg-turbo-dev libpng-dev; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-install gd; \
apk del .deps

# gmagick
# RUN set -eux; \
# apk add --no-cache graphicsmagick libgomp; \
# apk add --no-cache --virtual .deps graphicsmagick-dev libtool; \
# apk add --no-cache --virtual .build-dependencies $PHPIZE_DEPS; \
# pecl install gmagick-2.0.6RC1; \
# docker-php-ext-enable gmagick; \
# docker-php-source delete; \
# apk del .build-dependencies; \
# apk del .deps

# gnupg
RUN set -eux; \
apk add --no-cache gnupg gpgme; \
apk add --no-cache --virtual .deps gpgme-dev; \
apk add --no-cache --virtual .build-dependencies $PHPIZE_DEPS; \
pecl install gnupg; \
docker-php-ext-enable gnupg; \
docker-php-source delete; \
apk del .build-dependencies; \
apk del .deps

# imagick
RUN set -eux; \
apk add --no-cache imagemagick libgomp; \
apk add --no-cache --virtual .deps imagemagick-dev; \
apk add --no-cache --virtual .build-dependencies $PHPIZE_DEPS; \
echo | pecl install imagick; \
docker-php-ext-enable imagick; \
docker-php-source delete; \
apk del .build-dependencies; \
apk del .deps

# intl
RUN set -eux; \
apk add --no-cache icu-libs; \
apk add --no-cache --virtual .deps icu-dev; \
docker-php-ext-configure intl; \
docker-php-ext-install intl; \
apk del .deps

# ldap
RUN set -eux; \
apk add --no-cache libldap; \
apk add --no-cache --virtual .deps openldap-dev; \
docker-php-ext-configure ldap; \
docker-php-ext-install ldap; \
apk del .deps

# mysql
RUN docker-php-ext-install pdo_mysql

# opcache
RUN docker-php-ext-install opcache

# postgres
RUN set -eux; \
apk add --no-cache postgresql-libs; \
apk add --no-cache --virtual .deps postgresql-dev; \
docker-php-ext-install pdo_pgsql; \
apk del .deps

# redis
RUN set -eux; \
apk add --no-cache liblzf zstd-libs; \
apk add --no-cache --virtual .deps zstd-dev; \
apk add --no-cache --virtual .build-dependencies $PHPIZE_DEPS; \
pecl install igbinary; \
docker-php-ext-enable igbinary; \
pecl install --configureoptions 'enable-redis-igbinary="yes" enable-redis-lzf="yes" enable-redis-zstd="yes"' redis; \
docker-php-ext-enable redis; \
docker-php-source delete; \
apk del .build-dependencies; \
apk del .deps

# tidy
RUN set -eux; \
apk add --no-cache tidyhtml; \
apk add --no-cache --virtual .deps tidyhtml-dev; \
docker-php-ext-install tidy; \
apk del .deps

# uuid
RUN set -eux; \
apk add --no-cache libuuid; \
apk add --no-cache --virtual .deps util-linux-dev; \
apk add --no-cache --virtual .build-dependencies $PHPIZE_DEPS; \
pecl install uuid; \
docker-php-ext-enable uuid; \
docker-php-source delete; \
apk del .build-dependencies; \
apk del .deps

# xxtea - Manually install php8 compatible version from https://github.com/xxtea/xxtea-pecl master branch
RUN set -eux; \
apk add --no-cache --virtual .build-dependencies $PHPIZE_DEPS; \
wget -q https://github.com/xxtea/xxtea-pecl/tarball/3f5888a29045e12301254151737c5dab4523a1c1 -O xxtea.tar; \
echo '9cbfd9c27255767deb26ddedf69e738d401d88ac9762d82c8510f9768842ca18 xxtea.tar' | sha256sum -c -; \
tar -C /usr/src -xvf xxtea.tar; \
cd /usr/src/xxtea-xxtea-pecl-3f5888a; \
phpize; \
./configure --with-php-config=/usr/local/bin/php-config --enable-xxtea=yes; \
make install; \
docker-php-ext-enable xxtea; \
cd -; \
rm -fv xxtea.tar; \
rm -rfv /usr/src/xxtea*; \
apk del .build-dependencies;

# zip
RUN set -eux; \
apk add --no-cache libzip; \
apk add --no-cache --virtual .deps libzip-dev; \
docker-php-ext-install zip; \
apk del .deps

# Install snappymail
# The 'www-data' user/group in alpine is 82:82. The 'nginx' user/group in alpine is 101:101, and is part of www-data group
COPY --chown=www-data:www-data --from=builder /snappymail /snappymail
# Use a custom snappymail data folder
RUN mv -v /snappymail/data /var/lib/snappymail;
# Setup configs
COPY --chown=root:root .docker/release/files /
RUN set -eux; \
chown www-data:www-data /snappymail/include.php; \
chmod 440 /snappymail/include.php; \
chmod +x /entrypoint.sh; \
# Disable the built-in php-fpm configs, since we're using our own config
mv -v /usr/local/etc/php-fpm.d/docker.conf /usr/local/etc/php-fpm.d/docker.conf.disabled; \
mv -v /usr/local/etc/php-fpm.d/www.conf /usr/local/etc/php-fpm.d/www.conf.disabled; \
mv -v /usr/local/etc/php-fpm.d/zz-docker.conf /usr/local/etc/php-fpm.d/zz-docker.conf.disabled;

USER root
WORKDIR /snappymail
VOLUME /var/lib/snappymail
EXPOSE 8888
EXPOSE 9000
ENTRYPOINT []
CMD ["/entrypoint.sh"]
80 changes: 80 additions & 0 deletions .docker/release/files/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/bin/sh
set -eu

DEBUG=${DEBUG:-}
if [ "$DEBUG" = 'true' ]; then
set -x
fi
UPLOAD_MAX_SIZE=${UPLOAD_MAX_SIZE:-25M}
MEMORY_LIMIT=${MEMORY_LIMIT:-128M}
SECURE_COOKIES=${SECURE_COOKIES:-true}

# Set attachment size limit
sed -i "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /usr/local/etc/php-fpm.d/php-fpm.conf /etc/nginx/nginx.conf
sed -i "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /usr/local/etc/php-fpm.d/php-fpm.conf

# Secure cookies
if [ "${SECURE_COOKIES}" = 'true' ]; then
echo "[INFO] Secure cookies activated"
{
echo 'session.cookie_httponly = On';
echo 'session.cookie_secure = On';
echo 'session.use_only_cookies = On';
} > /usr/local/etc/php/conf.d/cookies.ini;
fi

echo "[INFO] Snappymail version: $( ls /snappymail/snappymail/v )"

# Set permissions on snappymail data
echo "[INFO] Setting permissions on /var/lib/snappymail"
chown -R www-data:www-data /var/lib/snappymail/
chmod 550 /var/lib/snappymail/
find /var/lib/snappymail/ -type d -exec chmod 750 {} \;

# Create snappymail default config if absent
SNAPPYMAIL_CONFIG_FILE=/var/lib/snappymail/_data_/_default_/configs/application.ini
if [ ! -f "$SNAPPYMAIL_CONFIG_FILE" ]; then
echo "[INFO] Creating default Snappymail configuration: $SNAPPYMAIL_CONFIG_FILE"
# Run snappymail and exit. This populates the snappymail data directory and generates the config file
# On error, print php exception and exit
EXITCODE=
su - www-data -s /bin/sh -c 'php /snappymail/index.php' > /tmp/out || EXITCODE=$?
if [ -n "$EXITCODE" ]; then
cat /tmp/out
exit "$EXITCODE"
fi
fi

echo "[INFO] Overriding values in snappymail configuration: $SNAPPYMAIL_CONFIG_FILE"
# Enable output of snappymail logs
sed '/^\; Enable logging/{
N
s/enable = Off/enable = On/
}' -i $SNAPPYMAIL_CONFIG_FILE
# Redirect snappymail logs to stderr /stdout
sed 's/^filename = .*/filename = "stderr"/' -i $SNAPPYMAIL_CONFIG_FILE
sed 's/^write_on_error_only = .*/write_on_error_only = Off/' -i $SNAPPYMAIL_CONFIG_FILE
sed 's/^write_on_php_error_only = .*/write_on_php_error_only = On/' -i $SNAPPYMAIL_CONFIG_FILE
# Always enable snappymail Auth logging
sed 's/^auth_logging = .*/auth_logging = On/' -i $SNAPPYMAIL_CONFIG_FILE
sed 's/^auth_logging_filename = .*/auth_logging_filename = "auth.log"/' -i $SNAPPYMAIL_CONFIG_FILE
sed 's/^auth_logging_format = .*/auth_logging_format = "[{date:Y-m-d H:i:s}] Auth failed: ip={request:ip} user={imap:login} host={imap:host} port={imap:port}"/' -i $SNAPPYMAIL_CONFIG_FILE
sed 's/^auth_syslog = .*/auth_syslog = Off/' -i $SNAPPYMAIL_CONFIG_FILE

(
while ! nc -vz -w 1 127.0.0.1 8888 > /dev/null 2>&1; do echo "[INFO] Checking whether nginx is alive"; sleep 1; done
while ! nc -vz -w 1 127.0.0.1 9000 > /dev/null 2>&1; do echo "[INFO] Checking whether php-fpm is alive"; sleep 1; done
# Create snappymail admin password if absent
SNAPPYMAIL_ADMIN_PASSWORD_FILE=/var/lib/snappymail/_data_/_default_/admin_password.txt
if [ ! -f "$SNAPPYMAIL_ADMIN_PASSWORD_FILE" ]; then
echo "[INFO] Creating Snappymail admin password file: $SNAPPYMAIL_ADMIN_PASSWORD_FILE"
wget -T 1 -qO- 'http://127.0.0.1:8888/?/AdminAppData/0/12345/' > /dev/null
echo "[INFO] Snappymail Admin Panel ready at http://localhost:8888/?admin. Login using password in $SNAPPYMAIL_ADMIN_PASSWORD_FILE"
fi

wget -T 1 -qO- 'http://127.0.0.1:8888/' > /dev/null
echo "[INFO] Snappymail ready at http://localhost:8888/"
) &

# RUN !
exec /usr/bin/supervisord -c /supervisor.conf --pidfile /run/supervisord.pid
Loading
Loading