Compare commits

..

5 Commits
2 ... main

Author SHA1 Message Date
Mauro Torrez
82e5e1bff1 Upgrade to bookworm, v4
All checks were successful
Build Docker images / docker (eumau/dovecot, 4) (push) Successful in 4m50s
2024-03-01 22:39:47 -03:00
Mauro Torrez
fefee26114 better ci
All checks were successful
Build Docker images / docker (eumau/dovecot, 3) (push) Successful in 5m21s
2024-02-27 14:31:55 -03:00
Mauro Torrez
1f267a1aa4 rm drone ci
All checks were successful
Build Docker images / docker (3) (push) Successful in 4m53s
2024-02-27 13:24:21 -03:00
Mauro Torrez
8e3ddfa237 Add gitea CI 2024-02-27 13:23:24 -03:00
Mauro Torrez
258b4a81a8 Add managesieve support
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-08-11 01:44:21 -03:00
7 changed files with 68 additions and 58 deletions

View File

@ -1,53 +0,0 @@
---
kind: pipeline
name: default
steps:
- name: build and publish image
image: plugins/docker
settings:
repo: eumau/dovecot
auto_tag: true
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
when:
branch:
- master
---
kind: pipeline
name: pull_request
steps:
- name: build image only
image: plugins/docker
settings:
repo: eumau/dovecot
auto_tag: true
dry_run: true
trigger:
event:
- pull_request
---
kind: pipeline
name: tags
steps:
- name: docker
image: plugins/docker
settings:
repo: eumau/dovecot
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
tags:
- ${DRONE_TAG}
trigger:
event:
- tag

View File

@ -0,0 +1,38 @@
name: Build Docker images
on:
push:
branches:
- main
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
repo:
- "eumau/dovecot"
tag:
- "4"
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ matrix.repo }}:${{ matrix.tag }}
platforms: linux/amd64,linux/arm64

View File

@ -1,4 +1,4 @@
FROM eumau/debian:bullseye-slim
FROM eumau/debian:bookworm-slim
LABEL maintainer "Mauro Torrez <mauro@mau.ro>"
ARG DEBIAN_FRONTEND=noninteractive
ENV LC_ALL C
@ -60,6 +60,7 @@ ENV \
SINGLE_USER= \
ANTISPAM_ENABLE=yes \
SIEVE_ENABLE=yes \
MANAGESIEVE_ENABLE=yes \
IMAP_URLAUTH_HOST="*" \
SSL_CLIENT_CA_DIR="/etc/ssl/certs" \
SSL_CLIENT_CA_FILE= \
@ -72,5 +73,5 @@ ADD junk-filter.sieve /etc/dovecot/sieve/before/
ADD sievec /start.d/
VOLUME ["/ssl","/vmail"]
EXPOSE 110/tcp 143/tcp 587/tcp 993/tcp 995/tcp 2000/tcp
EXPOSE 110/tcp 143/tcp 587/tcp 993/tcp 995/tcp 4190/tcp
CMD ["dovecot","-F"]

View File

@ -0,0 +1,6 @@
[template]
src = "20-managesieve.conf.tmpl"
dest = "/etc/dovecot/local.d/20-managesieve.conf"
keys = [
"/managesieve/enable",
]

View File

@ -0,0 +1,14 @@
# enable managesieve protocol
protocols = $protocols {{ if eq (getv "/managesieve/enable") "yes" }}sieve{{ end }}
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
service managesieve {
}
protocol sieve {
}

View File

@ -1,10 +1,12 @@
plugin {
sieve_plugins = {{ if eq (getv "/sieve/enable") "yes" }}sieve_imapsieve{{ if eq (getv "/antispam/enable") "yes" }} sieve_extprograms{{ end }}{{ end }}
sieve = file:~/sieve;active=~/.dovecot.sieve
sieve_before = /etc/dovecot/sieve/before
sieve_after = /etc/dovecot/sieve/after
{{ if eq (getv "/antispam/enable") "yes" }}
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
sieve_pipe_bin_dir = /etc/dovecot/sieve

View File

@ -3,11 +3,13 @@
# arg 1 - spam or ham
if [ "$1" == "ham" ]; then
/usr/bin/bogofilter -d /vmail/bogofilter -e -p -Sn
/usr/bin/bogofilter -d /vmail/bogofilter -p -Sn
exit 0
fi
if [ "$1" == "spam" ]; then
/usr/bin/bogofilter -d /vmail/bogofilter -e -p -Ns
/usr/bin/bogofilter -d /vmail/bogofilter -p -Ns
exit 0
fi
exit 1