[Plugin] radicale_dav – CalDAV/CardDAV for every mailbox (Radicale + Dovecot auth)

Tntdruid

Verified User
Joined
Jan 12, 2025
Messages
17
Hi all,

I've been running this plugin on my own server since the start without problems, so I'm sharing it in case it's useful to others.

What it does
  • Every DirectAdmin mailbox ([email protected]) gets a calendar and address book, using its existing mail password. Radicale authenticates directly against Dovecot, so there are no extra accounts or passwords.
  • It's available on every domain at https://<domain>/caldav, with /.well-known/caldav and /carddav for auto-discovery. This is done through one shared custom vhost template, so there's no per-domain setup.
  • User page: shows the CalDAV/CardDAV URLs, setup steps for iPhone/Mac, Thunderbird and Android (DAVx5), and a downloadable Apple configuration profile.
  • Admin page: shows Radicale's status, runs setup checks (Dovecot socket, venv, proxy template, fail2ban) with hints for fixing problems, and checks for new Radicale releases.
  • Calendar sharing between mailboxes through Radicale's built-in web manager (Radicale 3.7+).
  • Optional fail2ban filter and jail against password guessing.
  • Updates through DirectAdmin's Plugin Manager.

Install
The install steps are in the README:
https://github.com/Tntdruid/radicale_dav

It needs Apache with mod_proxy/mod_headers, Dovecot, systemd and python3 with venv. The README explains how to set up a dedicated Dovecot auth socket for Radicale, so the mail stack's own socket isn't touched.

Tested on AlmaLinux 9.9 with DirectAdmin (Evolution skin), Apache and Dovecot.

Feedback, bug reports and PRs are welcome on GitHub.
 
Looks very cool, can i suggest:
- Also implement it in Roundcube with a caldav/cardav plugin.
- Import Roundcube contacts to carddav when use is created (if there are any contacts).
- Implement CSF integration if people do not use Fail2Ban.
- Standard dns records for RFC 6764.
- Move caldav to it's own subdomain.

@DirectAdmin Support we need this by default in DirectAdmin!
 
Last edited:
  • Brute-force protection for CSF/LFD and CrowdSec as well as fail2ban.
    scripts/setup_protection.sh detects which tools are installed (or takes
    fail2ban, csf, crowdsec) and installs matching rules. It is safe to
    run again.
  • Security: the Apache proxy templates now drop client-sent
    X-Forwarded-For on /caldav and /carddav. Before this, a forged
    header could stop the fail2ban filter from matching. Copy the template
    again and run ./build rewrite_confs.
  • The rules only accept IP characters from X-Forwarded-For.
  • Admin page: the fail2ban check is now a brute-force protection check
    covering all three tools.
I will have a look at the other stuff soon :)
 
Back
Top