Hi, Quoting Michael Menge <michael.menge@xxxxxxxxxxxxxxxxxxxx>:
Quoting Michael Menge <michael.menge@xxxxxxxxxxxxxxxxxxxx>:By thew way, the reason I was so surprised in the first place was, that I have been fooled by the documentation: Quoting https://cyrusimap.org/docs/cyrus-imapd/2.4.17/install-murder.phpConfiguring the frontends [...]However, because the frontends only talk to the mupdate master via a slave running on the local machine, you will also need to set up a slave on the same machine, in the SERVICES section of cyrus.conf, like soAnd an other misleading DOC !Quoting http://www.cyrusimap.org/mediawiki/index.php/Cyrus_Murder_Mail_DeliveryUMich patchPatch Patches are against 2.2 but are being moved to 2.3 Lmtpproxyd will now use the local mailboxes.db
Quoting Wesley Craig <wescraig@xxxxxxxxx>:
On 29 Sep 2014, at 10:08, Michael Menge <michael.menge@xxxxxxxxxxxxxxxxxxxx> wrote:thanks for your mail. By any chance do you still have the patch?In fact, I don't. Dusting off my notes, I recall now that instead of patching this (bogus) code, we instead decided to configure the frontends as "unified", while leaving the backends "standard". The only downside of this approach was that a naive admin could potentially create a user's mailbox on a frontend.Sorry I said that we ported that code forward: in fact we simply got the effect of consulting mailboxes.db without porting forward.:wes
I have patched my lmtpd to use the local mailbox.db in all cases, unified Murder, and standalone cyrus already did this. I tested it with a few testmails on my test system, but as i don't have a unified setup or a standalone test system at the moment i didn't test these setups. I would appreciate a review. Regards, Michael Menge -------------------------------------------------------------------------------- M.Menge Tel.: (49) 7071/29-70316 Universität Tübingen Fax.: (49) 7071/29-5912Zentrum für Datenverarbeitung mail: michael.menge@xxxxxxxxxxxxxxxxxxxx
Wächterstraße 76 72074 Tübingen
--- cyrus-imapd-2.4.17/imap/lmtpd.c 2012-12-01 20:57:54.000000000 +0100 +++ cyrus-imapd-2.4.17.lmtp_patch/imap/lmtpd.c 2014-09-29 15:27:55.000000000 +0200 @@ -186,56 +186,44 @@ global_sasl_init(1, 1, mysasl_cb); - if (config_mupdate_server && - (config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_STANDARD) && - !config_getstring(IMAPOPT_PROXYSERVERS)) { - /* proxy only -- talk directly to mupdate master */ - r = mupdate_connect(config_mupdate_server, NULL, &mhandle, NULL); - if (r) { - syslog(LOG_ERR, "couldn't connect to MUPDATE server %s: %s", - config_mupdate_server, error_message(r)); - fatal("error connecting with MUPDATE server", EC_TEMPFAIL); - } - } - else { - dupelim = config_getswitch(IMAPOPT_DUPLICATESUPPRESSION); + dupelim = config_getswitch(IMAPOPT_DUPLICATESUPPRESSION); #ifdef USE_SIEVE - mylmtp.addheaders = xzmalloc(2 * sizeof(struct addheader)); - mylmtp.addheaders[0].name = "X-Sieve"; - mylmtp.addheaders[0].body = SIEVE_VERSION; + mylmtp.addheaders = xzmalloc(2 * sizeof(struct addheader)); + mylmtp.addheaders[0].name = "X-Sieve"; + mylmtp.addheaders[0].body = SIEVE_VERSION; - /* setup sieve support */ - sieve_interp = setup_sieve(); + /* setup sieve support */ + sieve_interp = setup_sieve(); #else - if (dupelim) + if (dupelim) #endif - { - /* initialize duplicate delivery database */ - if (duplicate_init(NULL, 0) != 0) { - fatal("lmtpd: unable to init duplicate delivery database", - EC_SOFTWARE); - } + { + /* initialize duplicate delivery database */ + if (duplicate_init(NULL, 0) != 0) { + fatal("lmtpd: unable to init duplicate delivery database", + EC_SOFTWARE); } + } - /* so we can do mboxlist operations */ - mboxlist_init(0); - mboxlist_open(NULL); - - /* so we can do quota operations */ - quotadb_init(0); - quotadb_open(NULL); - - /* Initialize the annotatemore db (for sieve on shared mailboxes) */ - annotatemore_init(0, NULL, NULL); - annotatemore_open(NULL); + /* so we can do mboxlist operations */ + mboxlist_init(0); + mboxlist_open(NULL); - /* setup for statuscache invalidation */ - statuscache_open(NULL); + /* so we can do quota operations */ + quotadb_init(0); + quotadb_open(NULL); - /* setup for sending IMAP IDLE notifications */ - idle_enabled(); - } + /* Initialize the annotatemore db (for sieve on shared mailboxes) */ + annotatemore_init(0, NULL, NULL); + annotatemore_open(NULL); + + /* setup for statuscache invalidation */ + statuscache_open(NULL); + + /* setup for sending IMAP IDLE notifications */ + idle_enabled(); + /* Set namespace */ if ((r = mboxname_init_namespace(&lmtpd_namespace, 0)) != 0) { @@ -288,32 +276,8 @@ snmp_increment(TOTAL_CONNECTIONS, 1); snmp_increment(ACTIVE_CONNECTIONS, 1); - /* get a connection to the mupdate server */ r = 0; - if (mhandle) { - /* we have one already, test it */ - r = mupdate_noop(mhandle, mupdate_ignore_cb, NULL); - if (r) { - /* will NULL mhandle for us */ - mupdate_disconnect(&mhandle); - - /* connect to the mupdate server */ - r = mupdate_connect(config_mupdate_server, NULL, &mhandle, NULL); - } - } - if (!r) { - lmtpmode(&mylmtp, deliver_in, deliver_out, 0); - } else { - syslog(LOG_ERR, "couldn't connect to %s: %s", config_mupdate_server, - error_message(r)); - prot_printf(deliver_out, "451"); - if (config_serverinfo) prot_printf(deliver_out, " %s", config_servername); - if (config_serverinfo == IMAP_ENUM_SERVERINFO_ON) { - prot_printf(deliver_out, " Cyrus LMTP%s %s", - config_mupdate_server ? " Murder" : "", cyrus_version()); - } - prot_printf(deliver_out, " %s\r\n", error_message(r)); - } + lmtpmode(&mylmtp, deliver_in, deliver_out, 0); /* free session state */ if (deliver_in) prot_free(deliver_in); @@ -430,52 +394,27 @@ if (server) *server = NULL; - if (mhandle) { - /* proxy only, so check the mupdate master */ - struct mupdate_mailboxdata *mailboxdata; - - /* find what server we're sending this to */ - r = mupdate_find(mhandle, name, &mailboxdata); - - if (r == MUPDATE_MAILBOX_UNKNOWN) { - return IMAP_MAILBOX_NONEXISTENT; - } else if (r) { - /* xxx -- yuck: our error handling for now will be to exit; - this txn will be retried later -- to do otherwise means - that we may have to restart this transaction from scratch */ - fatal("error communicating with MUPDATE server", EC_TEMPFAIL); - } - - if (mailboxdata->t == RESERVE) return IMAP_MAILBOX_RESERVED; - - if (aclp) *aclp = (char *) mailboxdata->acl; - if (server) *server = (char *) mailboxdata->server; - c = strchr(*server, '!'); - if (c) *c = '\0'; - } - else { - struct mboxlist_entry mbentry; - /* do a local lookup and kick the slave if necessary */ - r = mboxlist_lookup(name, &mbentry, tid); - if (r == IMAP_MAILBOX_NONEXISTENT && config_mupdate_server) { - kick_mupdate(); - r = mboxlist_lookup(name, &mbentry, tid); - } - if (r) return r; - if (mbentry.mbtype & MBTYPE_MOVING) return IMAP_MAILBOX_MOVED; - if (mbentry.mbtype & MBTYPE_DELETED) return IMAP_MAILBOX_NONEXISTENT; - - if (aclp) *aclp = mbentry.acl; - if (server) { - if (mbentry.mbtype & MBTYPE_REMOTE) { - /* xxx hide the fact that we are storing partitions */ - *server = mbentry.partition; - c = strchr(*server, '!'); - if (c) *c = '\0'; - } + struct mboxlist_entry mbentry; + /* do a local lookup and kick the slave if necessary */ + r = mboxlist_lookup(name, &mbentry, tid); + if (r == IMAP_MAILBOX_NONEXISTENT && config_mupdate_server) { + kick_mupdate(); + r = mboxlist_lookup(name, &mbentry, tid); + } + if (r) return r; + if (mbentry.mbtype & MBTYPE_MOVING) return IMAP_MAILBOX_MOVED; + if (mbentry.mbtype & MBTYPE_DELETED) return IMAP_MAILBOX_NONEXISTENT; + + if (aclp) *aclp = mbentry.acl; + if (server) { + if (mbentry.mbtype & MBTYPE_REMOTE) { + /* xxx hide the fact that we are storing partitions */ + *server = mbentry.partition; + c = strchr(*server, '!'); + if (c) *c = '\0'; } } - + return r; }
Attachment:
smime.p7s
Description: S/MIME Signatur
---- 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