Hei,
mit 2.4 verschwindet ja, wenn ich das richtig verstanden habe, die Replication aus dem Werkzeugkasten von Dovecot. Obwohl ich nur ein recht kleines System mit etwa 500 Nutzern betreibe fand ich die Replication als ziemlich beruhigend :-)
Meine Frage in die Runde: Wie wollt Ihr die Replikation ersetzen? Irgendwas mit NFS oder gibt es da eine empfohlene Herangehensweise?
Fragende Grüße
Hanns
Sig for hire.
Sorry,
this was aimed to the german list.
But feel free to answer - any hint appreciated :-)
Am 26.01.25 um 16:37 schrieb Hanns Mattes via dovecot:
Hei,
mit 2.4 verschwindet ja, wenn ich das richtig verstanden habe, die Replication aus dem Werkzeugkasten von Dovecot. Obwohl ich nur ein recht kleines System mit etwa 500 Nutzern betreibe fand ich die Replication als ziemlich beruhigend :-)
Meine Frage in die Runde: Wie wollt Ihr die Replikation ersetzen? Irgendwas mit NFS oder gibt es da eine empfohlene Herangehensweise?
Fragende Grüße
Hanns
-- Eine Abkürzung ist der längste Weg zwischen zwei Punkten
Hanns Mattes via dovecot <dovecot@dovecot.org> wrote
Sorry,
this was aimed to the german list.
I would have answered in English anyway ;-)
But feel free to answer - any hint appreciated :-)
Am 26.01.25 um 16:37 schrieb Hanns Mattes via dovecot:
Hei, mit 2.4 verschwindet ja, wenn ich das richtig verstanden habe, die Replication aus dem Werkzeugkasten von Dovecot. Obwohl ich nur ein recht kleines System mit etwa 500 Nutzern betreibe fand ich die Replication als ziemlich beruhigend :-) Meine Frage in die Runde: Wie wollt Ihr die Replikation ersetzen?
How to replace replication?
Yeah, that's what I am currently investigating, and I do have a crude proof of concept which needs more thorough testing, though.
BTW: I do have only 5 users ;-)
Concept:
every user needs a sieve script starting with:
require ["vnd.dovecot.execute"]; # add all your other requiries ... # replication with doveadm sync … execute "_REPLICATE" "test-replication";
dovecot.conf:
# home-brewn replication sieve_extensions = +vnd.dovecot.execute sieve_plugins = sieve_extprograms sieve_execute_bin_dir = /any/path/to/your/script sieve_extension_exec_timeout = 1s
script /any/path/to/your/script/_REPLICATION (sorry its csh)
#!/bin/csh
set LOGGER = "/usr/bin/logger -p mail.info -t replication"
if ( $#argv != 1 ) then echo "missing user in $0" | ${LOGGER} exit 1 endif
set USER = $argv[1] set DOVEADM = "/usr/local/bin/doveadm" set DELAY = "1" # this will give sieve time to finalise before synchronising set LOCK = "1" set TIMEOUT = "30" set PORT = "12345" # see doveadm service in dovecot.conf set DESTINATION = "my.destination.server"
# immediately spawn this script to let sieve continue ist work and store that mail accordingly # otherwise synchronisation will come before storage
( sleep ${DELAY} ; ${DOVEADM} sync -P -l ${LOCK} -T ${TIMEOUT} -u ${USER} tcp:${DESTINATION}:${PORT} ) |& ${LOGGER} & exit 0
This will replicate all incoming mails, even those incoming simultaneously at both servers. (But I haven't tested it with huge numbers of mails, yet)
- This doesn't trigger modified IMAP flags, deletions, and such. Thus I will add a crontab script similar to that above, that will synchronise both servers every minute or such.
Remarks:
#) This is FreeBSD. I am running postfix and dovecot in the same service jail
#) Both servers are connected via an ipsec tunnel. Thus I do not need to use ssh. But that should be easy to add.
#) I could live with 4) only, but I do now my users ;-)
#) my script needs to become much more bullet proof w.r.t. to locking, checking for runaway processes, and such.
#) v2.3 https://doc.dovecot.org/2.3/configuration_manual/sieve/plugins/extprograms/
#) v2.4 https://doc.dovecot.org/2.4.0/core/plugins/sieve_extprograms.html
I am testing this on both of my servers with active replication with dovecot 2.3.21.1. Thus needed to disable replication for test user "test-replication", though.
Again, this is just an initial concept that needs further testing and investigation [1]
HTH and regards, Michael
[1] how could one tell an listening daemon about modifications of IMAP flags ... ?
I avoid migrating to a new major version so fast. I usually wait a few years and until than solusions will have been established. I’m currently running a rock-solid dovecot 2.2 cluster and am migrating this to dovecot 2.3 (not 4) now. :D
So wihtin the next couple of years, I’m planing to setup a shared storage (i.ex. GlusterFS) Cluster for underneath.
This will be my current „migration plan“ to dovecot not supporting replication anymore:
2 x Loadblancers (accross two sites) with keepalived and haproxy 3x GlusterFS nodes 3x Galera Cluster mariadb nodes 2x dovecot IMAP with Postfix SMTP (wihout director there’s no need anynmore to use dovecot SMTP implementation)
The Loadbalancer-, Galera- and Gluster modes are shared wit the existing web service infrastructure, so not dedicated to dovecot.
If the HA storage and database clusters will be used dedicated for mail, this makes 11 nodes for a fully HA cluster accross two sites. With virtualization infrastructure that should not get very expensive.
Steven
-- https://steven.varco.ch/ https://www.tech-island.com/
Am 26.01.2025 um 16:37 schrieb Hanns Mattes via dovecot <dovecot@dovecot.org>:
Hei,
mit 2.4 verschwindet ja, wenn ich das richtig verstanden habe, die Replication aus dem Werkzeugkasten von Dovecot. Obwohl ich nur ein recht kleines System mit etwa 500 Nutzern betreibe fand ich die Replication als ziemlich beruhigend :-)
Meine Frage in die Runde: Wie wollt Ihr die Replikation ersetzen? Irgendwas mit NFS oder gibt es da eine empfohlene Herangehensweise?
Fragende Grüße
Hanns
Sig for hire.
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
participants (4)
-
Hanns Mattes
-
Marc
-
Michael Grimm
-
Steven Varco