non-interactive sieveshell not working
Hi, with cyrus-imap-2.1.4, I tried to echo "password" | sieveshell --authname=san --exec="activate vacation" localhost but it didn't work. The shell didn't exit, it instead prompt for commands. any ideas? san
RE: does cvt_cyrusdb work? is it normal to have "DBERRORS db3: x lockers" messages?
Luca, When I built the cyrus-sasl-2.1.2 rpm from your source files I noticed that the "make" output never had a "-I/usr/include/db3" which is where the include files for BerkeleyDB3.3 are stored from the Mandrake RPM's. I added a "CPPFLAGS=-I/usr/include/db3" in the cyrus-sasl.spec file before compiling... but not sure if it made a differece because: Also, I modified the cyrus.conf file to be more like the older version instead of the newer ones... here's mine... not sure which solved the problem, the .spec file mod or the .conf file mod: # standard standalone server implementation START { # do not delete this entry! recover cmd="ctl_cyrusdb -r" mboxlist cmd="ctl_mboxlist -r" deliver cmd="ctl_deliver -r" } # UNIX sockets start with a slash and are put into /var/lib/imap/sockets SERVICES { # add or remove based on preferences imap cmd="imapd" listen="imap" prefork=5 imaps cmd="imapd -s" listen="imaps" prefork=1 pop3 cmd="pop3d" listen="pop3" prefork=3 pop3s cmd="pop3d -s" listen="pop3s" prefork=1 sieve cmd="timsieved" listen="sieve" prefork=0 # at least one LMTP is required for delivery lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1 } EVENTS { # this is required # checkpoint cmd="ctl_cyrusdb -c" period=30 checkpoint cmd="ctl_mboxlist -c" period=30 # this is only necessary if using duplicate delivery suppression delprune cmd="ctl_deliver -E 3" period=1440 # this is only necessary if caching TLS sessions tlsprune cmd="tls_prune" period=1440 } Jeff > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Luca Olivetti > Sent: Thursday, May 16, 2002 1:48 PM > To: [EMAIL PROTECTED] > Subject: does cvt_cyrusdb work? is it normal to have "DBERRORS db3: x > lockers" messages? > > > Hi, > in an attempt to see if it solved the mozilla unseen problem (see > http://asg.web.cmu.edu/archive/message.php?mailbox=archive.info-cy rus&msg=13859) > I compiled cyrus with db3 as the seen db. I quickly went back to flat > because I saw much more "DBERRORS db3: x lockers" than normal (btw, is > it normal to see these messages?). > Anyway, before using the new imapd, I converted the seen db for myself > (/var/lib/imap/user/l/luca.seen) with cvt_cyrusdb, but *all* messages > appeared as unseen. > Is cvt_cyrusdb supposed to work for the seen.db? > > TIA > -- > Luca Olivetti > >
Re: Bogus Folders (Help)
Hi, I do not know sure. > In <232996312.1021642655@[192.168.2.1]> > Captain Zod <[EMAIL PROTECTED]> wrote: > I need help removing some bogus dir which shows up in lm using cyradm. In > actuality these don't exist. dm does not remove them. I tried to use > reconstruct but that gave me i/o error on those folders. Any ideas? In my case (cyrus-imapd-2.1.3); ;; I try to delete the mailbox "user.hoge" by adminuser "cyrus-admin". # cyradm --user cyrus-admin localhost [ret] Password: localhost> setacl user.hoge cyrus-admin c [ret] localhost> deletemailbox user.hoge [ret] -- Shinichiro HIDA mailto:[EMAIL PROTECTED] GPG fingerprint = 5F2D 1656 FFF6 F691 A51C 5E61 E416 D398 470C 1CE9
RE: PAM Authentication
On Wed, 2002-05-15 at 21:37, David Chait wrote: > May 15 20:41:43 bonmaildev saslauthd[19131]: AUTHFAIL: user=dchait > service=imap realm= [PAM auth error] > > This is what I received using the saslauthd -a pam option (pam didn't > work at all). Any ideas? I can't seem to find a reference for this error > anywhere. Run 'ldd' on the saslauthd and imapd binaries to see if they're linked to libpam.so; if not, you don't have them built with PAM support. Wil -- W. Reilly Cooley [EMAIL PROTECTED] Naked Ape Consultinghttp://nakedape.cc * Linux and Network Consulting * irc.linux.com #orlug,#lnxs "The only way for a reporter to look at a politician is down." -- H.L. Mencken signature.asc Description: This is a digitally signed message part
Bogus Folders (Help)
People, I need help removing some bogus dir which shows up in lm using cyradm. In actuality these don't exist. dm does not remove them. I tried to use reconstruct but that gave me i/o error on those folders. Any ideas? thx, zod
Re: [PATCH] 2.1.4 master process counting (cleaned up)
Well, that's it. I added a morgue, and now we have zero leakage of children, and no race conditions. Code seems to work, but I couldn't force the morgue codepath (I am doing this through a high-latency ssh connection), so it requires other eyeballs and some testing. Patch rediffed against 2.1.4 release tarball. -- "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-2.1.4.orig/master/master.c cyrus-imapd-2.1.4/master/master.c --- cyrus-imapd-2.1.4.orig/master/master.c Thu Apr 11 18:47:29 2002 +++ cyrus-imapd-2.1.4/master/master.c Fri May 17 14:57:41 2002 @@ -123,11 +123,13 @@ struct centry { pid_t pid; +int is_available; struct service *s; struct centry *next; }; static struct centry *ctable[child_table_size]; static struct centry *cfreelist; +static struct centry *morgue; void limit_fds(rlim_t); void schedule_event(struct event *a); @@ -586,6 +588,7 @@ /* add to child table */ c = get_centry(); c->pid = p; + c->is_available = 1; c->s = s; c->next = ctable[p % child_table_size]; ctable[p % child_table_size] = c; @@ -717,11 +720,21 @@ /* first thing in the linked list */ /* decrement active count for service */ - if (c->s) c->s->nactive--; + if (c->s) { + c->s->nactive--; + if (c->is_available) { + c->s->ready_workers--; + if (WIFSIGNALED(status) || + (WIFEXITED(status) && WEXITSTATUS(status))) { + syslog(LOG_WARNING, "available child %d terminated abnormally", + pid); + } + } + } ctable[pid % child_table_size] = c->next; - c->next = cfreelist; - cfreelist = c; + c->next = morgue; + morgue = c; } else { /* not the first thing in the linked list */ @@ -734,11 +747,21 @@ t = c->next; /* decrement active count for service */ - if (t->s) t->s->nactive--; + if (t->s) { + t->s->nactive--; + if (c->is_available) { + t->s->ready_workers--; + if (WIFSIGNALED(status) || + (WIFEXITED(status) && WEXITSTATUS(status))) { + syslog(LOG_WARNING, "available child %d terminated +abnormally", + pid); + } + } + } c->next = t->next; /* remove node */ - t->next = cfreelist; /* add to freelist */ - cfreelist = t; + t->next = morgue; + morgue = t; } else { /* yikes! don't know about this child! */ syslog(LOG_ERR, "process %d not recognized", pid); @@ -747,14 +770,14 @@ } } -static int gotsigchld = 0; +static volatile int gotsigchld = 0; void sigchld_handler(int sig __attribute__((unused))) { gotsigchld = 1; } -static int gotsighup = 0; +static volatile int gotsighup = 0; void sighup_handler(int sig __attribute__((unused))) { @@ -824,30 +847,73 @@ } } -void process_msg(struct service *s, int msg) +void process_msg(struct service *s, struct notify_message *msg) { -switch (msg) { +struct centry * c; +struct centry * t = NULL; +int in_morgue = 0; + +/* Search hash table with linked list for pid */ +c = ctable[msg->service_pid % child_table_size]; +while (c && c->pid != msg->service_pid) c = c->next; + +/* remember the recently deceased */ +if (!c) { + in_morgue = 1; /* speaker to the dead */ + c = morgue; + while (c && c->pid != msg->service_pid) { + t = c; + c = c->next; + } +} + +/* Did we find it? */ +if (!c || c->pid != msg->service_pid) { + syslog(LOG_ERR, "can't find pid %d to process message %d", + msg->service_pid, msg->message); + return; +} + +switch (msg->message) { case MASTER_SERVICE_AVAILABLE: - s->ready_workers++; + if (!in_morgue) { + c->is_available = 1; + s->ready_workers++; + } break; case MASTER_SERVICE_UNAVAILABLE: - s->ready_workers--; + if (!in_morgue) { + c->is_available = 0; + s->ready_workers--; + } break; case MASTER_SERVICE_CONNECTION: + if (!in_morgue && c->is_available) { + syslog(LOG_ERR, "still available child pid %d, service %s reported new +connection", + msg->service_pid, s->name); + } s->nconnections++; br
Re: [PATCH] Updated master.c process counting patch
Henrique de Moraes Holschuh wrote: >On Fri, 17 May 2002, Jeremy Howard wrote: > > >>I believe (?) that this issue is less important on Solaris, because I >>think that it handles close() differently to Linux. However on Linux it >>is vital to flush receive buffers and call shutdown() to avoid hanging >>connections. >> >> > >I am still studying the shutdown issue. BTW, why didn't you shutdown() all >streams at once, and then sleeped, instead of shutdown() and sleep one at a >time? > > Because it was late at night and I wasn't thinking straight... ;-)
Re: [PATCH] 2.1.4 master process counting
On Fri, 17 May 2002, Jeremy Howard wrote: > >Still, I am seriously thinking about doing something to any unknown children > >master notices (with proper LOG_ERR logging, of course) because said > >children is messaging it. Such a thing (unknown children) can only happen > >if either the underlying OS is messed up, or if we have a bug or memory > >corruption in the linked list, AFAIK. > > > > > Actually this can happen. The CHLD signal handler can run before master > gets to process the child's message. We see this happen quite regularly > on a busy server. Yeah, I just noticed we process signals first, and messages last. This needs some fixing... -- "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
Re: [PATCH] Updated master.c process counting patch
On Fri, 17 May 2002, Jeremy Howard wrote: > I believe (?) that this issue is less important on Solaris, because I > think that it handles close() differently to Linux. However on Linux it > is vital to flush receive buffers and call shutdown() to avoid hanging > connections. I am still studying the shutdown issue. BTW, why didn't you shutdown() all streams at once, and then sleeped, instead of shutdown() and sleep one at a time? -- "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
Re: [PATCH] 2.1.4 master process counting (cleaned up)
On Fri, 17 May 2002, Rob Mueller (fastmail) wrote: > Just a little note about this patch. This part: > > +/* Did we find it? */ > +if (!c || c->pid != msg->service_pid) { > + syslog(LOG_ERR, "can't find pid %d to process message %d", > + msg->service_pid, msg->message); > + return; > > We found that this actually occured quite-regularly, especially on a dual > proc machine. It seems that the child can be reaped by the master before the > master receives the message from the child. So I don't know if it should be > logged as an error, or just ignored... I will instead fix the master code so that it either makes such things impossible, or knows how to deal with them. I should have a patch ready soon. The problem is that master handles the signals first, and the messages later... and the protocol expects messages first, signals last :) -- "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
[PATCH] Re: sieveshell segfaults on sasl configuration error
Fix attached. -- "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 Index: perl/sieve/managesieve/managesieve.xs === RCS file: /home/cvs/debian/cyrus21-imapd/perl/sieve/managesieve/managesieve.xs,v retrieving revision 1.1.1.7 diff -u -r1.1.1.7 managesieve.xs --- perl/sieve/managesieve/managesieve.xs 23 Apr 2002 17:19:11 - 1.1.1.7 +++ perl/sieve/managesieve/managesieve.xs 17 May 2002 12:14:40 - @@ -271,9 +271,16 @@ ret->errstr = NULL; mechlist=read_capability(obj); + if (! mechlist) { + globalerr = "sasl mech list empty"; + XSRETURN_UNDEF; + } mlist = (char*) xstrdup(mechlist); - if(!mlist) XSRETURN_UNDEF; + if (!mlist) { + globalerr = "could not alocate memory for mech list"; + XSRETURN_UNDEF; + } /* loop through all the mechanisms */ do {
Cyrus 2.1.4 :Autentication problems
Hi, I have just installed Cyrus 2.1.4 and Cyrus SASL 2.1.2 If I connect into the IMAP server, all is OK: Trying 138.100.xx.39... Connected to cartero. Escape character is '^]'. * OK cartero Cyrus IMAP4 v2.1.4 server ready I have created a Cyrus user named "marga", and she is in the password database (/etc/sasldb2). When I try to connect into IMAP server from Outlook Express, I get an error message: "Connection refused". I have used "imtest" to test logging: /usr/local/bin/imtest -u marga cartero Then, I get the next message: C: C01 CAPABILITY S: * OK cartero.eui.upm.es Cyrus IMAP4 v2.1.4 server ready S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES IDLE AUTH=OTP AUTH=DIGEST-MD5 AUTH=CRAM-MD5 S: C01 OK Completed C: A01 AUTHENTICATE DIGEST-MD5 S: + bm9uY2U9IlM4MTRXbmQ2QlhyRUVzQXFNRkhkQWtrbTJPUnBpaHJMSzlkY1orRFhwWE09IixyZWFsbT0iY2FydGVyby5ldWkudX BtLmVzIixxb3A9ImF1dGgsYXV0aC1pbnQsYXV0aC1jb25mIixjaXBoZXI9InJjNC00MCxyYzQtNTYscmM0LGRlcywzZGVzIixjaGFyc2V0 PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vzcw== Please enter your password: C:dXNlcm5hbWU9ImN5cnVzIixyZWFsbT0iY2FydGVyby5ldWkudXBtLmVzIixhdXRoemlkPSJtYXJnYSIsbm9uY2U9IlM4MTRXbmQ2Ql hyRUVzQXFNRkhkQWtrbTJPUnBpaHJMSzlkY1orRFhwWE09Iixjbm9uY2U9IlpZdEp3UW1CYTJTVFIzWTlmd3cvMWtMaUZuZ2FX bkZ4aVk1R1kvVDF5TGc9IixuYz0wMDAwMDAwMSxxb3A9YXV0aC1jb25mLGNpcGhlcj0icmM0IixjaGFyc2V0PXV0Zi04LGRpZ2Vzd C11cmk9ImltYXAvY2FydGVyby5ldWkudXBtLmVzIixyZXNwb25zZT1mMDUwN2ZjYzk3Y2IxYmQwYmY0OWVjM2JjMWNhOTMyOA= = S: A01 NO Error authenticating Authentication failed. generic failure Security strength factor: 128 --- The operating System is Red Hat v 7.2 and the environment : Cyrus SASL 2.1.2 Sleepycat Software: Berkeley DB 3.2.9: (January 24, 2001) OpenSSL 0.9.6b [engine] 9 Jul 2001 CMU Sieve 2.1 I have configure for Cyrus-SASL 2.1.2 with: --disable-anon --enable-krb4=no --enable-plain and for Cyrus-imapd 2.1.4 with: --with-auth=unix--without-krb --with-sasldir=/usr/lib/sasl2 --with-tcl=/usr/lib/tcl Please, can somebody help me? Thanks. Margarita Sanz Escuela Universitaria de Informática Universidad Politécnica de Madrid.