Compare commits
155 Commits
v0.1.0rc2
...
developmen
Author | SHA1 | Date | |
---|---|---|---|
0a6d74c168 | |||
9edc9a8484 | |||
b776eff79d | |||
80f22a54a3 | |||
7567975978 | |||
dc5d886071 | |||
3ed883cd61 | |||
6752d9d50c | |||
944a4440f7 | |||
8b2ee6a36c | |||
2f915170de | |||
fc9b809c8c | |||
628c69d038 | |||
98e3eaebaa | |||
c230500308 | |||
bfe18ba5b1 | |||
f3ad9e1fd5 | |||
ffd904fefb | |||
581fd0ad94 | |||
cb39d3d9e5 | |||
baf78170a3 | |||
d7ddb6c9a3 | |||
a41700657b | |||
5bfe149a8e | |||
22f20cfb2f | |||
f370e8d228 | |||
cceae85cf5 | |||
213b93b90f | |||
7da46191a2 | |||
ea2363fdfe | |||
ee82136675 | |||
00ab03db9e | |||
5bfab98805 | |||
b5428274cd | |||
f221e59ec6 | |||
532104c39b | |||
623de8f394 | |||
a86dc97f38 | |||
b28e751888 | |||
e224ea1389 | |||
8f887e0d51 | |||
d844bc463f | |||
851be7b2c5 | |||
ecf0c6f713 | |||
f52a33588c | |||
cd8331491f | |||
8b21355cc9 | |||
336f379caf | |||
f9a76f4750 | |||
ed44b3f8d8 | |||
f90b169edb | |||
030eaf66e5 | |||
255a172669 | |||
d1a8221525 | |||
51a6c3da27 | |||
6a0c8bf909 | |||
bc7efc671f | |||
761a55b5cd | |||
4e7236c22d | |||
5a59db1baa | |||
b192a78d72 | |||
15f1a9d785 | |||
6d63ad46c7 | |||
9da1a997a8 | |||
5386e2c89a | |||
d9340483e1 | |||
7ac72772aa | |||
e65722e443 | |||
b0933d6977 | |||
6c1ca76b54 | |||
cc7869305c | |||
766a5287b8 | |||
9301c5213d | |||
1a827e2e64 | |||
627940ce21 | |||
c267836c2e | |||
c848780231 | |||
f7b9e5a331 | |||
d9a926e2e4 | |||
d870d23613 | |||
88c6d6c9bc | |||
66f1043d68 | |||
aba5245cc1 | |||
05945af63e | |||
fab6d84cd9 | |||
340109de1b | |||
0b46390688 | |||
08406c33ab | |||
5d1fd43839 | |||
5729d5a48d | |||
582f361e2d | |||
1266420d02 | |||
0275e7e001 | |||
7e7fb7e4c2 | |||
67ce4e3b4d | |||
6aa3fbfaeb | |||
1166cd3baa | |||
df3d8d782a | |||
732bd5b472 | |||
11c96c793f | |||
f7a54b8904 | |||
ad6f039626 | |||
b0b4b8c420 | |||
6e7e64a0ba | |||
2adfd1540a | |||
ae5f551031 | |||
49ec4656d4 | |||
1449576420 | |||
5d74c8bfab | |||
482636229f | |||
6a77453eb5 | |||
3b40054683 | |||
a7f7db46c6 | |||
3ee846b3b6 | |||
6d453e5c94 | |||
cab22cebfa | |||
00ffad5939 | |||
b1b5fc2060 | |||
779fcbddf4 | |||
9ee42f14fb | |||
995ce07c8c | |||
9324acbe24 | |||
6fb1c106b2 | |||
dae6bd4649 | |||
c8b47d69a0 | |||
80ccaaa6e7 | |||
e872534aec | |||
c2dfe0ba29 | |||
6d4fb11c43 | |||
9acc37ec4f | |||
c290206392 | |||
bfcb346924 | |||
f22931e6f0 | |||
235aa8d7cc | |||
6fc3897205 | |||
6409627dae | |||
88689c87ac | |||
9a0df52cd9 | |||
4c106025d5 | |||
aa461590a8 | |||
808ca861ed | |||
7261769a95 | |||
1c6b3a3617 | |||
88bfc64940 | |||
a866bd82b8 | |||
676546f71c | |||
2b497fd2cf | |||
de72f0e74d | |||
300961aaff | |||
c30efc8bd6 | |||
29c6d6f730 | |||
840e2ad5ae | |||
d6b2b5b40e | |||
64093a6aad | |||
e2e704c545 |
4
.cz.yaml
4
.cz.yaml
@ -2,6 +2,6 @@ commitizen:
|
||||
bump_message: "build(version): bump version $current_version \u2192 $new_version"
|
||||
changelog_incremental: false
|
||||
name: cz_conventional_commits
|
||||
tag_format: v$major.$minor.$patch$prerelease
|
||||
tag_format: $major.$minor.$patch$prerelease
|
||||
update_changelog_on_bump: true
|
||||
version: 0.1.0rc2
|
||||
version: 0.1.0
|
||||
|
163
.gitlab-ci.yml
163
.gitlab-ci.yml
@ -1,151 +1,38 @@
|
||||
stages:
|
||||
- validation
|
||||
- build
|
||||
- prepare
|
||||
- test
|
||||
- release
|
||||
- sync
|
||||
- publish
|
||||
---
|
||||
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
MY_PROJECT_ID: "33611657"
|
||||
|
||||
include:
|
||||
- project: nofusscomputing/projects/gitlab-ci
|
||||
ref: 36ce0b0b76e6769c7a2e0d4ea0f3fcd2cc2d6bb1
|
||||
ref: development
|
||||
file:
|
||||
- conventional_commits/.gitlab-ci.yml
|
||||
- validation/.gitlab-ci.yml
|
||||
- gitlab_release/.gitlab-ci.yml
|
||||
- git_push_mirror/.gitlab-ci.yml
|
||||
- .gitlab-ci_common.yaml
|
||||
- template/automagic.gitlab-ci.yaml
|
||||
|
||||
|
||||
variables:
|
||||
DOCKER_IMAGE_BUILD_TARGET_PLATFORMS: "linux/amd64,linux/arm64"
|
||||
DOCKER_IMAGE_PUBLISH_NAME: 'docker-mail'
|
||||
DOCKER_IMAGE_PUBLISH_REGISTRY: docker.io/nofusscomputing
|
||||
DOCKER_IMAGE_PUBLISH_URL: https://hub.docker.com/r/nofusscomputing/$DOCKER_IMAGE_PUBLISH_NAME
|
||||
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
GIT_SYNC_URL: "https://$GITHUB_USERNAME_ROBOT:$GITHUB_TOKEN_ROBOT@github.com/NoFussComputing/docker-mail.git"
|
||||
MY_PROJECT_ID: "33611657"
|
||||
PAGES_ENVIRONMENT_PATH: projects/docker-mail/
|
||||
|
||||
|
||||
|
||||
|
||||
Markdown Linting:
|
||||
extends:
|
||||
- .Lint_Markdown
|
||||
|
||||
Docker Container:
|
||||
stage: build
|
||||
image: docker:latest
|
||||
services:
|
||||
- docker:19.03.12-dind
|
||||
before_script:
|
||||
- docker info
|
||||
# - docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
- apk update
|
||||
- apk add --update --no-cache python3 git && ln -sf python3 /usr/bin/python
|
||||
- python3 -m ensurepip
|
||||
- pip3 install -r gitlab-ci/gitlab_release/requirements.txt
|
||||
- pip3 install gitlab-ci/gitlab_release/python-module/cz_nfc/.
|
||||
script: |
|
||||
docker build . \
|
||||
--label org.opencontainers.image.created="$(date '+%Y-%m-%d %H:%M:%S%:z')" \
|
||||
--label org.opencontainers.image.documentation="$CI_PROJECT_URL/pages" \
|
||||
--label org.opencontainers.image.source="$CI_PROJECT_URL" \
|
||||
--label org.opencontainers.image.url="$CI_PROJECT_URL/-/releases/v$(cz -n cz_nfc version --project)" \
|
||||
--label org.opencontainers.image.version="$(cz -n cz_nfc version --project)" \
|
||||
--label org.opencontainers.image.revision="$CI_COMMIT_SHA" \
|
||||
--no-cache \
|
||||
--tag $CI_REGISTRY_IMAGE/docker-mail:$CI_COMMIT_SHA;
|
||||
|
||||
docker image inspect $CI_REGISTRY_IMAGE/docker-mail:$CI_COMMIT_SHA;
|
||||
|
||||
docker push $CI_REGISTRY_IMAGE/docker-mail:$CI_COMMIT_SHA;
|
||||
|
||||
# after_script:
|
||||
# - docker push $CI_REGISTRY_IMAGE/docker-mail:$CI_COMMIT_SHA
|
||||
allow_failure: true
|
||||
Compile Dovecot:
|
||||
extends: .build_docker_container
|
||||
variables:
|
||||
DOCKER_DOCKERFILE: dockerfile-compile
|
||||
DOCKER_IMAGE_BUILD_TARGET_PLATFORMS: "linux/arm64"
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: on_success
|
||||
- if: '$CI_COMMIT_BRANCH == "development" && $CI_COMMIT_TITLE =~ /Merge branch.*/'
|
||||
when: on_success
|
||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
when: never
|
||||
- if: '$CI_COMMIT_BRANCH != "master"'
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
- if: '$CI_COMMIT_BRANCH != "master" && $CI_PIPELINE_SOURCE == "push"'
|
||||
when: manual
|
||||
allow_failure: true
|
||||
- when: never
|
||||
|
||||
|
||||
Gitlab Release:
|
||||
extends:
|
||||
- .gitlab_release
|
||||
|
||||
|
||||
Docker Hub:
|
||||
stage: publish
|
||||
image: docker:latest
|
||||
services:
|
||||
- docker:19.03.12-dind
|
||||
before_script:
|
||||
- export
|
||||
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
|
||||
- docker pull $CI_REGISTRY_IMAGE/docker-mail:$CI_COMMIT_SHA
|
||||
- docker logout $CI_REGISTRY
|
||||
script:
|
||||
# - Release_TAG=$(cat $CI_PROJECT_DIR/dist/version)
|
||||
- docker login docker.io -u $NFC_DOCKERHUB_USERNAME -p $NFC_DOCKERHUB_TOKEN
|
||||
# - if [ "m$(echo $CI_BUILD_REF_NAME | grep rc)" == "m$CI_BUILD_REF_NAME" ]; then Branch_TAG=dev; else Branch_TAG=stable; fi
|
||||
- echo Branch tag is $Branch_TAG
|
||||
- docker image ls
|
||||
- |
|
||||
if [ "0$CI_COMMIT_BRANCH" == "0development" ]; then
|
||||
|
||||
DH_LATEST_TAG=dev
|
||||
|
||||
elif [ "0$CI_COMMIT_TAG" != "0" ] ; then
|
||||
|
||||
if [ "0$CI_COMMIT_TAG" == *"rc"* ]; then
|
||||
|
||||
DH_LATEST_TAG=dev
|
||||
|
||||
else
|
||||
|
||||
DH_LATEST_TAG=latest
|
||||
|
||||
fi
|
||||
|
||||
docker image tag $CI_REGISTRY_IMAGE/docker-mail:$CI_COMMIT_SHA nofusscomputing/docker-mail:$CI_COMMIT_TAG;
|
||||
|
||||
docker image ls;
|
||||
|
||||
docker push nofusscomputing/docker-mail:$CI_COMMIT_TAG;
|
||||
|
||||
fi
|
||||
|
||||
if [ "0$DH_LATEST_TAG" != "0" ]; then
|
||||
|
||||
docker image tag $CI_REGISTRY_IMAGE/docker-mail:$CI_COMMIT_SHA nofusscomputing/docker-mail:$DH_LATEST_TAG;
|
||||
|
||||
docker image ls;
|
||||
|
||||
docker push nofusscomputing/docker-mail:$DH_LATEST_TAG;
|
||||
|
||||
fi
|
||||
needs: [ "Docker Container" ]
|
||||
environment:
|
||||
name: DockerHub
|
||||
url: https://hub.docker.com/r/nofusscomputing/docker-mail
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: on_success
|
||||
- if: '$CI_COMMIT_BRANCH == "development" && $CI_COMMIT_TITLE =~ /Merge branch.*/'
|
||||
when: on_success
|
||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
when: never
|
||||
- if: '$CI_COMMIT_BRANCH'
|
||||
when: never
|
||||
- when: never
|
||||
|
||||
|
||||
Github (Push --mirror):
|
||||
variables:
|
||||
GIT_SYNC_URL: "https://$GITHUB_USERNAME_ROBOT:$GITHUB_TOKEN_ROBOT@github.com/NoFussComputing/docker-mail.git"
|
||||
extends:
|
||||
- .git_push_mirror
|
||||
|
||||
|
||||
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -2,3 +2,7 @@
|
||||
path = gitlab-ci
|
||||
url = https://gitlab.com/nofusscomputing/projects/gitlab-ci.git
|
||||
branch = development
|
||||
[submodule "website-template"]
|
||||
path = website-template
|
||||
url = https://gitlab.com/nofusscomputing/infrastructure/website-template.git
|
||||
branch = development
|
||||
|
8
.nfc_automation.yaml
Normal file
8
.nfc_automation.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
|
||||
role_git_conf:
|
||||
gitlab:
|
||||
submodule_branch: "development"
|
||||
default_branch: development
|
||||
mr_labels: ~"type::automation" ~"impact::0" ~"priority::0"
|
||||
auto_merge: true
|
52
CHANGELOG.md
52
CHANGELOG.md
@ -1,3 +1,55 @@
|
||||
## 0.1.0 (2023-11-06)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **ci**: [cab22ceb](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/cab22cebfa98d50774b4b433fed5f1727f596a26) - added automation config [ [!13](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/13) ]
|
||||
|
||||
### Continious Integration
|
||||
|
||||
- **automagic**: [b1b5fc20](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/b1b5fc20606dc0d87d860ae5ee64559307c6f3ea) - use template automagic for jobs [ [!12](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/12) [#5](https://gitlab.com/nofusscomputing/projects/docker-mail/-/issues/5) ]
|
||||
|
||||
## 0.1.0rc3 (2023-05-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **docs**: [e872534a](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/e872534aec12c0905a7713532f36f6fde63b4730) - use docs path instead of pages [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) [!26](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/26) ]
|
||||
- **mkdocs**: [9acc37ec](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/9acc37ec4f2286c06debbbfda0acb8a3bf04c998) - use correct edit path [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **website**: [c2902063](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/c290206392836642af5a3b6ca1dad67abe799b42) - correct repo name [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **docs**: [bfcb3469](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/bfcb346924b12411102fc58bec13aa7e0820a0ce) - add base files for navigation [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **ci**: [235aa8d7](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/235aa8d7ccd19dcee44f56a27367113f2e4f5354) - must have index.md file for linting to start [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **build**: [88689c87](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/88689c87ac84ba493652cbf22da934d5873c55b3) - ensure dovecot downloaded and installed [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **build**: [9a0df52c](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/9a0df52cd9d2d0f8574801ca73e6b0a525531b30) - fix build logic [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **publish**: [c30efc8b](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/c30efc8bd64f7d7702b71e3fed2acab915821f2c) - must specify docker publish details [ [!3](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/3) ]
|
||||
- [29c6d6f7](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/29c6d6f7304c6bca751d3904e37d2561ac9f01a1) - lock debian base image [ [!3](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/3) ]
|
||||
- **versions**: [840e2ad5](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/840e2ad5aead5effdb925dd640ce483782a11ca5) - update postfix [ [!3](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/3) ]
|
||||
- **repo**: [d6b2b5b4](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/d6b2b5b40ef2643005078807da7ca7dcce82505a) - lock dovecot repo to specified version [ [!3](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/3) ]
|
||||
|
||||
### Code Refactor
|
||||
|
||||
- **image**: [4c106025](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/4c106025d545d89cadef0bf019a86cbaf7dca00a) - reduce the number of layers [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **dockerfile**: [1c6b3a36](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/1c6b3a3617cfcd0a781391c96d0265c2fb7eef3b) - use global var [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **dockerfile**: [88bfc649](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/88bfc64940e7a2b7073c8ebe644afd06a4e2149c) - use args for apt software versions [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **ci**: [300961aa](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/300961aaff303b1b4a6ea2f70b9c13fbf1831260) - update template path [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
|
||||
### Continious Integration
|
||||
|
||||
- **gitlab**: [aa461590](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/aa461590a83065e81b3743e791975ebcad916874) - update to latest HEAD [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **compile**: [808ca861](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/808ca861edc1080844cbfd61bd962020146cdcf0) - add dovecot compile job [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **gitlab-ci**: [e2e704c5](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/e2e704c54588c6bddccfcd38c18f21a5bc863c78) - use dev branch and type docker container [ [!3](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/3) ]
|
||||
|
||||
### Documentaton / Guides
|
||||
|
||||
- **build**: [f22931e6](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/f22931e6f079657acc94f21e7e2d5c61410a150b) - added navigation for project [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
|
||||
### Features
|
||||
|
||||
- **ci**: [80ccaaa6](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/80ccaaa6e7d875283770baff1b090b8807a65947) - trigger downstream website to build [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) [!27](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/27) ]
|
||||
- **docs**: [6409627d](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/6409627daeb7ce6a131bd7205409c3f8c07f9986) - add website static page building [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) [!25](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/25) ]
|
||||
- **build**: [7261769a](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/7261769a95a985b95a5f16142c0e461d0984174e) - dockerfile for compiling dovecot [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **arm64**: [a866bd82](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/a866bd82b82ae6ec45a1121bed1a6dfd9f59f114) - build arm64 image using compiled bins [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **amd64**: [676546f7](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/676546f71c13dcc8ddf7db7128b003b8f2416721) - use dovecot apt repo to install [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
- **build**: [2b497fd2](https://gitlab.com/nofusscomputing/projects/docker-mail/-/commit/2b497fd2cf7678e17f544ad38187486cc4efeaf3) - specify architecture [ [!10](https://gitlab.com/nofusscomputing/projects/docker-mail/-/merge_requests/10) ]
|
||||
|
||||
## v0.1.0rc2 (2022-02-19)
|
||||
|
||||
### Bug Fixes
|
||||
|
140
dockerfile
140
dockerfile
@ -1,6 +1,55 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
|
||||
ARG CI_JOB_TOKEN
|
||||
ARG CI_API_V4_URL
|
||||
ARG CI_PROJECT_ID
|
||||
|
||||
ARG DOVECOT_BUILD_VERSION=2.3.18
|
||||
ARG PIGEONHOLE_BUILD_VERSION=0.5.20
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ARG VERSION_APT_AMAVISD=1:2.11.1-5+deb11u1
|
||||
ARG VERSION_APT_CLAMAV=0.103.5+dfsg-0+deb11u1
|
||||
# 2:2.3.18-4+debian11
|
||||
ARG VERSION_APT_DOVECOT=2:$DOVECOT_BUILD_VERSION-4+debian11
|
||||
ARG VERSION_APT_FETCHMAIL=6.4.16-4+deb11u1
|
||||
ARG VERSION_APT_FAM=2.7.0-17.3
|
||||
ARG VERSION_APT_LIBNET_DNS_PERL=1.29-1
|
||||
ARG VERSION_APT_LIBMAIL_TOOLS_PERL=2.21-1
|
||||
ARG VERSION_APT_OPENDKIM=2.11.0~beta2-4+deb11u1
|
||||
ARG VERSION_APT_POSTFIX=3.5.25-0+deb11u1
|
||||
ARG VERSION_APT_POSTFIX_POLICYD_SPF_PYTHON=2.9.2-1+deb11u1
|
||||
ARG VERSION_APT_SPAMASSASSIN=3.4.6-1
|
||||
|
||||
|
||||
|
||||
FROM --platform=$TARGETPLATFORM debian:11.7-slim as build
|
||||
|
||||
|
||||
ARG CI_JOB_TOKEN
|
||||
ARG CI_API_V4_URL
|
||||
ARG CI_PROJECT_ID
|
||||
|
||||
ARG DOVECOT_BUILD_VERSION
|
||||
ARG PIGEONHOLE_BUILD_VERSION
|
||||
|
||||
ARG DEBIAN_FRONTEND
|
||||
|
||||
ARG VERSION_APT_AMAVISD
|
||||
ARG VERSION_APT_CLAMAV
|
||||
ARG VERSION_APT_DOVECOT
|
||||
ARG VERSION_APT_FETCHMAIL
|
||||
ARG VERSION_APT_FAM
|
||||
ARG VERSION_APT_LIBNET_DNS_PERL
|
||||
ARG VERSION_APT_LIBMAIL_TOOLS_PERL
|
||||
ARG VERSION_APT_OPENDKIM
|
||||
ARG VERSION_APT_POSTFIX
|
||||
ARG VERSION_APT_POSTFIX_POLICYD_SPF_PYTHON
|
||||
ARG VERSION_APT_SPAMASSASSIN
|
||||
|
||||
#COPY apt_proxy.conf /etc/apt/apt.conf.d/apt_proxy.conf
|
||||
|
||||
LABEL \
|
||||
#org.opencontainers.image.created="" \ # set during build with $(date --rfc-3339=seconds) \
|
||||
org.opencontainers.image.authors="No Fuss Computing" \
|
||||
@ -12,55 +61,42 @@ LABEL \
|
||||
org.opencontainers.image.vendor="No Fuss Computing" \
|
||||
#License(s) under which contained software is distributed as an SPDX License Expression.
|
||||
org.opencontainers.image.licenses="" \
|
||||
org.opencontainers.image.title="No Fuss Computings docker mail server" \
|
||||
org.opencontainers.image.description="A Complete mailserver in a container"
|
||||
|
||||
org.opencontainers.image.title="Docker Mail Server" \
|
||||
org.opencontainers.image.description="A Complete mailserver in a container" \
|
||||
io.artifacthub.package.license="MIT"
|
||||
|
||||
|
||||
# Install dependencies
|
||||
RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
|
||||
RUN apt update && apt -y --no-install-recommends install \
|
||||
curl \
|
||||
gpg \
|
||||
gpg-agent \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
supervisor
|
||||
|
||||
RUN curl https://repo.dovecot.org/DOVECOT-REPO-GPG | gpg --import && \
|
||||
gpg --export ED409DA1 > /etc/apt/trusted.gpg.d/dovecot.gpg
|
||||
|
||||
RUN echo "deb https://repo.dovecot.org/ce-2.3-latest/debian/bullseye bullseye main" > /etc/apt/sources.list.d/dovecot.list
|
||||
|
||||
RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
|
||||
supervisor \
|
||||
&& apt -y --no-install-recommends install \
|
||||
# System Apps
|
||||
cron \
|
||||
rsyslog \
|
||||
logrotate \
|
||||
# Dovecot
|
||||
dovecot-core=2:2.3.18-4+debian11 \
|
||||
dovecot-imapd=2:2.3.18-4+debian11 \
|
||||
dovecot-lmtpd=2:2.3.18-4+debian11 \
|
||||
dovecot-ldap=2:2.3.18-4+debian11 \
|
||||
dovecot-sieve=2:2.3.18-4+debian11 \
|
||||
dovecot-managesieved=2:2.3.18-4+debian11 \
|
||||
# Postfix
|
||||
postfix=3.5.6-1+b1 \
|
||||
postfix-ldap=3.5.6-1+b1 \
|
||||
postfix=$VERSION_APT_POSTFIX \
|
||||
postfix-ldap=$VERSION_APT_POSTFIX \
|
||||
libsasl2-modules \
|
||||
sasl2-bin \
|
||||
# Amavis
|
||||
amavisd-new=1:2.11.1-5 \
|
||||
spamassassin=3.4.6-1 \
|
||||
spamc=3.4.6-1 \
|
||||
amavisd-new=$VERSION_APT_AMAVISD \
|
||||
spamassassin=$VERSION_APT_SPAMASSASSIN \
|
||||
spamc=$VERSION_APT_SPAMASSASSIN \
|
||||
# Amavis decoders
|
||||
arj bzip2 cabextract cpio file gzip nomarch pax unzip zip xzdec lrzip lzop rpm2cpio unrar-free p7zip-full lz4 \
|
||||
# clamav=0.103.5+dfsg-0+deb11u1 \
|
||||
# clamav-daemon=0.103.5+dfsg-0+deb11u1 \
|
||||
libmailtools-perl=2.21-1 \
|
||||
fam=2.7.0-17.3 \
|
||||
libnet-dns-perl=1.29-1 \
|
||||
# clamav=$VERSION_APT_CLAMAV \
|
||||
# clamav-daemon=$VERSION_APT_CLAMAV \
|
||||
libmailtools-perl=$VERSION_APT_LIBMAIL_TOOLS_PERL \
|
||||
fam=$VERSION_APT_FAM \
|
||||
libnet-dns-perl=$VERSION_APT_LIBNET_DNS_PERL \
|
||||
# Fetchmail
|
||||
fetchmail=6.4.16-4+deb11u1 \
|
||||
fetchmail=$VERSION_APT_FETCHMAIL \
|
||||
# Perl Modules for fetchmail.pl
|
||||
# DBI
|
||||
libdbix-easy-perl \
|
||||
@ -73,14 +109,38 @@ RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends
|
||||
# LockFile::Simple
|
||||
libio-lockedfile-perl \
|
||||
# DKIM
|
||||
opendkim=2.11.0~beta2-4 \
|
||||
opendkim-tools=2.11.0~beta2-4 \
|
||||
opendkim=$VERSION_APT_OPENDKIM \
|
||||
opendkim-tools=$VERSION_APT_OPENDKIM \
|
||||
# SPF
|
||||
postfix-policyd-spf-python=2.9.2-1
|
||||
|
||||
|
||||
# Cleanup, remove cron jobs not required
|
||||
RUN rm -f /etc/cron.d/e2scrub_all \
|
||||
postfix-policyd-spf-python=$VERSION_APT_POSTFIX_POLICYD_SPF_PYTHON; \
|
||||
# Dovecot
|
||||
if [ "0$(echo `dpkg --print-architecture`)" = "0amd64" ]; then \
|
||||
echo "[DEBUG] installing dovecot via APT"; \
|
||||
curl https://repo.dovecot.org/DOVECOT-REPO-GPG | gpg --import && \
|
||||
gpg --export ED409DA1 > /etc/apt/trusted.gpg.d/dovecot.gpg; \
|
||||
echo "deb https://repo.dovecot.org/ce-$DOVECOT_BUILD_VERSION/debian/bullseye bullseye main" > /etc/apt/sources.list.d/dovecot.list; \
|
||||
apt update; \
|
||||
apt -y --no-install-recommends install \
|
||||
dovecot-core=$VERSION_APT_DOVECOT \
|
||||
dovecot-imapd=$VERSION_APT_DOVECOT \
|
||||
dovecot-lmtpd=$VERSION_APT_DOVECOT \
|
||||
dovecot-ldap=$VERSION_APT_DOVECOT \
|
||||
dovecot-sieve=$VERSION_APT_DOVECOT \
|
||||
dovecot-managesieved=$VERSION_APT_DOVECOT; \
|
||||
else \
|
||||
echo "[DEBUG] installing dovecot via compiled binaries"; \
|
||||
# as this architecture doesn't exist in the apt repo, use compiled versions
|
||||
adduser --system --group dovecot --no-create-home; \
|
||||
cd tmp; \
|
||||
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \
|
||||
"https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/generic/dovecot/${DOVECOT_BUILD_VERSION}/dovecot-core_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb" -o "dovecot-core_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb"; \
|
||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" \
|
||||
"https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/packages/generic/dovecot/${DOVECOT_BUILD_VERSION}/dovecot-pigeonhole_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb" -o "dovecot-pigeonhole_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb"; \
|
||||
dpkg -i dovecot-core_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb; \
|
||||
cp /usr/local/share/doc/dovecot/example-config/dovecot.conf /etc/dovecot/; \
|
||||
dpkg -i dovecot-pigeonhole_$DOVECOT_BUILD_VERSION-1_$(echo `dpkg --print-architecture`).deb; \
|
||||
fi \
|
||||
&& rm -f /etc/cron.d/e2scrub_all \
|
||||
&& rm -f /etc/cron.daily/apt-compat \
|
||||
&& rm -f /etc/cron.daily/dpkg \
|
||||
&& rm -f /etc/cron.daily/logrotate
|
||||
@ -120,7 +180,7 @@ RUN chmod +x /docker-entrypoint.sh \
|
||||
# ensure postfix related scripts are executable
|
||||
&& chmod +x /bin/postfix.sh \
|
||||
# check if needed
|
||||
&& mkdir -p /var/spool/postfix/private/dovecot \
|
||||
&& mkdir -p /var/spool/postfix/private/dovecot /var/lib/dovecot \
|
||||
&& chown postfix:postfix /var/spool/postfix/private/dovecot \
|
||||
&& chown vmail:vmail /var/lib/dovecot \
|
||||
# Spammassassin related Commands
|
||||
@ -221,7 +281,7 @@ ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
|
||||
# testing software
|
||||
RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
|
||||
RUN apt update && apt -y --no-install-recommends install \
|
||||
procps \
|
||||
vim \
|
||||
iputils-ping \
|
||||
|
135
dockerfile-compile
Normal file
135
dockerfile-compile
Normal file
@ -0,0 +1,135 @@
|
||||
|
||||
ARG CI_JOB_TOKEN
|
||||
ARG CI_API_V4_URL
|
||||
ARG CI_PROJECT_ID
|
||||
|
||||
ARG DOVECOT_BUILD_VERSION=2.3.18
|
||||
ARG PIGEONHOLE_BUILD_VERSION=0.5.20
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
||||
|
||||
FROM --platform=$TARGETPLATFORM debian:11.7-slim as compile-dovecot
|
||||
# ref: https://doc.dovecot.org/installation_guide/dovecot_community_repositories/compiling_source/
|
||||
|
||||
|
||||
ARG CI_JOB_TOKEN
|
||||
ARG CI_API_V4_URL
|
||||
ARG CI_PROJECT_ID
|
||||
|
||||
ARG DOVECOT_BUILD_VERSION
|
||||
ARG PIGEONHOLE_BUILD_VERSION
|
||||
|
||||
ARG DEBIAN_FRONTEND
|
||||
|
||||
|
||||
RUN export && apt update \
|
||||
&& apt -y install --reinstall --fix-missing \
|
||||
wget \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
pkg-config \
|
||||
gettext \
|
||||
pandoc \
|
||||
make \
|
||||
git \
|
||||
ca-certificates \
|
||||
libssl-dev \
|
||||
bison \
|
||||
flex \
|
||||
curl \
|
||||
checkinstall \
|
||||
zlib1g-dev
|
||||
|
||||
|
||||
RUN mkdir -p /tmp/build \
|
||||
&& cd /tmp/build \
|
||||
&& git clone --depth=1 -b release-${DOVECOT_BUILD_VERSION} https://github.com/dovecot/core.git dovecot
|
||||
|
||||
|
||||
RUN cd /tmp/build/dovecot \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure --enable-maintainer-mode --sysconfdir=/etc \
|
||||
# && make \
|
||||
&& ls -la
|
||||
|
||||
RUN /bin/mkdir -p '/usr/local/lib/dovecot' \
|
||||
'/usr/local/share/dovecot/stopwords' \
|
||||
'/usr/local/libexec/dovecot' \
|
||||
'/usr/local/lib/dovecot/auth' \
|
||||
'/usr/local/lib/dovecot/old-stats' \
|
||||
'/usr/local/lib/dovecot/doveadm' \
|
||||
'/usr/local/share/doc/dovecot/wiki' \
|
||||
'/usr/local/share/doc/dovecot/example-config/conf.d'
|
||||
|
||||
|
||||
RUN cd /tmp/build/dovecot && checkinstall --pkgname=dovecot-core --pkgversion=${DOVECOT_BUILD_VERSION} --pkgarch=$(echo `dpkg --print-architecture`) -D -y \
|
||||
&& ls -la
|
||||
|
||||
|
||||
RUN cd /tmp/build/dovecot && curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --verbose \
|
||||
--upload-file dovecot-core_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb \
|
||||
"https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/packages/generic/dovecot/${DOVECOT_BUILD_VERSION}/dovecot-core_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
FROM --platform=$TARGETPLATFORM debian:11.7-slim as compile-pigeonhole
|
||||
# ref: https://doc.dovecot.org/installation_guide/dovecot_community_repositories/compiling_source/
|
||||
|
||||
|
||||
ARG CI_JOB_TOKEN
|
||||
ARG CI_API_V4_URL
|
||||
ARG CI_PROJECT_ID
|
||||
|
||||
ARG DOVECOT_BUILD_VERSION
|
||||
ARG PIGEONHOLE_BUILD_VERSION
|
||||
|
||||
ARG DEBIAN_FRONTEND
|
||||
|
||||
|
||||
RUN export && apt update \
|
||||
&& apt -y install --reinstall --fix-missing \
|
||||
wget \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
pkg-config \
|
||||
gettext \
|
||||
pandoc \
|
||||
make \
|
||||
git \
|
||||
ca-certificates \
|
||||
libssl-dev \
|
||||
bison \
|
||||
flex \
|
||||
curl \
|
||||
checkinstall \
|
||||
zlib1g-dev
|
||||
|
||||
|
||||
|
||||
RUN cd tmp && curl --header "JOB-TOKEN: $CI_JOB_TOKEN" \
|
||||
"https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/packages/generic/dovecot/${DOVECOT_BUILD_VERSION}/dovecot-core_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb" -o "dovecot-core_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb" \
|
||||
&& dpkg -i dovecot-core_$DOVECOT_BUILD_VERSION-1_$(echo `dpkg --print-architecture`).deb
|
||||
|
||||
RUN mkdir -p /tmp/build \
|
||||
&& cd /tmp/build/ && git clone -b $PIGEONHOLE_BUILD_VERSION --depth=1 https://github.com/dovecot/pigeonhole.git pigeonhole \
|
||||
&& cd pigeonhole \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure --sysconfdir=/etc --with-dovecot-install-dirs \
|
||||
# && make \
|
||||
&& mkdir -p '/usr/local/lib/dovecot/sieve' \
|
||||
'/usr/local/lib/dovecot/settings' \
|
||||
'/usr/local/share/doc/dovecot/example-config' \
|
||||
'/usr/local/share/doc/dovecot/sieve/extensions'
|
||||
|
||||
RUN cd /tmp/build/pigeonhole && checkinstall --pkgname=dovecot-pigeonhole --pkgversion=${DOVECOT_BUILD_VERSION} --pkgarch=$(echo `dpkg --print-architecture`) -D -y
|
||||
|
||||
RUN cd /tmp/build/pigeonhole && curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --verbose \
|
||||
--upload-file dovecot-pigeonhole_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb \
|
||||
"https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/packages/generic/dovecot/${DOVECOT_BUILD_VERSION}/dovecot-pigeonhole_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb"
|
||||
|
0
docs/articles/index.md
Normal file
0
docs/articles/index.md
Normal file
0
docs/contact.md
Normal file
0
docs/contact.md
Normal file
0
docs/index.md
Normal file
0
docs/index.md
Normal file
0
docs/operations/index.md
Normal file
0
docs/operations/index.md
Normal file
@ -1,6 +1,9 @@
|
||||
---
|
||||
title: Amavis DKIM Signing configuration
|
||||
Description: How to configure DKIM for No Fuss Computings mail server.
|
||||
date: 2022-02-16
|
||||
template: project.html
|
||||
about: https://gitlab.com/nofusscomputing/projects/docker-mail
|
||||
---
|
||||
|
||||
To utilise DKIM message signing for outbound mail (leaving the server), you will need to configure dkim to use your certificates.
|
||||
@ -19,6 +22,7 @@ $ amavisd-new genrsa /certs/amavis/dkim/example.org.dkim.pem 2048 # (1)!
|
||||
$ chmod g+r /certs/amavis/dkim/example.org.dkim.pem # (2)!
|
||||
|
||||
$ chgrp amavis /certs/amavis/dkim/example.org.dkim.pem # (2)!
|
||||
|
||||
```
|
||||
|
||||
1. create your DKIM Key
|
||||
@ -51,6 +55,7 @@ To configure amavis, you will be required to create a confiuguration file with y
|
||||
|
||||
|
||||
``` conf title="/etc/amavis/conf.d/99-dkim-keys"
|
||||
|
||||
dkim_key(
|
||||
'example.org', # (1)!
|
||||
'dkim', # (2)!
|
||||
@ -97,6 +102,7 @@ Once configuration is complete issue command `supervisorctl restart amavis` to l
|
||||
Once you have configured Amavis and created your DKIM keys, you will need to configure DNS. For this you will require the DKIM Key information. Since we are using Amavis, issue command `amavisd-new showkeys` to display your keys and the required dns config.
|
||||
|
||||
``` bash title="DNS Configuration"
|
||||
|
||||
$ amavisd-new showkeys
|
||||
; key#1 4096 bits, i=dkim, d=example.org, /certs/amavis/dkim/example.org.dkim.pem
|
||||
dkim._domainkey.example.org. 3600 TXT (
|
7
docs/projects/docker-mail/index.md
Normal file
7
docs/projects/docker-mail/index.md
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: No Fuss Computings Dockr Mail Server
|
||||
description: How to use No Fuss Computings Dcokerized E-Mail Server
|
||||
date: 2023-05-22
|
||||
template: project.html
|
||||
about: https://gitlab.com/nofusscomputing/projects/docker-mail
|
||||
---
|
@ -1,6 +1,9 @@
|
||||
---
|
||||
title: SPF configuration
|
||||
Description: How to configure SPF for No Fuss Computings docker mail server.
|
||||
date: 2022-02-17
|
||||
template: project.html
|
||||
about: https://gitlab.com/nofusscomputing/projects/docker-mail
|
||||
---
|
||||
|
||||
Sender Policy Framework (SPF) is defined in [RFC7208, Sender Policy Framework (SPF) for Authorizing Use of Domains in Email](https://datatracker.ietf.org/doc/html/rfc7208).
|
||||
@ -8,8 +11,10 @@ Sender Policy Framework (SPF) is defined in [RFC7208, Sender Policy Framework (S
|
||||
DNS SPF text record example:
|
||||
|
||||
``` text
|
||||
|
||||
IN TXT "v=spf1 mx a ip4:192.168.0.100 ip6:2001:ef3:2911::/64"
|
||||
" a:mail.example.org a:mail2.example.org -all"
|
||||
|
||||
```
|
||||
|
||||
1. `v=spf1` Version attribute. only v1 available.
|
0
docs/projects/index.md
Normal file
0
docs/projects/index.md
Normal file
0
docs/tags.md
Normal file
0
docs/tags.md
Normal file
Submodule gitlab-ci updated: 36ce0b0b76...224ef83157
33
mkdocs.yml
Normal file
33
mkdocs.yml
Normal file
@ -0,0 +1,33 @@
|
||||
INHERIT: website-template/mkdocs.yml
|
||||
|
||||
docs_dir: 'docs'
|
||||
|
||||
repo_name: Docker-Mail
|
||||
repo_url: https://gitlab.com/nofusscomputing/projects/docker-mail
|
||||
edit_uri: '/-/ide/project/nofusscomputing/projects/docker-mail/edit/development/-/docs/'
|
||||
|
||||
nav:
|
||||
- Home: index.md
|
||||
|
||||
- Articles:
|
||||
|
||||
- articles/index.md
|
||||
|
||||
- Projects:
|
||||
|
||||
- projects/index.md
|
||||
|
||||
- Docker-Mail:
|
||||
|
||||
- projects/docker-mail/index.md
|
||||
|
||||
- projects/docker-mail/dkim.md
|
||||
|
||||
- projects/docker-mail/spf.md
|
||||
|
||||
- Operations:
|
||||
|
||||
- operations/index.md
|
||||
|
||||
- Contact Us: contact.md
|
||||
|
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
pymdown-extensions==9.5
|
||||
Pygments==2.13.0
|
1
website-template
Submodule
1
website-template
Submodule
Submodule website-template added at 8735f623dc
Reference in New Issue
Block a user