BerkeleyDB RPC Support
Attached is a patch that begins to implement a db3_rpc cyrusdb back-end. I worked-around my previous question (for now) by just implementing an open) that fakes the database name from the basename of the full path of the filename. I've only tested this with the mailboxes.db so far, the others that live in "configdirectory" will be tested tomorrow. I'm not sure what to do about: the per-user databases that could be db3, ctl_cyrusdb -- and I'm sure there's other stuff too... Comments please! Regards, -- Stephen L. Ulmer [EMAIL PROTECTED] Senior Systems Programmer http://www.ulmer.org/ Northeast Regional Data Center VOX: (352) 392-2061 University of Florida FAX: (352) 392-9440 diff -ruN cyrus-imapd-2.1.11/configure.in cyrus-imapd-2.1.11-db3_rpc+openhack/configure.in --- cyrus-imapd-2.1.11/configure.in Sat Nov 16 11:31:54 2002 +++ cyrus-imapd-2.1.11-db3_rpc+openhack/configure.in Mon Jan 6 16:56:14 2003 @@ -155,6 +155,7 @@ AC_MSG_CHECKING([$1 database backend]) if test "$3" != "db3" -a \ "$3" != "db3_nosync" -a \ + "$3" != "db3_rpc" -a \ "$3" != "flat" -a \ "$3" != "skiplist"; then AC_ERROR([invalid $1 value]) @@ -170,6 +171,7 @@ fi if test "$3" != "db3" -a \ "$3" != "db3_nosync" -a \ + "$3" != "db3_rpc" -a \ "$3" != "skiplist"; then AC_ERROR([invalid $1 value]) fi diff -ruN cyrus-imapd-2.1.11/lib/cyrusdb.c cyrus-imapd-2.1.11-db3_rpc+openhack/lib/cyrusdb.c --- cyrus-imapd-2.1.11/lib/cyrusdb.c Sat Feb 23 23:42:17 2002 +++ cyrus-imapd-2.1.11-db3_rpc+openhack/lib/cyrusdb.c Mon Jan 6 16:56:14 2003 @@ -61,6 +61,7 @@ struct cyrusdb_backend *cyrusdb_backends[] = { &cyrusdb_db3, &cyrusdb_db3_nosync, +&cyrusdb_db3_rpc, &cyrusdb_flat, &cyrusdb_skiplist, NULL }; diff -ruN cyrus-imapd-2.1.11/lib/cyrusdb.h cyrus-imapd-2.1.11-db3_rpc+openhack/lib/cyrusdb.h --- cyrus-imapd-2.1.11/lib/cyrusdb.h Wed Jul 24 14:05:18 2002 +++ cyrus-imapd-2.1.11-db3_rpc+openhack/lib/cyrusdb.h Mon Jan 6 16:56:14 2003 @@ -166,6 +166,7 @@ extern struct cyrusdb_backend cyrusdb_db3; extern struct cyrusdb_backend cyrusdb_db3_nosync; +extern struct cyrusdb_backend cyrusdb_db3_rpc; extern struct cyrusdb_backend cyrusdb_flat; extern struct cyrusdb_backend cyrusdb_skiplist; diff -ruN cyrus-imapd-2.1.11/lib/cyrusdb_db3.c cyrus-imapd-2.1.11-db3_rpc+openhack/lib/cyrusdb_db3.c --- cyrus-imapd-2.1.11/lib/cyrusdb_db3.c Mon Nov 4 12:32:07 2002 +++ cyrus-imapd-2.1.11-db3_rpc+openhack/lib/cyrusdb_db3.c Mon Jan 6 22:21:21 2003 @@ -50,6 +50,7 @@ #include #include #include +#include #include "cyrusdb.h" #include "exitcodes.h" @@ -913,6 +914,106 @@ return 0; } +static int init_rpc(const char *dbdir, int myflags) +{ +int r, do_retry = 1; +int flags = 0; +int maj, min, patch; +char *vstr, *rpc_server, *dbhome; +static char errpfx[10]; /* needs to be static; bdb doesn't copy */ + +if (dbinit++) return 0; + +vstr = db_version(&maj, &min, &patch); +if (maj != DB_VERSION_MAJOR || min != DB_VERSION_MINOR || + DB_VERSION_PATCH > patch) { + syslog(LOG_CRIT, "incorrect version of Berkeley db: " + "compiled against %d.%d.%d, linked against %d.%d.%d", + DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH, + maj, min, patch); + fatal("wrong db version", EC_SOFTWARE); +} + +if (myflags & CYRUSDB_RECOVER) { + flags |= DB_RECOVER | DB_CREATE; +} + +if ((r = db_env_create(&dbenv, DB_CLIENT)) != 0) { + syslog(LOG_ERR, "DBERROR: db_appinit failed: %s", db_strerror(r)); + return CYRUSDB_IOERROR; +} +dbenv->set_paniccall(dbenv, (void (*)(DB_ENV *, int)) &db_panic); +if (CONFIG_DB_VERBOSE) { + dbenv->set_verbose(dbenv, DB_VERB_DEADLOCK, 1); + dbenv->set_verbose(dbenv, DB_VERB_WAITSFOR, 1); +} +if (CONFIG_DB_VERBOSE > 1) { + dbenv->set_verbose(dbenv, DB_VERB_CHKPOINT, 1); +} +dbenv->set_lk_detect(dbenv, CONFIG_DEADLOCK_DETECTION); + +dbenv->set_errcall(dbenv, db_err); +snprintf(errpfx, sizeof(errpfx), "db%d", DB_VERSION_MAJOR); +dbenv->set_errpfx(dbenv, errpfx); + +/* Setup RPC server */ +rpc_server = config_getstring("db3_rpc_server", NULL); + +if ((r = dbenv->set_rpc_server(dbenv, NULL, rpc_server, 0, 0, 0)) != 0 ) { + syslog(LOG_ERR, "DBERROR: db_set_rpc_server failed: %s", db_strerror(r)); + return CYRUSDB_IOERROR; +} + +/* Setup DB "home" */ +dbhome = config_getstring("db3_rpc_home", NULL); + +/* what directory are we in? */ + retry: +flags |= DB_INIT_LOCK | DB_INIT_MPOOL | + DB_INIT_LOG | DB_INIT_TXN; +#if (DB_VERSION_MAJOR > 3) || ((DB_VERSION_MAJOR == 3) && (DB_VERSION_MINOR > 0)) +r = dbenv->open(dbenv, dbhome, flags, 0644); +#else +r = dbenv->open(dbenv, dbhome, NULL, flags, 0644); +#endif +if (r) { +if (do_retry && (r == ENOENT)) { + /* Per sleepycat Support Request #3838 reporting a performance pro
Re: Intermittent sieve failures...
The large number of Received headers might be exceeding some internal sieve limit. Try running the original message (and your script) through the sieve test program (sieve/test.c) and see what happens. Then try your trimmed message and see what happens. Of course, if test and lmtpd don't use the same header caching code (its been a while since I looked), then this won't prove anything. Rob Mueller wrote: > > I'm just wondering if anyone has seen anything like this. Basically I'm > noticing (and so have a few other users) that sieve scripts are *very* > intermittently failing. > > I've captured an example, and I'm wondering if I'm missing anything obvious. > > Basically, I've got a simple sieve script here: > > http://robm.fastmail.fm/sieve/default > > I recently received the following email from the mod_perl mailing list > > http://robm.fastmail.fm/sieve/sieveproblem.eml > > Now I think this email should have ended up in my "INBOX.mod_perl" folder, > but instead it ended up in my inbox. A trimmed version of the header is > here: > > Return-Path: <[EMAIL PROTECTED]> > Received: from server3.fastmail.fm (server3.internal [10.202.2.134]) > by server2.fastmail.fm (Cyrus v2.1.9) with LMTP; Mon, 06 Jan 2003 > 10:46:31 -0500 > X-Sieve: CMU Sieve 2.2 > Received: from server3.fastmail.fm (server3.internal [10.202.2.134]) > by server3.fastmail.fm (Cyrus v2.1.9) with LMTP; Mon, 06 Jan 2003 > 10:46:35 -0500 > Received: from server3.fastmail.fm (localhost [127.0.0.1]) > by fastmail.fm (Postfix) with ESMTP id 863B72D1DA > for <[EMAIL PROTECTED]>; Mon, 6 Jan 2003 10:46:28 -0500 (EST) > Received: from 127.0.0.1 ([127.0.0.1] helo=server3.fastmail.fm) by > fastmail.fm > with SMTP; Mon, 06 Jan 2003 10:46:28 -0500 > X-Mail-from: [EMAIL PROTECTED] > X-Delivered-to: <[EMAIL PROTECTED]> > X-Spam-score: 0.8 > Received: from apache.org (daedalus.apache.org [63.251.56.142]) > by server3.fastmail.fm (Postfix) with SMTP id 07CA529A11 > for <[EMAIL PROTECTED]>; Mon, 6 Jan 2003 10:46:28 -0500 (EST) > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > > There's lots of 'Received:' headers there as we go through postfix, then an > internal content filter, then postfix again, then an lmtpproxy, then lmtp > delivery to the final machine. The postfix log suggests everything went > fine: > > Jan 6 10:46:28 server3 postfix/smtpd[30351]: 07CA529A11: > client=daedalus.apache.org[63.251.56.142] > Jan 6 10:46:28 server3 postfix/cleanup[30552]: 07CA529A11: > message-id=<[EMAIL PROTECTED]> > Jan 6 10:46:28 server3 postfix/qmgr[28413]: 07CA529A11: > from=<[EMAIL PROTECTED]>, size=5689, > nrcpt=1 (queue active) > Jan 6 10:46:28 server3 postfix/smtpd[30644]: 863B72D1DA: > client=localhost[127.0.0.1] > Jan 6 10:46:34 server3 postfix/cleanup[30453]: 863B72D1DA: > message-id=<[EMAIL PROTECTED]> > Jan 6 10:46:35 server3 postfix/qmgr[28413]: 863B72D1DA: > from=<[EMAIL PROTECTED]>, size=6114, > nrcpt=1 (queue active) > Jan 6 10:46:35 server3 postfix/smtp[30616]: 07CA529A11: > to=<[EMAIL PROTECTED]>, relay=localhost[127.0.0.1], delay=7, status=sent (250 > Ok: queued as 863B72D1DA) > Jan 6 10:46:35 server3 postfix/lmtp[30660]: 863B72D1DA: > to=<[EMAIL PROTECTED]>, relay=10.202.2.134[10.202.2.134], delay=7, > status=sent (250 2.1.5 Ok) > > I checked the IMAP log at the time of delivery, and there are no errors at > all. No DBLOCKERS or anything. > > cyrus is 2.1.9 (with some recent security patches) > > Any ideas? > > Actually, it would be nice if there was some way to get some more sieve > diagnostics, or at least a verbose logging mode for a while to help track > down any problems like this. sieve seems to be about the most silent > software I've ever seen... > > Rob -- Kenneth Murchison Oceana Matrix Ltd. Software Engineer 21 Princeton Place 716-662-8973 x26 Orchard Park, NY 14127 --PGP Public Key--http://www.oceana.com/~ken/ksm.pgp
Re: How to upload a sieve script?
[EMAIL PROTECTED] wrote: > > Hi, > with help from Ken Murchison, i got the sieveshell working, but i can't upload a > script, getting: > > moria:/home/peter# cat test.script > #Example sieve script > #Reject messages based on criteria > > require ["fileinto"]; > > if header :contains ["From"] ["[EMAIL PROTECTED]"] { > fileinto "INBOX.peter"; > } > moria:/home/peter# sieveshell --user=peter --authname=peter localhost > connecting to localhost > Please enter your password: > > put test.script > upload failed: put script: Unable to open script for writing (test.script.NEW) > > quit > moria:/home/peter# ls -l test.script > -rwxrwxrwx1 root root 161 Jan 7 01:04 test.script > > Can anyone please help once more? What are the permissions on the sievedir tree? It should at least be owned by the cyrus user. -- Kenneth Murchison Oceana Matrix Ltd. Software Engineer 21 Princeton Place 716-662-8973 x26 Orchard Park, NY 14127 --PGP Public Key--http://www.oceana.com/~ken/ksm.pgp
Intermittent sieve failures...
I'm just wondering if anyone has seen anything like this. Basically I'm noticing (and so have a few other users) that sieve scripts are *very* intermittently failing. I've captured an example, and I'm wondering if I'm missing anything obvious. Basically, I've got a simple sieve script here: http://robm.fastmail.fm/sieve/default I recently received the following email from the mod_perl mailing list http://robm.fastmail.fm/sieve/sieveproblem.eml Now I think this email should have ended up in my "INBOX.mod_perl" folder, but instead it ended up in my inbox. A trimmed version of the header is here: Return-Path: <[EMAIL PROTECTED]> Received: from server3.fastmail.fm (server3.internal [10.202.2.134]) by server2.fastmail.fm (Cyrus v2.1.9) with LMTP; Mon, 06 Jan 2003 10:46:31 -0500 X-Sieve: CMU Sieve 2.2 Received: from server3.fastmail.fm (server3.internal [10.202.2.134]) by server3.fastmail.fm (Cyrus v2.1.9) with LMTP; Mon, 06 Jan 2003 10:46:35 -0500 Received: from server3.fastmail.fm (localhost [127.0.0.1]) by fastmail.fm (Postfix) with ESMTP id 863B72D1DA for <[EMAIL PROTECTED]>; Mon, 6 Jan 2003 10:46:28 -0500 (EST) Received: from 127.0.0.1 ([127.0.0.1] helo=server3.fastmail.fm) by fastmail.fm with SMTP; Mon, 06 Jan 2003 10:46:28 -0500 X-Mail-from: [EMAIL PROTECTED] X-Delivered-to: <[EMAIL PROTECTED]> X-Spam-score: 0.8 Received: from apache.org (daedalus.apache.org [63.251.56.142]) by server3.fastmail.fm (Postfix) with SMTP id 07CA529A11 for <[EMAIL PROTECTED]>; Mon, 6 Jan 2003 10:46:28 -0500 (EST) To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] There's lots of 'Received:' headers there as we go through postfix, then an internal content filter, then postfix again, then an lmtpproxy, then lmtp delivery to the final machine. The postfix log suggests everything went fine: Jan 6 10:46:28 server3 postfix/smtpd[30351]: 07CA529A11: client=daedalus.apache.org[63.251.56.142] Jan 6 10:46:28 server3 postfix/cleanup[30552]: 07CA529A11: message-id=<[EMAIL PROTECTED]> Jan 6 10:46:28 server3 postfix/qmgr[28413]: 07CA529A11: from=<[EMAIL PROTECTED]>, size=5689, nrcpt=1 (queue active) Jan 6 10:46:28 server3 postfix/smtpd[30644]: 863B72D1DA: client=localhost[127.0.0.1] Jan 6 10:46:34 server3 postfix/cleanup[30453]: 863B72D1DA: message-id=<[EMAIL PROTECTED]> Jan 6 10:46:35 server3 postfix/qmgr[28413]: 863B72D1DA: from=<[EMAIL PROTECTED]>, size=6114, nrcpt=1 (queue active) Jan 6 10:46:35 server3 postfix/smtp[30616]: 07CA529A11: to=<[EMAIL PROTECTED]>, relay=localhost[127.0.0.1], delay=7, status=sent (250 Ok: queued as 863B72D1DA) Jan 6 10:46:35 server3 postfix/lmtp[30660]: 863B72D1DA: to=<[EMAIL PROTECTED]>, relay=10.202.2.134[10.202.2.134], delay=7, status=sent (250 2.1.5 Ok) I checked the IMAP log at the time of delivery, and there are no errors at all. No DBLOCKERS or anything. cyrus is 2.1.9 (with some recent security patches) Any ideas? Actually, it would be nice if there was some way to get some more sieve diagnostics, or at least a verbose logging mode for a while to help track down any problems like this. sieve seems to be about the most silent software I've ever seen... Rob
How to upload a sieve script?
Hi, with help from Ken Murchison, i got the sieveshell working, but i can't upload a script, getting: moria:/home/peter# cat test.script #Example sieve script #Reject messages based on criteria require ["fileinto"]; if header :contains ["From"] ["[EMAIL PROTECTED]"] { fileinto "INBOX.peter"; } moria:/home/peter# sieveshell --user=peter --authname=peter localhost connecting to localhost Please enter your password: > put test.script upload failed: put script: Unable to open script for writing (test.script.NEW) > quit moria:/home/peter# ls -l test.script -rwxrwxrwx1 root root 161 Jan 7 01:04 test.script Can anyone please help once more? Thanks /peter - This mail sent through IMP: http://horde.org/imp/
Re: [PATCH] close potential buffer overflow in prot_flush (was: Re:[PATCH] imapd segfaults after broken pipe)
On Mon, 6 Jan 2003, Henrique de Moraes Holschuh wrote: > I suggest the assert in Gerd's patch to be moved to before the if clause. > That way, we catch any other bug that triggers that assert. Actually, based on discussions with Larry I'm pretty sure Gerd's patch is now extra code that doesn't add much benefit (except for extra comparisons in the "fast path"), so I'm probably going to just take it back out (Sorry Gerd). (since prot_flush is the only place it will really matter... and that will catch the problem once we get there). Thanks, -Rob -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456 Research Systems Programmer * /usr/contributed Gatekeeper
Re: Yet another mail-restore question...
Hello, Sadly we've a little experience in IMAP server recovery. Most of what I'm listing makes common sense but I'll say it anyway. How to quickly get back a once working server depends upon whats wrong with it. We've not had any problems with software failing but have had hardware bite us(me) in the butt. The major concern we have is restoring a server in the event it goes completely south. We were looking at this recently from the wrong side of the event. The RAID controller in the server was not a redundant controller and its battery was failing. When I attempted to replace the battery I only made things worse. The machine lost the file system with the mail store and configuration files on it. While 40 Gb of data may not sound like much by todays standards anymore, wait until you lose it and are looking at recovering it. ( And with a 10 Mb quota limit currently, you figure out how many users were somewhat upset. And yes, we are very overbooked for quota on our machines. Believe it or not the students can get by with the 10 Mb limit. Staff on the other hand, who have 20 Mb, are still not satisfied. ) We took a two pronged approach to see which would come back faster, rebuilding the filesystem on the current machine using fsck and selected restorations, or simply building a new machine and restoring to it. We actually had the fsck'ed machine back before the restoration was done, but decided that a reconcstruct on each individual mailbox should also be done. That took almost another twelve hours. Building the new machine was pretty straight forward in this case since we would have been able to simply take the system disk from the old machine and put it in the new machine and just rebooted with the new RAID unit. But we also have an IMAP install "kit" we can use to create a new IMAP server when we need one. We would then have done the restoration to the newly installed machine. I don't know from experience if any of the Bare Metal recovery methods would have done the restoration any faster. I do believe that the system disk if lost can probably be recovered significantly faster via Bare Metal methods ( Such as what Veritas markets ) but we do not yet have the technology in house here. This has made me painfully aware that large file systems, while nice to store lots of stuff, have severe drawbacks when it comes to replacing them from backup. We are wanting to get transitioned to a journaling file system in order to help reduce fsck times on the occasional/unscheduled reboot. The bottom line is you have to know your system and its requirements for recovery. Making public a document about how to restore service in the event of a disaster would only give you an outline to use at your site since you would probably use different backup methods, have different OS you were using, etc. And you should really be able to come up with the outline yourself. Regards, Earl Shannon -- Systems Programmer, Computing Services, Information Technology NC State University. http://www.earl.ncsu.edu Bryntez wrote: > > Has anybody on the list made a detailed doc about > howto restore the maildb in case of disaster ? > I mean a short, quick note with step-by-step commands > to execute, to quickly get back in business ? > > If for some reason the system crashes, it sure would have > been nice to have a doc at hand to quickly restore the > imap-system, saving time, and not having to browse the whole > documentation when the sweat are dripping and the stress- > level are at a dangerous level :-) > > A copy of such doc would have been reassuring > > (Running Cyrus imap/sasl 2.1.5 on RedHat 7.3) > > Regards > bryntez
Re: [PATCH] close potential buffer overflow in prot_flush (was: Re: [PATCH] imapd segfaults after broken pipe)
On Mon, 06 Jan 2003, Rob Siemborski wrote: > I've committed/credited this as well. By doing that you fixed the hole Gerd's workaround was initially added for :-) I suggest the assert in Gerd's patch to be moved to before the if clause. That way, we catch any other bug that triggers that assert. See attached patch... -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh diff -ru cyrus-imapd.orig/lib/prot.c cyrus-imapd/lib/prot.c --- cyrus-imapd.orig/lib/prot.c 2003-01-06 18:13:02.0 -0200 +++ cyrus-imapd/lib/prot.c 2003-01-06 18:27:33.0 -0200 @@ -797,8 +797,8 @@ int prot_putc(int c, struct protstream *s) { assert(s->write); -if(s->error || s->eof) return EOF; assert(s->cnt > 0); +if(s->error || s->eof) return EOF; *s->ptr++ = c; if (--s->cnt == 0) {
Re: Major Cyrus Problems
Hello, Make sure the users are actually subscribed to the folders and have permissions to access them. Regards, Earl Shannon -- Systems Programmer, Computing Services, Information Technology NC State University. http://www.earl.ncsu.edu Chris Nolan wrote: > > Hi, > > I'm running Cyrus 2.0.16 and a problem has arisen - users cannot see some > of their mail folders even though the directories are there and > reconstruct does recognise these folders when run. > > Any suggestions? > > Chris
Re: [PATCH] close potential buffer overflow in prot_flush (was: Re:[PATCH] imapd segfaults after broken pipe)
I've committed/credited this as well. Thanks, -Rob On Sun, 5 Jan 2003, Henrique de Moraes Holschuh wrote: > On Sun, 05 Jan 2003, Henrique de Moraes Holschuh wrote: > > On Sun, 05 Jan 2003, Gerd v. Egidy wrote: > > > > The attached patch fixes this. > > The attached patch fixes the bug in prot_flush. It also adds an assert that > protects the code from another potentially letal bug. > > Gerd's patch fixes another issue, which is that putc really should not be > suceeding on write streams that are on error or closed. > > -- > "One disk to rule them all, One disk to find them. One disk to bring > them all and in the darkness grind them. In the Land of Redmond > where the shadows lie." -- The Silicon Valley Tarot > Henrique Holschuh > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456 Research Systems Programmer * /usr/contributed Gatekeeper
Re: [PATCH] imapd segfaults after broken pipe
Both of these patches have been committed and credited. On to look at Henrique's addition Thanks, -Rob On Sun, 5 Jan 2003, Gerd v. Egidy wrote: > > The attached patch fixes this. > > Just a cosmetic fix - the defined prot_putc now returns EOF in case of error. > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456 Research Systems Programmer * /usr/contributed Gatekeeper
BerkeleyDB RPC support
Greetings, I'm interested in using the built-in RPC support in BerkeleyDB 4.x to network-abstract access to the mailboxes.db (and maybe other BerkeleyDBs). I did some experiments, and hacked-up the db3 back-end to do this (and am actually using it right now :). I believe that it'll be easy to add a db3-rpc (analogous db3 and db3-nosync) back-end. There is only one reason to change code outside the cyrusdb back-end: the full path to the database is carried around as the way to get to it. It looks like lots of places just take the "config directory" path and append the database name (e.g. mailboxes.db), usually from a #define. Up until now that made perfect sense -- every database type needed only a filename to identify it. If that (char *) were to be just the "name" of the database (i.e., "mailboxes"), then each back-end could do the appropriate thing (look up other configuration directives to find the database: hostnames, full path names, SQL database/table names; add the .db onto the end, whatever). Then every kind of DB that's been discussed here (Berkeley, SQL, skiplist, flat, whatever) could be represented, and adding other back-ends wouldn't require changes to other parts of the code. How do the maintainers feel about this? I'm definitely willing to write my own back-end. I think I can "fix" all of the other places in the code that would require changes (it seems like a very small change). I just want to make changes that will be accepted and mainstreamed... I'm currently using cyrus-imapd 2.1.11. Thanks, -- Stephen L. Ulmer [EMAIL PROTECTED] Senior Systems Programmer http://www.ulmer.org/ Northeast Regional Data Center VOX: (352) 392-2061 University of Florida FAX: (352) 392-9440
Re: Sieveshell not logging in
[EMAIL PROTECTED] wrote: > > Hi, > I have cyrus21 installed on debian. Imap works fine, I can telnet localhost 2000 > and get timesieve responding: > moria:/home/peter# telnet localhost 2000 > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > "IMPLEMENTATION" "Cyrus timsieved v2.1.11-Debian-5" > "SIEVE" "fileinto reject envelope vacation imapflags notify subaddress > relational regex" > OK > > However, I can't use sieveshel to activate scripts: > > moria:/home/peter# sieveshell localhost > connecting to localhost > unable to connect to server at /usr/bin/sieveshell line 174. > > Any hints on how to go on? SASL did not find any installed plugins (you should see a "SASL" line in the timsieved banner). Check to see if you have any installed plugins (/usr/lib/sasl2). -- Kenneth Murchison Oceana Matrix Ltd. Software Engineer 21 Princeton Place 716-662-8973 x26 Orchard Park, NY 14127 --PGP Public Key--http://www.oceana.com/~ken/ksm.pgp
RE : Sieveshell not logging in
Hi, You can try "sieveshell -u username -a username localhost" it should work fine. Then you can put a script and activate it, you can check in /usr/sieve/? If it was uploaded ... CU Greg -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Envoyé : Montag, 6. Januar 2003 20:31 À : [EMAIL PROTECTED] Objet : Sieveshell not logging in Hi, I have cyrus21 installed on debian. Imap works fine, I can telnet localhost 2000 and get timesieve responding: moria:/home/peter# telnet localhost 2000 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. "IMPLEMENTATION" "Cyrus timsieved v2.1.11-Debian-5" "SIEVE" "fileinto reject envelope vacation imapflags notify subaddress relational regex" OK However, I can't use sieveshel to activate scripts: moria:/home/peter# sieveshell localhost connecting to localhost unable to connect to server at /usr/bin/sieveshell line 174. Any hints on how to go on? Thanks /peter - This mail sent through IMP: http://horde.org/imp/
Sieveshell not logging in
Hi, I have cyrus21 installed on debian. Imap works fine, I can telnet localhost 2000 and get timesieve responding: moria:/home/peter# telnet localhost 2000 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. "IMPLEMENTATION" "Cyrus timsieved v2.1.11-Debian-5" "SIEVE" "fileinto reject envelope vacation imapflags notify subaddress relational regex" OK However, I can't use sieveshel to activate scripts: moria:/home/peter# sieveshell localhost connecting to localhost unable to connect to server at /usr/bin/sieveshell line 174. Any hints on how to go on? Thanks /peter - This mail sent through IMP: http://horde.org/imp/
cyradm: two passwords ?
Hi, I would like to know if it is normal that cyradm --auth plain localhost asks for the password two times (password and imap password, what is the difference ?) ? Did I make a mistake in my configuration? sasl_pwcheck_method: saslauthd allowanonymouslogin: no sasl_auto_transition: yes allowplaintext: yes saslauthd -a shadow Thanks Greg
sieve setup problems
Hi, I think there is a problem writing the mail files into the queue folder, cyrus seems not to be allowed to write anything. In which folder is cyrus trying to write and how did you setup the permissions on this folder ? Mytest script is: require ["fileinto","reject"]; if allof (header :contains "subject" "test") { reject text: fuck off . ; } elsif allof (header :contains "subject" "greg") { redirect "[EMAIL PROTECTED]"; } Maillog: Jan 6 18:25:51 dhcp sendmail[25309]: h06HPpNt025309: Authentication-Warning: dhcp19.eunet.ch: cyrus set sender to root@dhcp using -f Jan 6 18:25:51 dhcp sendmail[25309]: h06HPpNt025309: SYSERR(cyrus): collect: Cannot write ./dfh06HPpNt025309 (bfcommit, uid=60, gid=502): Permission denied Jan 6 18:25:51 dhcp sendmail[25309]: h06HPpNt025309: from=root@dhcp, size=677, class=0, nrcpts=1, relay=cyrus@localhost Jan 6 18:25:51 dhcp sendmail[25309]: h06HPpNt025309: 0: fl=0x0, mode=10600: FIFO: dev=0/5, ino=3689856, nlink=1, u/gid=60/60, size=0 Jan 6 18:25:51 dhcp sendmail[25309]: h06HPpNt025309: 1: fl=0x2, mode=140777: SOCK [[UNIX: /var/imap/socket/lmtp]]->[[UNIX: /var/imap/socket/lmtp]] Jan 6 18:25:51 dhcp sendmail[25309]: h06HPpNt025309: 2: fl=0x2, mode=140777: SOCK [[UNIX: /var/imap/socket/lmtp]]->[[UNIX: /var/imap/socket/lmtp]] Jan 6 18:25:51 dhcp sendmail[25309]: h06HPpNt025309: 3: fl=0x2, mode=140777: SOCK localhost->[[UNIX: /dev/log]] Jan 6 18:25:51 dhcp sendmail[25309]: h06HPpNt025309: 4: fl=0x1, mode=20666: CHR: dev=3/2, ino=66746, nlink=1, u/gid=0/0, size=0 Jan 6 18:25:51 dhcp sendmail[25309]: h06HPpNt025309: SYSERR(cyrus): queueup: cannot create queue temp file ./tfh06HPpNt025309, uid=60: Permission denied Jan 6 18:25:51 dhcp sendmail[25307]: h06HPobq025305: to=, delay=00:00:01, xdelay=00:00:01, mailer=cyrusv2, pri=30304, relay=localhost, dsn=2.0.0, stat=Sent Cyruslog: Jan 6 18:25:50 dhcp19 master[25308]: about to exec /usr/cyrus/bin/lmtpd Jan 6 18:25:50 dhcp19 lmtpunix[25308]: executed Jan 6 18:25:50 dhcp19 lmtpd[25308]: accepted connection Jan 6 18:25:50 dhcp19 lmtpd[25308]: lmtp connection preauth'd as postman Jan 6 18:25:51 dhcp19 lmtpd[25308]: duplicate_check: <[EMAIL PROTECTED]>[EMAIL PROTECTED] .greg.sieve. 0 Jan 6 18:25:51 dhcp19 lmtpd[25308]: sieve runtime error for greg id <[EMAIL PROTECTED]>: Redirect: Sendmail process terminated normally, exit status 71 Jan 6 18:25:51 dhcp19 lmtpd[25308]: duplicate_check: <[EMAIL PROTECTED]> user.greg0
Re: Cyrus Authentication Problem
Jon \"GenKIller\" Gaudette wrote: > > Good and Bad News :( > > That fixed that particular authentication error, but aunveiled another > one :( > > Now when I issue the command imtest -m login -p imap localhost as user > cyrus it 'works'. However, when I try to create a new user by following > the directions at http://en.tldp.org/HOWTO/Cyrus-IMAP-8.html#ss8.2 I > cannot seem to add users to my server: > > I attempted to create the user 'joebob'. But even after I user > 'saslpasswd joebob' and set the password accordingly, I still get the > following error when attempting to login If you are using /etc/shadow for plaintext passwords, then you need to add joebob's password with 'passwd' or whatever command you use on your system. > > --- > [root@mail root]# imtest -m login -a joebob localhost > S: * OK mail.url Cyrus IMAP4 v2.1.11-Invoca-RPM-2.1.11-3 server ready > C: C01 CAPABILITY > S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS > NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND SORT > THREAD=ORDEREDSUBJECT THREAD=REFERENCES IDLE STARTTLS LISTEXT > LIST-SUBSCRIBED ANNOTATEMORE X-NETSCAPE > S: C01 OK Completed > Please enter your password: > C: L01 LOGIN joebob {8} > S: + go ahead > C: > S: L01 NO Login failed: authentication failure > Authentication failed. generic failure > Security strength factor: 0 > . logout > * BYE LOGOUT received > . OK Completed > Connection closed. > --- > > Thank you very much for the help thus far, and help you can provide > again will be truly appreciated!!! > > -Jon > > On Sun, 2003-01-05 at 12:47, Ken Murchison wrote: > > This is not valid with SASLv2 (I'm guessing that you read this in an old > > FAQ somewhere). Change this to 'saslauthd' and start 'saslauthd -a > > shadow' -- Kenneth Murchison Oceana Matrix Ltd. Software Engineer 21 Princeton Place 716-662-8973 x26 Orchard Park, NY 14127 --PGP Public Key--http://www.oceana.com/~ken/ksm.pgp
Re: Cyrus Authentication Problem
Good and Bad News :( That fixed that particular authentication error, but aunveiled another one :( Now when I issue the command imtest -m login -p imap localhost as user cyrus it 'works'. However, when I try to create a new user by following the directions at http://en.tldp.org/HOWTO/Cyrus-IMAP-8.html#ss8.2 I cannot seem to add users to my server: I attempted to create the user 'joebob'. But even after I user 'saslpasswd joebob' and set the password accordingly, I still get the following error when attempting to login --- [root@mail root]# imtest -m login -a joebob localhost S: * OK mail.url Cyrus IMAP4 v2.1.11-Invoca-RPM-2.1.11-3 server ready C: C01 CAPABILITY S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES IDLE STARTTLS LISTEXT LIST-SUBSCRIBED ANNOTATEMORE X-NETSCAPE S: C01 OK Completed Please enter your password: C: L01 LOGIN joebob {8} S: + go ahead C: S: L01 NO Login failed: authentication failure Authentication failed. generic failure Security strength factor: 0 . logout * BYE LOGOUT received . OK Completed Connection closed. --- Thank you very much for the help thus far, and help you can provide again will be truly appreciated!!! -Jon On Sun, 2003-01-05 at 12:47, Ken Murchison wrote: > This is not valid with SASLv2 (I'm guessing that you read this in an old > FAQ somewhere). Change this to 'saslauthd' and start 'saslauthd -a > shadow'
lmtpd don't advertise the "EXTERNAL" auth method
Hi! I use a backported version of debian's (thanks hmh) cyrus21 2.1.11-5 package. My problem is that, lmtpd don't advertise the "EXTERNAL" auth method on unix socket (neither on tcp). Because it, cyrdeliver (deliver) can't use the AUTH parameter of the MAIL FROM command (see lmtp_runtxn in lmtpengine.c), and because it, cyrdeliver (-a auth-id option) and the mta can't provide the authenticated userid to cyrus. Every post run as "anyone", so our users cant post to the shared folders etc etc. 2.1.9 and under seems to works fine. (I didn't use 2.1.10) What's the solution? Can anybody reproduce it? Thanks balsa # socat UNIX-CONNECT:/var/run/cyrus/socket/lmtp - 220 mail.rit.bme.hu LMTP Cyrus v2.1.11-Debian-4.woody.1 ready LHLO mail.rit.bme.hu 250-mail.rit.bme.hu 250-8BITMIME 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-SIZE 250 IGNOREQUOTA Note,that lmtpd misses the 250-AUTH EXTERNAL line. /etc/cyrus.conf: lmtpunixcmd="lmtpd" listen="/var/run/cyrus/socket/lmtp" prefork=1 maxchild=20 /etc/imapd.conf: configdirectory: /var/lib/cyrus defaultpartition: default partition-default: /var/spool/cyrus/mail partition-news: /var/spool/cyrus/news newsspool: /var/spool/news altnamespace: no unixhierarchysep: no admins: cyrus admin realman allowanonymouslogin: no popminpoll: 0 autocreatequota: 0 umask: 077 sendmail: /usr/sbin/sendmail sieveusehomedir: false sievedir: /var/spool/sieve hashimapspool: true allowplaintext: yes # i dont think, that EXTERNAL is neaded here sasl_mech_list: PLAIN LOGIN GSSAPI KERBEROS_V4 EXTERNAL sasl_minimum_layer: 56 sasl_pwcheck_method: saslauthd sasl_auto_transition: yes servername: mail.rit.bme.hu loginrealms: RIT.BME.HU tls_cert_file: /etc/ssl/certs/mail.rit.bme.hu.crt tls_key_file: /etc/ssl/certs/mail.rit.bme.hu.key.nopass tls_ca_file: /etc/ssl/certs/ca.crt tls_session_timeout: 1440 tls_cipher_list: TLSv1:SSLv3:SSLv2:!NULL:!EXPORT:!DES:!LOW:@STRENGTH lmtpsocket: /var/run/cyrus/socket/lmtp idlesocket: /var/run/cyrus/socket/idle notifysocket: /var/run/cyrus/socket/notify
Re: Sieve reject working but emails get delivered to inbox ?
Christian Schulte wrote: > > Hi, > > I installed the contrib/sieve-spamassassin patches and everything is > working in my 2.2-cvs installation. My problem now is, that sieve reject > seems to not work properly. > > require ["spam", "fileinto", "reject"]; > > if spam { > reject "This email did not pass our spam-detection tests and > was identified as beeing spam! The recipient did NOT receive this email!"; > discard ; > } > > This is a part of my sieve-script. It should reply to all spam > identified emails with the reject text und afterthat should discard the > email so that it will not get delivered to the inbox. This does not work > for me! The rejection-email gets send but the email will not get > discarded and thus gets delivered to the users inbox what I do not want! > How can I auto-reply to and discard emails with sieve ? Actually, the discard shouldn't be necessary, since the reject should cancel the implicit keep. Are you seeing any errors in imapd.log? If sieve thinks that some action is failing, it will abort the script and _always_ do a keep. -- Kenneth Murchison Oceana Matrix Ltd. Software Engineer 21 Princeton Place 716-662-8973 x26 Orchard Park, NY 14127 --PGP Public Key--http://www.oceana.com/~ken/ksm.pgp
Re: Problem with starting Cyradm
On Mon, 6 Jan 2003, Dennis Pedersen wrote: > Hi, > I have been trying to get Cyrus (cyrus-imapd-2.0.17 ) to work on my > FreeBSD box (4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct 9 15:08:34 GMT > 2002 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC > i386). Cyrus has been installed through ports and I just did a cvsup > before installing to make sure (I installed it on a simmular box for > some time ago, pretty much the same fault so I'm missing something.) [snip] > C: C01 CAPABILITY > S: * OK samba.jr-data.dk Cyrus IMAP4 v2.0.17 server ready > S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS ID > NO_ATOMIC_RENAME UNSELECT MULTIAPPEND SORT THREAD=ORDEREDSUBJECT > THREAD=REFERENCES IDLE AUTH=DIGEST-MD5 AUTH=CRAM-MD5 [snip] > Imap.conf: > sasl_pwcheck_method: pwcheck > admins: cyrus > > rc.conf: > sasl_pwcheck_enable="YES" > sasl_pwcheck_program="/usr/local/sbin/pwcheck" CRAM-MD5 DIGEST-MD5 will only work (in SASLv1) if you use the sasldb to get password equivilants. If you need to use pwcheck, you must use plain and/or login. I do recommend you upgrade to 2.1.11 if this is a new installation. -Rob -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456 Research Systems Programmer * /usr/contributed Gatekeeper
Re: Problem with starting Cyradm
* Dennis Pedersen <[EMAIL PROTECTED]> [06-01-03 08:27]: > Hi, > I have been trying to get Cyrus (cyrus-imapd-2.0.17 ) to work on my > FreeBSD box (4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct 9 15:08:34 GMT > 2002 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC > i386). Cyrus has been installed through ports and I just did a cvsup > before installing to make sure (I installed it on a simmular box for > some time ago, pretty much the same fault so I'm missing something.) > > %whoami > cyrus > %imtest -m login -p imap localhost > C: C01 CAPABILITY > S: * OK samba.jr-data.dk Cyrus IMAP4 v2.0.17 server ready > S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS ID > NO_ATOMIC_RENAME UNSELECT MULTIAPPEND SORT THREAD=ORDEREDSUBJECT > THREAD=REFERENCES IDLE AUTH=DIGEST-MD5 AUTH=CRAM-MD5 > S: C01 OK Completed > Password: > C: L01 LOGIN cyrus {6} > + go ahead > C: > L01 OK User logged in > Authenticated. > Security strength factor: 0 > > Okai the login part works fine. > Then I want to start up the cyradm : > > %cyradm localhost > Please enter your password: > cyradm: cannot authenticate to server with as cyrus > > /var/log/messages writes the following: > Jan 6 11:25:20 samba imapd[48715]: badlogin: localhost[::1] DIGEST-MD5 > authentication failure [unable to get user's secret] > > Groups.google.com did'nt show much about what could be the possible > solution to this - anyone? > > > > Imap.conf: > sasl_pwcheck_method: pwcheck > admins: cyrus > > rc.conf: > sasl_pwcheck_enable="YES" > sasl_pwcheck_program="/usr/local/sbin/pwcheck" Use: cyradm --auth LOGIN localhost and should work. man cyradm for more details. hth, mitu
setup problem: websieve
I try to setup websieve, but I get the following error, has anybody an idea: Mail Account Management Login Error There was an error in login you to the server. Please click HERE and try again. System Error: No Errors It seems to be a known bug ? http://sourceforge.net/tracker/index.php?func=detail&aid=511466&group_id=340 08&atid=409930 --- my log --- Jan 6 12:43:53 dhcp imapd[694]: accepted connection Jan 6 12:43:53 dhcp imapd[694]: login: localhost.localdomain[127.0.0.1] greg plaintext Jan 6 12:43:53 dhcp master[711]: about to exec /usr/cyrus/bin/timsieved Jan 6 12:43:53 dhcp sieve[711]: executed Jan 6 12:43:53 dhcp sieve[711]: accepted connection Jan 6 12:43:53 dhcp timsieved[711]: login: localhost.localdomain[127.0.0.1] greg PLAIN User logged in Jan 6 12:43:54 dhcp master[542]: process 711 exited, status 0 --- my log --- Many thanks for your help Greg
Problem with starting Cyradm
Hi, I have been trying to get Cyrus (cyrus-imapd-2.0.17 ) to work on my FreeBSD box (4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct 9 15:08:34 GMT 2002 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC i386). Cyrus has been installed through ports and I just did a cvsup before installing to make sure (I installed it on a simmular box for some time ago, pretty much the same fault so I’m missing something.) %whoami cyrus %imtest -m login -p imap localhost C: C01 CAPABILITY S: * OK samba.jr-data.dk Cyrus IMAP4 v2.0.17 server ready S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT MULTIAPPEND SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES IDLE AUTH=DIGEST-MD5 AUTH=CRAM-MD5 S: C01 OK Completed Password: C: L01 LOGIN cyrus {6} + go ahead C: L01 OK User logged in Authenticated. Security strength factor: 0 Okai the login part works fine. Then I want to start up the cyradm : %cyradm localhost Please enter your password: cyradm: cannot authenticate to server with as cyrus /var/log/messages writes the following: Jan 6 11:25:20 samba imapd[48715]: badlogin: localhost[::1] DIGEST-MD5 authentication failure [unable to get user's secret] Groups.google.com did’nt show much about what could be the possible solution to this – anyone? Imap.conf: sasl_pwcheck_method: pwcheck admins: cyrus rc.conf: sasl_pwcheck_enable="YES" sasl_pwcheck_program="/usr/local/sbin/pwcheck" Regards, Dennis
Re: Including UCD-SNMP support in Cyrus IMAPD
--On Sunday, January 05, 2003 7:22 PM +0100 [EMAIL PROTECTED] wrote: Try, LIBS="-lkstat -lkvm" ./configure ... I now had a try and it finally compiled perfectly ! Now, is that somehow normal that I need to do that, shouldn't this be automatically done with the configure script ? UCD SNMP can depend on so many different system libraries it's pretty hard to design a reliable configure test. We don't want to bring in many libraries that we don't need to since that can cause other problems. Also, dynamic libraries should have implicit dependencies, so this sort of thing isn't necessary if you have dynamic snmp libraries. I guess it would be nice if the net-snmp folks provided a configure test themselves, since they're the ones who would have some idea of what it could depend on. Larry
Re: Question about reconstruct and main mailbox
--On Saturday, January 04, 2003 11:56 AM -0800 Doug <[EMAIL PROTECTED]> wrote: Hi! I'm looking at upgrading from a Cyrus 1.5 to a more current Cyrus Imap, and have noticed that the 'reconstruct -m' function is not implemented. I think we know that things happen. Is there any way in version 2.1.* to build a new 'mailboxes' database if it gets corrupted? reconstruct -r -f does almost the same thing. Larry
Re: Including UCD-SNMP support in Cyrus IMAPD
Hi there, You are right, an ldd on the Cyrus binaries showed up kstat and kvm library... Hopefully this doesn't use too much memory. Btw: I saw that only the master binary from Cyrus IMAPD does use the UCD-SNMP library so wouldn't it be a better idea to link only the kvm and kstat library against the master binary ? If yes do you have an idea how I could acheive that ? As you say it would be much better having UCD-SNMP dealing with those libraries and not Cyrus IMAP, already tryed writting to the UCD-SNMP team about that ? Thanks again for your help... Regards Marc Igor Brezac To: [EMAIL PROTECTED] <[EMAIL PROTECTED] cc: Scott Smith <[EMAIL PROTECTED]> t> Subject: Re: Including UCD-SNMP support in Cyrus IMAPD 01/05/03 08:32 PM Please respond to info-cyrus On Sun, 5 Jan 2003 [EMAIL PROTECTED] wrote: > > >Try, > >LIBS="-lkstat -lkvm" ./configure ... > > I now had a try and it finally compiled perfectly ! Now, is that somehow One small issue is that all your cyrus binaries are linked with "-lkstat -lkvm". This is not a problem except for a slightly higher memory usage. > normal that I need to do that, shouldn't this be automatically done with > the configure script ? > I do not thinks so. The real fix is to build self-contained ucd libs. The ucd libraries are kinda messy, there are all sorts of cross dependencies (libucdagent depends on libucdmibs and vice versa). I had a time trying to sort this out. ;( -Igor