mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-31 06:58:46 +01:00
Added calendars plugin and improved used part
This commit is contained in:
@@ -16,7 +16,7 @@ COPY requirements.txt /tmp
|
||||
COPY test-requirements.txt /tmp
|
||||
COPY dev-requirements.txt /tmp
|
||||
RUN python -m pip install -U pip
|
||||
RUN pip install -r requirements.txt -r user-requirements.txt -r test-requirements.txt -r dev-requirements.txt
|
||||
RUN pip install -r requirements.txt -r test-requirements.txt -r dev-requirements.txt
|
||||
FROM base AS run
|
||||
COPY docker/doveadm /usr/local/bin
|
||||
RUN chmod +x /usr/local/bin/doveadm
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
FROM python:3.12-alpine3.20
|
||||
|
||||
LABEL org.opencontainers.image.authors="Antoine Nguyen <tonio@ngyn.org>"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY radicale_modoboa_oauth2 /app/radicale_modoboa_oauth2
|
||||
ENV PYTHONPATH="${PYTHONPATH}:/app"
|
||||
|
||||
RUN pip install Radicale pytz requests
|
||||
|
||||
EXPOSE 5232
|
||||
|
||||
CMD python3 -m radicale
|
||||
@@ -0,0 +1,159 @@
|
||||
# -*- mode: conf -*-
|
||||
# vim:ft=cfg
|
||||
|
||||
# Config file for Radicale - A simple calendar server
|
||||
#
|
||||
# Place it into /etc/radicale/config (global)
|
||||
# or ~/.config/radicale/config (user)
|
||||
#
|
||||
# The current values are the default ones
|
||||
|
||||
|
||||
[server]
|
||||
|
||||
# CalDAV server hostnames separated by a comma
|
||||
# IPv4 syntax: address:port
|
||||
# IPv6 syntax: [address]:port
|
||||
# For example: 0.0.0.0:9999, [::]:9999
|
||||
hosts = 0.0.0.0:5232
|
||||
|
||||
# Daemon flag
|
||||
#daemon = False
|
||||
|
||||
# File storing the PID in daemon mode
|
||||
#pid =
|
||||
|
||||
# Max parallel connections
|
||||
#max_connections = 20
|
||||
|
||||
# Max size of request body (bytes)
|
||||
#max_content_length = 10000000
|
||||
|
||||
# Socket timeout (seconds)
|
||||
#timeout = 10
|
||||
|
||||
# SSL flag, enable HTTPS protocol
|
||||
#ssl = False
|
||||
|
||||
# SSL certificate path
|
||||
#certificate = /etc/ssl/radicale.cert.pem
|
||||
|
||||
# SSL private key
|
||||
#key = /etc/ssl/radicale.key.pem
|
||||
|
||||
# CA certificate for validating clients. This can be used to secure
|
||||
# TCP traffic between Radicale and a reverse proxy
|
||||
#certificate_authority =
|
||||
|
||||
# SSL Protocol used. See python's ssl module for available values
|
||||
#protocol = PROTOCOL_TLSv1_2
|
||||
|
||||
# Available ciphers. See python's ssl module for available ciphers
|
||||
#ciphers =
|
||||
|
||||
# Reverse DNS to resolve client address in logs
|
||||
#dns_lookup = True
|
||||
|
||||
# Message displayed in the client when a password is needed
|
||||
#realm = Radicale - Password Required
|
||||
|
||||
|
||||
[encoding]
|
||||
|
||||
# Encoding for responding requests
|
||||
#request = utf-8
|
||||
|
||||
# Encoding for storing local collections
|
||||
#stock = utf-8
|
||||
|
||||
|
||||
[auth]
|
||||
|
||||
# Authentication method
|
||||
# Value: none | htpasswd | remote_user | http_x_remote_user
|
||||
type = radicale_modoboa_oauth2
|
||||
|
||||
# Htpasswd filename
|
||||
# htpasswd_filename = users
|
||||
|
||||
# Htpasswd encryption method
|
||||
# Value: plain | sha1 | ssha | crypt | bcrypt | md5
|
||||
# Only bcrypt can be considered secure.
|
||||
# bcrypt and md5 require the passlib library to be installed.
|
||||
# htpasswd_encryption = plain
|
||||
|
||||
# Incorrect authentication delay (seconds)
|
||||
#delay = 1
|
||||
|
||||
oauth2_introspection_endpoint = http://dovecot:Toto12345@api-unsecured:8001/api/o/introspect/
|
||||
|
||||
|
||||
[rights]
|
||||
|
||||
# Rights backend
|
||||
# Value: none | authenticated | owner_only | owner_write | from_file
|
||||
type = from_file
|
||||
|
||||
# File for rights management from_file
|
||||
file = /etc/radicale/rights
|
||||
|
||||
|
||||
[storage]
|
||||
|
||||
# Storage backend
|
||||
# Value: multifilesystem
|
||||
# type =
|
||||
# radicale_storage_by_index_fields = dtstart, dtend, uid, summary
|
||||
|
||||
# Folder for storing local collections, created if not present
|
||||
filesystem_folder = /collections
|
||||
|
||||
# Lock the storage. Never start multiple instances of Radicale or edit the
|
||||
# storage externally while Radicale is running if disabled.
|
||||
#filesystem_locking = True
|
||||
|
||||
# Sync all changes to disk during requests. (This can impair performance.)
|
||||
# Disabling it increases the risk of data loss, when the system crashes or
|
||||
# power fails!
|
||||
#filesystem_fsync = True
|
||||
|
||||
# Delete sync token that are older (seconds)
|
||||
#max_sync_token_age = 2592000
|
||||
|
||||
# Close the lock file when no more clients are waiting.
|
||||
# This option is not very useful in general, but on Windows files that are
|
||||
# opened cannot be deleted.
|
||||
#filesystem_close_lock_file = False
|
||||
|
||||
# Command that is run after changes to storage
|
||||
# Example: ([ -d .git ] || git init) && git add -A && (git diff --cached --quiet || git commit -m "Changes by "%%(user)s)
|
||||
#hook =
|
||||
|
||||
|
||||
[web]
|
||||
|
||||
# Web interface backend
|
||||
# Value: none | internal
|
||||
type = none
|
||||
|
||||
|
||||
[logging]
|
||||
|
||||
# Logging configuration file
|
||||
# If no config is given, simple information is printed on the standard output
|
||||
# For more information about the syntax of the configuration file, see:
|
||||
# http://docs.python.org/library/logging.config.html
|
||||
#config = /etc/radicale/logging
|
||||
|
||||
# Store all environment variables (including those set in the shell)
|
||||
#full_environment = False
|
||||
|
||||
# Don't include passwords in logs
|
||||
#mask_passwords = True
|
||||
|
||||
level = debug
|
||||
|
||||
[headers]
|
||||
|
||||
# Additional HTTP headers
|
||||
#Access-Control-Allow-Origin = *
|
||||
@@ -0,0 +1,135 @@
|
||||
# -*- mode: conf -*-
|
||||
# vim:ft=cfg
|
||||
# Allow all rights for the Administrator
|
||||
#[root]
|
||||
#user: Administrator
|
||||
#collection: .*
|
||||
#permissions: RW
|
||||
|
||||
# Allow reading principal collection (same as username)
|
||||
#[principal]
|
||||
#user: .+
|
||||
#collection: {user}
|
||||
#permissions: R
|
||||
|
||||
# Allow reading and writing private collection (same as username)
|
||||
#[private]
|
||||
#user: .+
|
||||
#collection: {user}/private/
|
||||
#permissions: RW
|
||||
|
||||
# Allow reading calendars and address books that are direct
|
||||
# children of the principal collection for other users
|
||||
#[calendarsReader]
|
||||
#user: .+
|
||||
#collection: {user}/[^/]+
|
||||
#permissions: r
|
||||
|
||||
# Rights management file for Radicale - A simple calendar server
|
||||
#
|
||||
# The default path for this file is /etc/radicale/rights
|
||||
# The path can be specified in the rights section of the configuration file
|
||||
#
|
||||
# Section names are used for naming rules and must be unique.
|
||||
# The first rule matching both user and collection patterns will be used.
|
||||
|
||||
|
||||
# Example: owner_only plugin
|
||||
|
||||
# Allow reading root collection for authenticated users
|
||||
#[root]
|
||||
#user: .+
|
||||
#collection:
|
||||
#permissions: R
|
||||
|
||||
# Allow reading and writing principal collection (same as username)
|
||||
[principal]
|
||||
user: .+
|
||||
collection: {user}
|
||||
permissions: RW
|
||||
|
||||
# Allow reading and writing calendars and address books that are direct
|
||||
# children of the principal collection
|
||||
[calendars]
|
||||
user: .+
|
||||
collection: {user}/[^/]+
|
||||
permissions: rw
|
||||
|
||||
|
||||
# Example: owner_write plugin
|
||||
# Only listed additional rules for the owner_only plugin example.
|
||||
|
||||
# Allow reading principal collections of all users
|
||||
#[read-all-principals]
|
||||
#user: .+
|
||||
#collection: [^/]+
|
||||
#permissions: R
|
||||
|
||||
# Allow reading all calendars and address books that are direct children of any
|
||||
# principal collection
|
||||
#[read-all-calendars]
|
||||
#user: .+
|
||||
#collection: [^/]+/[^/]+
|
||||
#permissions: r
|
||||
|
||||
|
||||
# Example: authenticated plugin
|
||||
|
||||
# Allow reading and writing root and principal collections of all users
|
||||
#[root-and-principals]
|
||||
#user: .+
|
||||
#collection: [^/]*
|
||||
#permissions: RW
|
||||
|
||||
# Allow reading and writing all calendars and address books that are direct
|
||||
# children of any principal collection
|
||||
#[calendars]
|
||||
#user: .+
|
||||
#collection: [^/]+/[^/]+
|
||||
#permissions: rw
|
||||
|
||||
|
||||
# Example: Allow user "admin" to read everything
|
||||
#[admin-read-all]
|
||||
#user: admin
|
||||
#collection: .*
|
||||
#permissions: Rr
|
||||
|
||||
|
||||
# Example: Allow everybody (including unauthenticated users) to read
|
||||
# the collection "public"
|
||||
|
||||
# Allow reading collection "public" for authenticated users
|
||||
#[public-principal]
|
||||
#user: .+
|
||||
#collection: public
|
||||
#permissions: R
|
||||
|
||||
# Allow reading all calendars and address books that are direct children of
|
||||
# the collection "public" for authenticated users
|
||||
#[public-calendars]
|
||||
#user: .+
|
||||
#collection: public/[^/]+
|
||||
#permissions: r
|
||||
|
||||
# Allow access to public calendars and address books via HTTP GET for everyone
|
||||
#[public-calendars-restricted]
|
||||
#user: .*
|
||||
#collection: public/[^/]+
|
||||
#permissions: i
|
||||
|
||||
# Example: Grant users of the form user@domain.tld read access to the
|
||||
# collection "domain.tld"
|
||||
|
||||
# Allow reading the domain collection
|
||||
#[read-domain-principal]
|
||||
#user: .+@([^@]+)
|
||||
#collection: {0}
|
||||
#permissions: R
|
||||
|
||||
# Allow reading all calendars and address books that are direct children of
|
||||
# the domain collection
|
||||
#[read-domain-calendars]
|
||||
#user: .+@([^@]+)
|
||||
#collection: {0}/[^/]+
|
||||
#permissions: r
|
||||
Reference in New Issue
Block a user