Re: unit tests: /usr/bin/touch vs /bin/touch
Hi Sergey, On Thu, Sep 13, 2018, at 10:26 PM, Sergey wrote: > Hello. > > I attempted to run unit tests and got error: > > Suite: command > Test: run ...FAILED > 1. cunit/unit.c:115 - CU_FAIL_FATAL("Code under test exited") > > This is result of wrong path to touch in my distro in cunit/command.testc: > > r = run_command("/usr/bin/touch", canary, NULL); > > I attempted to to find which daemon (or utility) used the touch > but I not found it. Can I simply to change path in the command.testc? Yeah, you should just be able to change that line in the command.testc and then recompile. > btw. perhaps it makes sense to check the location of the touch > by configure? That seems pretty reasonable. Can you manually fix it for now, and then let us know if you find any other mismatched paths like this? Then we can patch them all in one go. :) Cheers, ellie Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
master-master replication
Thank you for your experience. Best regards! >Четверг, 13 сентября 2018, 19:26 +05:00 от Michael Menge >: > >Quoting Evgeniy Kononov < egen...@inbox.ru >: > >> Hi! >> >> Thank you for reply. >> Users can connect to only one server at a time. I move the master >> server to another hardware and at this time it is necessary for >> users to use the mail. >> If this is not a secure configuration, then can I just run >> "sync_client -A" from the master server, and then switch users to a >> replica? >> After that, swap the roles of master-replica between the servers? I'm right ? >> >>> We use cyrus aggregator aka cyrus murder, and AFAIK fastmail also uses >>> multiple >>> instances on one server with nginx frontends >> >> Can you give an example of the configuration? > >Sure, > >first of some background Infos: > >We recently switched from Cyrus 2.4.20 on SLES 11 SP4 to Cyrus 3.0.8 >on RHEL 7.5 so consult >the man pages for your version. > >Our Mailserver are running as 6 KVM VMs (RHEV) with 20 GB Ram, 8 Cores each on >two locations. We have a total of ~44000 accounts, ~457000 Mailboxes, >and 2x6.5 TB Mails > >Each server is running 3-4 instances. One frontend, two backend/replic >and on one of the servers the cyrus mupdate master. Each Server on one >location is paired with one server on the other location for replication >so in normal operation one backend on server A replicates to a replic on >server B and the backend on server B replicates to the replica on server A. > >Keepalived and ipvs loadbalancer distribute the the load to the >frontend servers. >We use a private subnet for our backend and replic und mupdate instances and a >service ip address for the frontends. > >We move the ip address with the role, so that ma01.mail.localhost on server A >replicate to sl01.mail.localhost on server B. But if we need to switch >to the replic >we will start it with ma01.mail.localhost on server B > >Keeping the master instance for mailbox on the same IP is important, >because updating the >location for all mailboxes in the mupdate master would take to long. >(the mupdate protocol >knows nothing about replication) > > >The main trick to run multiple instances on one server is to use >different cyrus.conf >and imapd.conf files for each instance. We use cyrus_INSTANCE.conf and >imapd_INSTANCE.conf >where INSTANCE is replaced by mu for mupdate, fe for the frontend, be >for the first >backend/replic and re of the second backend/replic > >The choosing of "be" and "re" was not the best as it is easily >confused with the role >in wich each of these instances can run. > >The masterproces is started with "master -C /etc/imapd_INSTANCE.conf >-M /etc/cyrus_INSTANCE.conf -p /var/run/cyrus_instance.pid" >and in the cyrus_INSTANCE.conf you must also use "-C >/etc/imapd_INSTANCE.conf" service, start and event >"cmd" so that the correct conf file is used. For services you also >have to configure "listen=" >so that each instance has its own ip to listen on as only one process >can listen on 0.0.0.0 for each port. >In the imapd_INSTANC.conf many directories must be configured. > >We generate the conf files from templates. Where TYPE = INSTANCES >Here are the main parts of our templates > > >== Cyrus Master ># cyrus_@@TYPE@@.conf ># Template MD5SUM: @@MD5SUM@@ > >START { >@@TYPE@@recover cmd="ctl_cyrusdb -r -C /etc/imapd_@@TYPE@@.conf" >@@TYPE@@mupdatepush cmd="ctl_mboxlist -m -a -C /etc/imapd_@@TYPE@@.conf" >@@TYPE@@idled cmd="idled -C /etc/imapd_@@TYPE@@.conf" >} > >SERVICES { >@@TYPE@@imapcmd="imapd -U 50 -C /etc/imapd_@@TYPE@@.conf" >listen="@@HOSTNAME@@:imap" prefork=1 maxfds=1024 >@@TYPE@@imaps cmd="imapd -U 50 -s -C >/etc/imapd_@@TYPE@@.conf" listen="@@HOSTNAME@@:imaps" prefork=1 >maxfds=1024 >@@TYPE@@pop3cmd="pop3d -C /etc/imapd_@@TYPE@@.conf" >listen="@@HOSTNAME@@:pop3" prefork=1 maxfds=1024 >@@TYPE@@pop3s cmd="pop3d -s -C /etc/imapd_@@TYPE@@.conf" >listen="@@HOSTNAME@@:pop3s" prefork=1 maxfds=1024 >@@TYPE@@sieve cmd="timsieved -C /etc/imapd_@@TYPE@@.conf" >listen="@@HOSTNAME@@:sieve" prefork=0 maxfds=1024 >@@TYPE@@lmtpcmd="lmtpd -U 5 -C /etc/imapd_@@TYPE@@.conf" >listen="@@HOSTNAME@@:lmtp" prefork=1 maxfds=1024 >@@TYPE@@lmtpunixcmd="lmtpd -U 5 -C /etc/imapd_@@TYPE@@.conf" >listen="/srv/cyrus-@@TYPE@@/socket/lmtp" prefork=1 maxfds=1024 >} > >EVENTS { >@@TYPE@@checkpointcmd="ctl_cyrusdb -c -C >/etc/imapd_@@TYPE@@.conf" period=30 >@@TYPE@@delprune cmd="cyr_expire -E 3 -X 60 -D 60 -C >/etc/imapd_@@TYPE@@.conf" at=0100 >@@TYPE@@tlsprune cmd="tls_prune -C /etc/imapd_@@TYPE@@.conf" at=0430 >@@TYPE@@squatter cmd="squatter -C /etc/imapd_@@TYPE@@.conf -i" at=2200 >} > >=== Cyrus Replic == ># cyrus_@@TYPE@@.conf ># Template MD5SUM: @@MD5SUM@@ > >START { >@@TYPE@@recover cmd="ctl_cyrusdb -r -C /etc/imapd_@@TYPE@@.conf" >} > >SERVICES { >
Re: master-master replication
Quoting Evgeniy Kononov : Hi! Thank you for reply. Users can connect to only one server at a time. I move the master server to another hardware and at this time it is necessary for users to use the mail. If this is not a secure configuration, then can I just run "sync_client -A" from the master server, and then switch users to a replica? After that, swap the roles of master-replica between the servers? I'm right ? We use cyrus aggregator aka cyrus murder, and AFAIK fastmail also uses multiple instances on one server with nginx frontends Can you give an example of the configuration? Sure, first of some background Infos: We recently switched from Cyrus 2.4.20 on SLES 11 SP4 to Cyrus 3.0.8 on RHEL 7.5 so consult the man pages for your version. Our Mailserver are running as 6 KVM VMs (RHEV) with 20 GB Ram, 8 Cores each on two locations. We have a total of ~44000 accounts, ~457000 Mailboxes, and 2x6.5 TB Mails Each server is running 3-4 instances. One frontend, two backend/replic and on one of the servers the cyrus mupdate master. Each Server on one location is paired with one server on the other location for replication so in normal operation one backend on server A replicates to a replic on server B and the backend on server B replicates to the replica on server A. Keepalived and ipvs loadbalancer distribute the the load to the frontend servers. We use a private subnet for our backend and replic und mupdate instances and a service ip address for the frontends. We move the ip address with the role, so that ma01.mail.localhost on server A replicate to sl01.mail.localhost on server B. But if we need to switch to the replic we will start it with ma01.mail.localhost on server B Keeping the master instance for mailbox on the same IP is important, because updating the location for all mailboxes in the mupdate master would take to long. (the mupdate protocol knows nothing about replication) The main trick to run multiple instances on one server is to use different cyrus.conf and imapd.conf files for each instance. We use cyrus_INSTANCE.conf and imapd_INSTANCE.conf where INSTANCE is replaced by mu for mupdate, fe for the frontend, be for the first backend/replic and re of the second backend/replic The choosing of "be" and "re" was not the best as it is easily confused with the role in wich each of these instances can run. The masterproces is started with "master -C /etc/imapd_INSTANCE.conf -M /etc/cyrus_INSTANCE.conf -p /var/run/cyrus_instance.pid" and in the cyrus_INSTANCE.conf you must also use "-C /etc/imapd_INSTANCE.conf" service, start and event "cmd" so that the correct conf file is used. For services you also have to configure "listen=" so that each instance has its own ip to listen on as only one process can listen on 0.0.0.0 for each port. In the imapd_INSTANC.conf many directories must be configured. We generate the conf files from templates. Where TYPE = INSTANCES Here are the main parts of our templates == Cyrus Master # cyrus_@@TYPE@@.conf # Template MD5SUM: @@MD5SUM@@ START { @@TYPE@@recover cmd="ctl_cyrusdb -r -C /etc/imapd_@@TYPE@@.conf" @@TYPE@@mupdatepush cmd="ctl_mboxlist -m -a -C /etc/imapd_@@TYPE@@.conf" @@TYPE@@idled cmd="idled -C /etc/imapd_@@TYPE@@.conf" } SERVICES { @@TYPE@@imapcmd="imapd -U 50 -C /etc/imapd_@@TYPE@@.conf" listen="@@HOSTNAME@@:imap" prefork=1 maxfds=1024 @@TYPE@@imaps cmd="imapd -U 50 -s -C /etc/imapd_@@TYPE@@.conf" listen="@@HOSTNAME@@:imaps" prefork=1 maxfds=1024 @@TYPE@@pop3cmd="pop3d -C /etc/imapd_@@TYPE@@.conf" listen="@@HOSTNAME@@:pop3" prefork=1 maxfds=1024 @@TYPE@@pop3s cmd="pop3d -s -C /etc/imapd_@@TYPE@@.conf" listen="@@HOSTNAME@@:pop3s" prefork=1 maxfds=1024 @@TYPE@@sieve cmd="timsieved -C /etc/imapd_@@TYPE@@.conf" listen="@@HOSTNAME@@:sieve" prefork=0 maxfds=1024 @@TYPE@@lmtpcmd="lmtpd -U 5 -C /etc/imapd_@@TYPE@@.conf" listen="@@HOSTNAME@@:lmtp" prefork=1 maxfds=1024 @@TYPE@@lmtpunixcmd="lmtpd -U 5 -C /etc/imapd_@@TYPE@@.conf" listen="/srv/cyrus-@@TYPE@@/socket/lmtp" prefork=1 maxfds=1024 } EVENTS { @@TYPE@@checkpointcmd="ctl_cyrusdb -c -C /etc/imapd_@@TYPE@@.conf" period=30 @@TYPE@@delprune cmd="cyr_expire -E 3 -X 60 -D 60 -C /etc/imapd_@@TYPE@@.conf" at=0100 @@TYPE@@tlsprune cmd="tls_prune -C /etc/imapd_@@TYPE@@.conf" at=0430 @@TYPE@@squatter cmd="squatter -C /etc/imapd_@@TYPE@@.conf -i" at=2200 } === Cyrus Replic == # cyrus_@@TYPE@@.conf # Template MD5SUM: @@MD5SUM@@ START { @@TYPE@@recover cmd="ctl_cyrusdb -r -C /etc/imapd_@@TYPE@@.conf" } SERVICES { @@TYPE@@syncserver cmd="sync_server -C /etc/imapd_@@TYPE@@.conf" listen="@@HOSTNAME@@:csync" prefork=1 maxfds=1024 @@TYPE@@imapcmd="imapd -U 50 -C /etc/imapd_@@TYPE@@.conf" listen="@@HOSTNAME@@:imap" prefork=1 maxfds=1024 } EVENTS {
unit tests: /usr/bin/touch vs /bin/touch
Hello. I attempted to run unit tests and got error: Suite: command Test: run ...FAILED 1. cunit/unit.c:115 - CU_FAIL_FATAL("Code under test exited") This is result of wrong path to touch in my distro in cunit/command.testc: r = run_command("/usr/bin/touch", canary, NULL); I attempted to to find which daemon (or utility) used the touch but I not found it. Can I simply to change path in the command.testc? btw. perhaps it makes sense to check the location of the touch by configure? -- Regards, Sergey Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: master-master replication
Hi! Thank you for reply. Users can connect to only one server at a time. I move the master server to another hardware and at this time it is necessary for users to use the mail. If this is not a secure configuration, then can I just run "sync_client -A" from the master server, and then switch users to a replica? After that, swap the roles of master-replica between the servers? I'm right ? >We use cyrus aggregator aka cyrus murder, and AFAIK fastmail also uses >multiple >instances on one server with nginx frontends Can you give an example of the configuration? Best regards. >Четверг, 13 сентября 2018, 13:22 +05:00 от Michael Menge >: > >Hi, > >This setup is NOT SUPPORTED and WILL BREAK if the replication process >is triggered >from the wrong server (user is active on both servers, user switched >from one server >to the other while the sync-log file is still processed, after split >brain) and >some mailboxes have been subscribed, renamed created deleted. > >Also there is the risk of a race condition with subscriptions, if a >user subscribes >to multiple folders, the first will trigger a sync from A to B, but as >the folder >is subscribed on B it will trigger a sync from B to A, witch can undo the next >folder subscription. > >These are only some cases that came to my mind. There will be more >cases and it >will be hard to debug. So DON'T DO IT! > >What we do is, that we have distributed our users between multiple >instances, and each server is running one instance as master and one other >as replic. In case of failure or maintenance we stop the master instance, and >promote the corresponding replic and configure them so that they will sync >them back. If the old master is up to date we switch them back. > >We use cyrus aggregator aka cyrus murder, and AFAIK fastmail also uses >multiple >instances on one server with nginx frontends > >Regards, > >Michael > > > > > >Quoting Evgeniy Kononov via Info-cyrus < info-cyrus@lists.andrew.cmu.edu >: > >> Sorry! Previous message was sent by mistake. >> >> For example, I can configure both servers as follows. >> >> Server A. >> - >> /etc/cyrus.conf >> START { >> ... >> syncclient cmd="sync_client -r" >> ... >> } >> SERVICES { >> ... >> syncserver cmd="sync_server" listen="csync" >> ... >> } >> >> /etc/imapd.conf >> ... >> sync_host: SERVER-B >> sync_authname: admin >> sync_password: password >> sync_log: 1 >> sync_repeat_interval: 30 >> sync_timeout: 600 >> sync_shutdown_file: /var/lib/imap/syncstop And the same on server B. >> - >> /etc/cyrus.conf >> START { >> ... >> syncclient cmd="sync_client -r" >> ... >> } >> SERVICES { >> ... >> syncserver cmd="sync_server" listen="csync" >> ... >> } >> >> /etc/imapd.conf >> ... >> sync_host: SERVER-A >> sync_authname: admin >> sync_password: password >> sync_log: 1 >> sync_repeat_interval: 30 >> sync_timeout: 600 >> sync_shutdown_file: /var/lib/imap/syncstop >> Both server will be as master and as slave in one time. >> >> Will there be any problems with this configuration? >> Thank you. -- >> Evgeniy Kononov > > > > >M.MengeTel.: (49) 7071/29-70316 >Universität Tübingen Fax.: (49) 7071/29-5912 >Zentrum für Datenverarbeitung mail: >michael.me...@zdv.uni-tuebingen.de >Wächterstraße 76 >72074 Tübingen > > >Cyrus Home Page: http://www.cyrusimap.org/ >List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ >To Unsubscribe: >https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus -- Evgeniy Kononov Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: Re[3]: master-master replication
Hi, This setup is NOT SUPPORTED and WILL BREAK if the replication process is triggered from the wrong server (user is active on both servers, user switched from one server to the other while the sync-log file is still processed, after split brain) and some mailboxes have been subscribed, renamed created deleted. Also there is the risk of a race condition with subscriptions, if a user subscribes to multiple folders, the first will trigger a sync from A to B, but as the folder is subscribed on B it will trigger a sync from B to A, witch can undo the next folder subscription. These are only some cases that came to my mind. There will be more cases and it will be hard to debug. So DON'T DO IT! What we do is, that we have distributed our users between multiple instances, and each server is running one instance as master and one other as replic. In case of failure or maintenance we stop the master instance, and promote the corresponding replic and configure them so that they will sync them back. If the old master is up to date we switch them back. We use cyrus aggregator aka cyrus murder, and AFAIK fastmail also uses multiple instances on one server with nginx frontends Regards, Michael Quoting Evgeniy Kononov via Info-cyrus : Sorry! Previous message was sent by mistake. For example, I can configure both servers as follows. Server A. - /etc/cyrus.conf START { ... syncclient cmd="sync_client -r" ... } SERVICES { ... syncserver cmd="sync_server" listen="csync" ... } /etc/imapd.conf ... sync_host: SERVER-B sync_authname: admin sync_password: password sync_log: 1 sync_repeat_interval: 30 sync_timeout: 600 sync_shutdown_file: /var/lib/imap/syncstop And the same on server B. - /etc/cyrus.conf START { ... syncclient cmd="sync_client -r" ... } SERVICES { ... syncserver cmd="sync_server" listen="csync" ... } /etc/imapd.conf ... sync_host: SERVER-A sync_authname: admin sync_password: password sync_log: 1 sync_repeat_interval: 30 sync_timeout: 600 sync_shutdown_file: /var/lib/imap/syncstop Both server will be as master and as slave in one time. Will there be any problems with this configuration? Thank you. -- Evgeniy Kononov M.MengeTel.: (49) 7071/29-70316 Universität Tübingen Fax.: (49) 7071/29-5912 Zentrum für Datenverarbeitung mail: michael.me...@zdv.uni-tuebingen.de Wächterstraße 76 72074 Tübingen Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re[3]: master-master replication
Sorry! Previous message was sent by mistake. For example, I can configure both servers as follows. Server A. - /etc/cyrus.conf START { ... syncclient cmd="sync_client -r" ... } SERVICES { ... syncserver cmd="sync_server" listen="csync" ... } /etc/imapd.conf ... sync_host: SERVER-B sync_authname: admin sync_password: password sync_log: 1 sync_repeat_interval: 30 sync_timeout: 600 sync_shutdown_file: /var/lib/imap/syncstop And the same on server B. - /etc/cyrus.conf START { ... syncclient cmd="sync_client -r" ... } SERVICES { ... syncserver cmd="sync_server" listen="csync" ... } /etc/imapd.conf ... sync_host: SERVER-A sync_authname: admin sync_password: password sync_log: 1 sync_repeat_interval: 30 sync_timeout: 600 sync_shutdown_file: /var/lib/imap/syncstop Both server will be as master and as slave in one time. Will there be any problems with this configuration? Thank you. -- Evgeniy Kononov Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re[2]: master-master replication
For example, on server A -- Evgeniy Kononov Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Cyrus 2.4 and vacation problem (smtputf8)
Good morning, I upgraded servers to new Postfix versions, we had some issue with bounced vacation with czech characters. But postfix has smtputf8 support enabled : smtputf8_enable = yes smtputf8_autodetect_classes = sendmail, verify and the issue with emails (vacation) persists. After some checking I've found that thereis not postfix that bounce the message - it is cyrus'es LMTP, listenning on TCP/24: Sep 13 08:08:12 postman11 postfix/cleanup[2916]: 59F2A280DB7: message-id= Sep 13 08:08:12 postman11 postfix/qmgr[2885]: 59F2A280DB7: from=<>, size=658, nrcpt=1 (queue active) Sep 13 08:08:12 postman11 postfix/lmtp[2918]: 55497280DB5: to=, orig_to=, relay=postman.domain.cz[1.2.3.101]:24, delay=0.04, delays=0/0/0/0.04, dsn=2.1.5, status=sent (250 2.1.5 Ok SESSIONID=) Sep 13 08:08:12 postman11 postfix/qmgr[2885]: 55497280DB5: removed Sep 13 08:08:12 postman11 postfix/lmtp[2918]: 59F2A280DB7: to=, orig_to=, relay=postman.domain.cz[1.2.3.101]:24, delay=0.11, delays=0/0/0.1/0, dsn=5.6.7, status=bounced (SMTPUTF8 is required, but was not offered by host postman.domain.cz[1.2.3.101]) Sep 13 08:08:12 postman11 postfix/qmgr[2885]: 59F2A280DB7: removed So do I need to set something in cyrus config ? What did I missed ? Thanks and best regards J.Karliak -- Ma domena pouziva zabezpeceni a kontrolu SPF (www.openspf.org) a DomainKeys/DKIM (s ADSP) a implementaci DMARC. Pokud mate problemy s dorucenim emailu, zacnete pouzivat metody overeni puvody emailu zminene vyse. Dekuji. My domain use SPF (www.openspf.org) and DomainKeys/DKIM (with ADSP) policy and implementation of the DMARC. If you've problem with sending emails to me, start using email origin methods mentioned above. Thank you. Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus