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

Attachement reminder #2105

Open
wants to merge 5,422 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
5422 commits
Select commit Hold shift + click to select a range
2ea68e8
Translate "UNDELETE" in Dutch
Jul 14, 2024
b214ba0
Update user.json
hguilbert Jul 15, 2024
9303c48
Update user.json
tinola Jul 15, 2024
3161961
Resolve #1663
Jul 15, 2024
0b495b1
Merge pull request #1668 from tinola/master
the-djmaze Jul 15, 2024
082f105
Merge pull request #1667 from hguilbert/patch-27
the-djmaze Jul 15, 2024
becaaaa
Resolve #1654
Jul 15, 2024
d10e4ba
Merge branch 'master' of github.com:the-djmaze/snappymail
Jul 15, 2024
ad81e3f
Added mime types multipart/report and message/global-delivery-status
Jul 15, 2024
e4316e6
Resolve #1666
Jul 15, 2024
4a56d2d
Add Search Filters Plugin with Gmail-like Functionality
AbdoBnHesham Jul 18, 2024
f21dd94
Add change-password-mailcow driver
judev Jul 25, 2024
de26a00
Improvement #1657
Aug 5, 2024
f89a8c3
Merge pull request #1688 from cuttlefish-uk/master
the-djmaze Aug 5, 2024
85fb2ff
Merge pull request #1673 from AbdoBnHesham/master
the-djmaze Aug 5, 2024
3a8af7d
Some bugfixes for #1673
Aug 5, 2024
cc04a82
Resolve #1686
Aug 6, 2024
4e8f12a
Resolve #1691
Aug 6, 2024
d2f3aa1
Resolve #1690
Aug 6, 2024
166b790
Preparations for #1689
Aug 6, 2024
c0ed491
Bugfix: Division by zero #1694
Aug 6, 2024
505e6e2
Improve RFC 2822 date parser due to PHP createFromFormat() shortcomings
Aug 6, 2024
15f4ba5
Bugfix: Nextcloud language detection
Aug 6, 2024
b3a94c3
Nextcloud extension bump version number
Aug 6, 2024
2f90d95
Set author for #1673
Aug 6, 2024
3fb700f
Add exception trace to log for #1648
Aug 6, 2024
aa52d2e
Resolve #1689
Aug 6, 2024
fa15742
Ask for closing Identity popup when empty and not saving #1689
Aug 6, 2024
c33dd8f
Centralize tryToClose() for all popups
Aug 6, 2024
b8f7f75
Fix capabilities when THREAD is disabled
akhil1508 Aug 8, 2024
97c0f81
allow multi-account in nc with oauth login
Aug 6, 2024
25428c7
Merge branch 'master' of https://github.com/Murena-SAS/snappymail int…
akhil1508 Aug 8, 2024
ae74f21
Also check if the account has been defined in setting
akhil1508 Aug 8, 2024
50265b3
Also perform logout if explicit creds change
akhil1508 Aug 8, 2024
a969179
Make #1689 optional through application.ini
Aug 11, 2024
ec8da2b
Merge pull request #1698 from Murena-SAS/dev/fix-set-capabilities
the-djmaze Aug 11, 2024
22988b4
Merge pull request #1699 from Murena-SAS/dev/nc-oauth-multiaccount
the-djmaze Aug 11, 2024
6c9812e
Drop `md5(file_get_contents(DATA.php))` because i think nobody used t…
Aug 11, 2024
83a71b0
Don't use focusedMessage for active menu items, it could confuse
Aug 12, 2024
13cb08f
FileStorage strict properties
Aug 12, 2024
8c6f0ad
Improved handling of RFC 2822 dates #1694
Aug 12, 2024
55d7d52
Use PHP_SAPI
Aug 12, 2024
486bbba
Bugfix: Attempt to read property "smimeSigned" on null
Aug 12, 2024
03a8e6a
v2.37.0
Aug 12, 2024
cc9bc3d
Bugfix: Gulp v5 broke copying fonts.
Aug 12, 2024
0dedeb0
v2.37.1
Aug 12, 2024
6d477aa
Validate Fetch JSON response for #1703
Aug 12, 2024
6ad92b9
Prevent logout loop on error
Aug 12, 2024
d87c46f
Show content-type error on login
Aug 12, 2024
3ba75fe
Resolve #1703
Aug 12, 2024
17c4f87
v2.37.2 for Nextcloud
Aug 12, 2024
e22414d
Resolve #1645
Aug 12, 2024
1395d50
v2.37.2
Aug 13, 2024
2aeeb70
Update zh, zh-TW translations
Artoria2e5 Aug 15, 2024
02ea6c4
Resolve #1710
Aug 16, 2024
d00c953
Change handling of (token) errors due to #1706
Aug 16, 2024
423f5ba
Resolve #1709
Aug 16, 2024
5987ccd
Merge pull request #1712 from Artoria2e5/zh-update
the-djmaze Aug 19, 2024
e5a176f
Added editing of ACL rules #157
Aug 20, 2024
c091064
Small UI fix for #157
Aug 20, 2024
a761bdc
Small cleanup of #157
Aug 20, 2024
7ff5232
Resolve #1574
Aug 20, 2024
6a1b83b
Resolve #1678
Aug 20, 2024
113003f
Improved domain autoconfig interaction
Aug 20, 2024
0dda102
Added turndown.js for #1604
Aug 20, 2024
612b5a8
Simplify sieve scripts list #1675
Aug 21, 2024
5b2b7b0
Parse error #1712
Aug 25, 2024
2ac71fe
Localization strings for ACL #157
Aug 25, 2024
9c0d319
Fix CRLF #1712
Aug 25, 2024
cb7dafb
Cleanup Cacher handling and added some documentation
Aug 25, 2024
34f730a
Added markedjs for #1604
Aug 25, 2024
a442322
Update user.json
hguilbert Aug 26, 2024
4a8fea8
Merge pull request #1717 from hguilbert/patch-28
the-djmaze Aug 26, 2024
daf02e5
Resolve #1706
Aug 26, 2024
59652d2
Mark images with width=1 as tracking pixel
Aug 26, 2024
547953e
Resolve #1718
Aug 26, 2024
780e1f9
Make sure only scalar values are allowed in $_ENV #1719
Aug 27, 2024
9e2b9a9
Show GnuPG version for #1560
Aug 27, 2024
3306fad
MS autodiscover priorities DNS over subdomain
Aug 27, 2024
9e3d6c6
Show warning in Admin -> About when PHP runs in 32bit
Aug 27, 2024
1ac4f05
Sabre/Xml v4.0.5
Aug 27, 2024
5e4520e
Force Nextcloud personal language by default #1428
Aug 27, 2024
1ad946d
v2.37.3
Aug 27, 2024
1c1682a
Update Portuguese
ner00 Aug 27, 2024
589606e
SETTINGS_GENERAL/MAILTO
ner00 Aug 27, 2024
082dd3a
Bugfix: Call to a member function Email() on null #1706
Aug 27, 2024
9d488b0
Merge pull request #1722 from ner00/master
the-djmaze Aug 27, 2024
6ebf273
Resolve #1724
Aug 27, 2024
ed7a2bd
Resolve #1725
Aug 27, 2024
366ca05
Bugfix: application/pgp-encrypted attachments not listed
Aug 29, 2024
d0fb4ee
Improved clear cookie handling
Aug 29, 2024
0db6c6a
Bugfix: `use_local_proxy_for_external_images` is part of `labs`, not …
Aug 29, 2024
d3b0d6c
Debug Turndown ES2020 #1604
Sep 14, 2024
8fb7067
Added option to convert HTML to Markdown instead of plain, using Turn…
Sep 14, 2024
c58b89d
Update user.json
hguilbert Sep 14, 2024
9be861d
Merge pull request #1749 from hguilbert/patch-29
the-djmaze Sep 14, 2024
947ce59
RTL language improvement from #1744 by @rezaei92
Sep 15, 2024
deae36d
Use Squire 2.3.2 from https://github.com/the-djmaze/Squire/commits/sn…
Sep 15, 2024
48acb9c
Squire bugfixes
Sep 15, 2024
12b6ed3
Improved SquireUI handling of pathChange and bugfix `bold` match
Sep 15, 2024
9a7ff9f
Resolve #1715
Sep 15, 2024
80f3331
Update Squire with SnappyMail changes
Sep 15, 2024
ed41d8e
Implemen #1737 including an i18n fix
Sep 15, 2024
61e7c00
Resolve #1746
Sep 16, 2024
f8520c2
Bump version number
Sep 16, 2024
6f4f6bf
Improved attempt for #1746
Sep 16, 2024
e0236ea
Resolve #1733
Sep 16, 2024
18452cc
Also prevent error for #1733
Sep 16, 2024
05812c6
Updated custom Squire 2.3.2
Sep 16, 2024
cfbc474
cleanHtml use allowedTags instead of disallowedTags and improved CSS …
Sep 16, 2024
96b7f9d
Update SECURITY.md
the-djmaze Sep 16, 2024
bd2ffe5
v2.38.0
Sep 16, 2024
a6ff022
Resolve #1754
Sep 17, 2024
0263f8f
Use the custom Squire as submodule vendors/squire2
Sep 17, 2024
4e3a7a6
PHP 8.4: Implicitly nullable parameter declarations deprecated
Sep 17, 2024
e354fcb
new plugin for ics view, based on ical lib
PhieF Sep 17, 2024
02ef7c8
Merge pull request #1745 from Murena-SAS/dev/new-view-ics-plugin
the-djmaze Sep 17, 2024
b5ff818
Bugfix: event.organizer could be undefined #1745
Sep 17, 2024
32da821
Replaced ical.es5.min.cjs with ical.js v2.1.0 for #1745
Sep 17, 2024
365392e
Bugfix: Admin - Config `search` should be ko.observable() not ko.obse…
Sep 17, 2024
33b509c
Added Admin - Extensions search filter
Sep 17, 2024
74c7948
Improved ical parsing for "view-ics" extension
Sep 17, 2024
2f0732d
fix en
bilogic Sep 18, 2024
5f1dd7f
fix lv
bilogic Sep 18, 2024
e3c53f8
Merge pull request #1759 from bilogic/case-correction
the-djmaze Sep 18, 2024
16cc17a
Change for #1706 to debug more
Sep 18, 2024
5056ecf
Bugfix: ClientException #1706
Sep 20, 2024
2341dd9
Added mapping for sSmtpUser
Sep 20, 2024
a4299c5
Fix extensions with `login.credentials` hook parameters
Sep 20, 2024
56db749
Resolve #1716
Sep 20, 2024
d3ecfdc
Changes for #1706
Sep 21, 2024
5c45cf3
Update Portuguese
ner00 Sep 21, 2024
7ba8de1
Merge pull request #1768 from ner00/master
the-djmaze Sep 21, 2024
88a66d6
Resolve #1761
Sep 21, 2024
3576c22
Resolve #1726
Sep 21, 2024
f7b1981
Update user.json
hguilbert Sep 22, 2024
04f3133
Some small idea changes
Sep 22, 2024
93cc623
Bugfix for #1709
Sep 22, 2024
109a110
Resolve #1770
Sep 22, 2024
d80fe8b
fix spacing
Sep 22, 2024
279cad0
Update user.json
tinola Sep 22, 2024
ce3596f
Merge pull request #1771 from tinola/master
the-djmaze Sep 23, 2024
0a3a5f6
Merge pull request #1769 from hguilbert/patch-30
the-djmaze Sep 23, 2024
c773b85
Improve sieve parser
Sep 23, 2024
257d920
Improved Sieve parser validation
Sep 23, 2024
61c2eef
Fix Sieve QuotedString handling
Sep 23, 2024
4022d39
Some Sieve parser improvements
Sep 23, 2024
92a6027
Improved Knockout property binding error
Sep 23, 2024
3893849
Fix Sieve math-type and comparator handling
Sep 24, 2024
1b0dd48
KnockoutJS don't throw error when property is not observable
Sep 24, 2024
9325255
Keep 1 space between HTML elements
Sep 24, 2024
c14bbab
KnockoutJS remove `with($context)` scope for faster access
Sep 24, 2024
6b03820
Resolve #1746
Sep 24, 2024
85ac404
Drop support for noembed and noframes
Sep 24, 2024
3931c11
Added extension info to Admin -> Extensions -> Popup
Sep 24, 2024
198cc85
O365 option to use Azure or Personal accounts #1645
Sep 29, 2024
dc7eed4
Resolve #1780
Sep 29, 2024
1262081
Bugfix: composer dialog scroll got broken in v2.28
Sep 30, 2024
9b5eaf4
Bugfix: Composer dialog "from" triangle wrong position due to font ch…
Sep 30, 2024
beb4180
Squire: prevent collapse of empty elements so that the caret can be p…
Sep 30, 2024
f43c2c9
Squire sanitizeToDOMFragment use cleanHTML
Sep 30, 2024
4b802c0
Fixed the translation of the fields MIDDLE_NAME, NAME_PREFIX, NAME_SU…
Sep 30, 2024
584728b
Squire: improved handling of BR elements
Oct 1, 2024
f7f8d2d
Bugfix the new msgId handling due to Squire sanitizeToDOMFragment usi…
Oct 1, 2024
b3d6c33
Merge pull request #1785 from mstolf/bugfix_translate_ptBr
the-djmaze Oct 1, 2024
68045f5
Resolve #1787
Oct 1, 2024
0ecd052
Merge branch 'master' of github.com:the-djmaze/snappymail
Oct 1, 2024
d3de9fa
Update user.json
tinola Oct 2, 2024
3f8f17a
Update admin.json
tinola Oct 2, 2024
115f8c8
In Order to https://github.com/nextcloud/server/pull/45819 this chang…
Oct 2, 2024
fafaaf2
Merge pull request #1788 from tinola/master
the-djmaze Oct 2, 2024
907a9ce
Remove ""
Oct 3, 2024
0520a54
Merge pull request #1790 from gnilebein/45819--Adjust-Boarder-Radius
the-djmaze Oct 3, 2024
d6ef5ff
Squire paste image working again.
Oct 6, 2024
f41ee21
Merge branch 'master' of github.com:the-djmaze/snappymail
Oct 6, 2024
03d99f1
Resolve #1765
Oct 6, 2024
ef724b4
Resolve #1775
Oct 6, 2024
ba85eda
Remove #1737
Oct 6, 2024
28a8e3c
Added the proper logging for #1706
Oct 8, 2024
6f2f40b
Prepare for #1793
Oct 8, 2024
0a4cea5
make sure that KO bindings are re-applied
SergeyMosin Oct 8, 2024
48b0519
use 'Utils.cleanHtml' as pasteSanitizer + minor tweaks
SergeyMosin Oct 8, 2024
e7ecf53
bump version to v1.0.5
SergeyMosin Oct 8, 2024
b86743d
Resolve #1706
Oct 8, 2024
1564815
Merge pull request #1796 from SergeyMosin/compact-composer-plugin-v1.0.5
the-djmaze Oct 8, 2024
ececfae
v2.38.1
Oct 8, 2024
cb9e1b0
Resolve #1797
Oct 9, 2024
904a353
Secure ko template bindings?
Oct 9, 2024
e345550
v2.38.2
Oct 9, 2024
82ab4c4
Use CSS instead of $index #1797
Oct 9, 2024
9eb7f38
KnockoutJS secure bindings using Proxy
Oct 9, 2024
16106a2
Resolve #1798
Oct 10, 2024
055c0d3
Added setting for default messages sort mode
Oct 10, 2024
42c98d4
Update user.json
hguilbert Oct 11, 2024
838e73f
Update user.json
tinola Oct 11, 2024
3d970e4
Merge pull request #1800 from tinola/master
the-djmaze Oct 13, 2024
0ef2987
Merge pull request #1799 from hguilbert/patch-31
the-djmaze Oct 13, 2024
5861124
Update user.json
romawkafor Oct 14, 2024
35914c0
Create uk.ini
romawkafor Oct 14, 2024
6307470
Create uk.ini
romawkafor Oct 14, 2024
583528c
Update cs.ini
romawkafor Oct 14, 2024
bc6de6c
Update en.ini
romawkafor Oct 14, 2024
6bc658b
Update hu.ini
romawkafor Oct 14, 2024
5d679b5
Update it.ini
romawkafor Oct 14, 2024
64f74d0
Update zh.ini
romawkafor Oct 14, 2024
7aa87da
Create admin.json
romawkafor Oct 14, 2024
a1f890e
Update user.json
romawkafor Oct 14, 2024
f877b84
Merge pull request #1810 from romawkafor/master
the-djmaze Oct 15, 2024
fdc1a1c
Update user.json
romawkafor Oct 15, 2024
78547e8
Resolve #1806
Oct 15, 2024
012c110
Merge branch 'master' of github.com:the-djmaze/snappymail
Oct 15, 2024
4f6783a
Bugfix: sortMode undefined at login
Oct 22, 2024
6bdd509
Cleanup knockout a bit
Oct 22, 2024
3a589e2
Proper fix for default sortMode
Oct 22, 2024
bce9758
Fix Knockout binding non-Observable notice
Oct 22, 2024
b01072e
Improved some templates
Oct 22, 2024
f0b3d79
IdentityModel extends EmailModel
Oct 22, 2024
534b71e
On reply, set `from` field to the received email `to` field #1805
Oct 22, 2024
332f9a7
Merge pull request #1816 from romawkafor/master
the-djmaze Oct 22, 2024
c50edb8
Update Portuguese
ner00 Oct 23, 2024
cab3b2b
Merge pull request #1822 from ner00/master
the-djmaze Oct 27, 2024
709d672
Resolve #1815
Oct 27, 2024
64e780e
Resolve #1813
Oct 27, 2024
1b4bf3b
Rename Identity.formattedName to Identity.toString
Oct 28, 2024
f12de9a
Improve contacts layout
Oct 28, 2024
490d808
Speedup handling of identical avatars
Oct 28, 2024
8645b0a
Speedup identicons by caching them
Oct 29, 2024
a83c3aa
Set identicon in cache when loading remote avatar fails
Oct 29, 2024
2809e75
Preload identicon on delayed avatar lookup
Oct 29, 2024
3d55bda
Added test contacts CardDAV settings
Oct 29, 2024
c744b83
Put knockout bind context Proxy outside bindingFunction
Oct 29, 2024
4cd5774
ko.utils.domNodeDisposal.addDisposeCallback to ko.addDisposeCallback
Oct 29, 2024
bc6a2b6
Cleanup KnockoutJS a bit
Oct 30, 2024
91ff43e
Resolve #1828
Nov 11, 2024
0d5d403
Resolve #1825
Nov 11, 2024
8b55471
Only allow Proxy for logged in users
Nov 11, 2024
3ee9784
Add dmarc and spf indicators in mail view #1820
edlerd Nov 12, 2024
95af4f6
update squire to v2.3.2 and fix willPaste listener/sanitizer
SergeyMosin Nov 16, 2024
66553a3
Improvements for #1846
Nov 18, 2024
d301b93
Merge pull request #1845 from SergeyMosin/compact-composer-plugin-v1.0.6
the-djmaze Nov 18, 2024
18da535
Show icon if no information is avilable on dkip, dmark or spf
edlerd Nov 18, 2024
cd3398d
Resolve #1850
Nov 26, 2024
7a46560
Resolve #1849
Nov 26, 2024
7eaa065
Merge pull request #1843 from edlerd/add-spf-dmarc
the-djmaze Nov 26, 2024
2143051
Finished czech translation of Snappymail
lenny87 Dec 4, 2024
0ffd97a
Fixed typo in Spam folder name
lenny87 Dec 4, 2024
e16d0b5
Update Html.js to remove x-html tags before rendering
hungyao Dec 7, 2024
149cf5a
Merge pull request #1861 from hungyao/patch-1
the-djmaze Dec 10, 2024
208b1fa
Merge pull request #1857 from lenny87/cs-translation
the-djmaze Dec 10, 2024
8bf4727
Also detect Identity using `from` address #1865
Dec 10, 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