[Fwd: Re: Cyrus IMAPd 2.2.5 Released]

2004-05-30 Thread Andrew Koros
This patch from Christian Stuke <[EMAIL PROTECTED]> solved the problem.

THanks every one.

-Forwarded Message-
From: Christian Stuke <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Cyrus IMAPd 2.2.5 Released
Date: Sat, 29 May 2004 14:53:25 +0200

Andrew Koros wrote:

> Hello Simon,
> 
> I can't get your new cyrus-imap-2.2.5 to build on Fedora. I get this
> errror:
> 
> mailbox.c: In function `mailbox_updatequota':
> mailbox.c:2769: warning: passing arg 1 of `quota_commit' from
> incompatible pointer type
> gcc -c -I.. -I./../lib  -I./../sieve -I/usr/include/db4
> -I/usr/include/et -I/usr/kerberos/include -I/usr/include 
> -DHAVE_CONFIG_H  -O2 -g -march=i386 -mcpu=i686 -fPIC \
> mboxlist.c
> mboxlist.c:2581:21: missing terminating " character
gcc requires a \ at eol when a " is still open :-)
> mboxlist.c: In function `mboxlist_changequota':
> mboxlist.c:2582: error: syntax error before "Command"
> mboxlist.c:2583:49: missing terminating " character
> mboxlist.c: In function `mboxlist_autosubscribe_sharedfolders':
> mboxlist.c:3192: warning: assignment makes integer from pointer without
> a cast
> make[1]: *** [mboxlist.o] Error 1
> make[1]: Leaving directory
> `/home/koros/rpm/BUILD/cyrus-imapd-2.2.5/imap'
> make: *** [all] Error 1
> error: Bad exit status from /var/tmp/rpm-tmp.88793 (%build)
>  
>  
> RPM build errors:
> Bad exit status from /var/tmp/rpm-tmp.88793 (%build)
> 
>  
> Regards,
> 
> Andrew Koros.
Fixed diff attached

Mfg,
Doc
-- 
Andrew Koros  
Systems Developer

UUNET KENYA LTD
2nd Floor Parkside Towers
Mombasa Road, Nairobi

Tel: +254 2 69088618
Fax: +254 2 69088001
Email: [EMAIL PROTECTED]   

http://www.uunet.co.ke

NOTICE: "The contents of this e-mail and any accompanying documentation is
confidential and any use thereof, in whatever form, by anyone other than the
addressee for whom it is intended, is strictly prohibited."

|~
|   / /  (_)__  __   __ |  
|  / /__/ / _ \/ // /\ \/ / | Freedom to
| //_/_//_/\_,_/ /_/\_\ | Experiment
|~


---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Reconstruct

2004-05-30 Thread Adi Linden
Is it possible to reconstruct from just the files in /var/spool/imap/user 
and a text dump of the /var/lib/imap/mailboxes.db file?

Adi

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Deletemailbox patch for cyrus.

2004-05-30 Thread Aristotelis

  Hello all, 

 A new patch for cyrus 2.2.5 is released today. 

Cyrus imap doesn't remove the quota from a folder when this folder is deleted
except if the folder is user.X folder. There are some comments in Cyrus code
about possible places where code can be inserted to deal with this situation.
 This patch is a suggestion on the behaviour of cyrus-imap when a folder is
deleted. With this patch the quota is removed in two cases:
1)The user explicitely requests the deletetion of quota. In order to request the
deletion of the quota the convention that + must procceed the name of the folder
was used. i.e if i want to delete the folder koko.lala and remove the the quota
the command would be:

. delete +koko.lala

2)The soon-to-be-deleted-folder's quota root has no subfolders. Then we can
assume that the reasonable thing to do is to delete also the quota. This
actually can mean two things. If the folder's quota root is the folder himself
then this means that this folder has no subfolder. If the folder's quota root is
a higher-level non-existent subfolder this means that the
soon-to-be-deleted-folder is its only subfolder.



  You can grab the patch at the following URL :

 http://email.uoa.gr/projects/cyrus/quota-patches/deletemailbox/index.html


 This patch is not heavily tested.

  For comments, bug reports, suggestions don't hesitate to contact me.

   Best Regards, 
   Aristotelis
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Update to UoA rmquota cyrus patch

2004-05-30 Thread Aristotelis

  Hello all, 

A newer version of the rmquota patch is now available. It contains some minor fixes.

 You can grab it from the following URL:

   http://email.uoa.gr/projects/cyrus/quota-patches/rmquota/index.html


 Regards,
  Aristotelis
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


System I/O errors after Cyrus upgrade

2004-05-30 Thread Shawn Sivy
I upgrade from Cyrus 2.0.16 to Cyrus 2.2.5 this past weekend.  I also 
upgrade Postfix from 1.x to 2.1.1.  After running for a little while, I 
get the error messages below.  If I run a "postfix flush", the message 
usually get delivered fine.  I've seen some talk on the list about 
System I/O errors and interaction with Postfix, Cyrus and LMTP, but I 
haven't a solution that worked for my situation.  Any help or direction 
would be appreciated.

May 30 17:52:57 cyrus lmtpunix[14954]: [ID 240394 local6.error] IOERROR: 
opening quota file /var/imap/quota/m/user.macey2: Too many open files
May 30 17:52:57 cyrus lmtpunix[14954]: [ID 335833 local6.error] DBERROR: 
error fetching user.macey2: cyrusdb error
May 30 17:52:57 cyrus lmtpunix[14954]: [ID 860734 local6.debug] 
verify_user(user.macey2) failed: System I/O error
May 30 17:53:20 cyrus lmtpunix[14954]: [ID 240394 local6.error] IOERROR: 
opening quota file /var/imap/quota/s/user.sdhugg: Too many open files
May 30 17:53:20 cyrus lmtpunix[14954]: [ID 335833 local6.error] DBERROR: 
error fetching user.sdhugg: cyrusdb error
May 30 17:53:20 cyrus lmtpunix[14954]: [ID 860734 local6.debug] 
verify_user(user.sdhugg) failed: System I/O error
May 30 17:53:40 cyrus lmtpunix[14954]: [ID 240394 local6.error] IOERROR: 
opening quota file /var/imap/quota/s/user.samuel2: Too many open files
May 30 17:53:40 cyrus lmtpunix[14954]: [ID 335833 local6.error] DBERROR: 
error fetching user.samuel2: cyrusdb error
May 30 17:53:40 cyrus lmtpunix[14954]: [ID 860734 local6.debug] 
verify_user(user.samuel2) failed: System I/O error
May 30 17:54:05 cyrus lmtpunix[14954]: [ID 240394 local6.error] IOERROR: 
opening quota file /var/imap/quota/b/user.balaisi2: Too many open files
May 30 17:54:05 cyrus lmtpunix[14954]: [ID 335833 local6.error] DBERROR: 
error fetching user.balaisi2: cyrusdb error
May 30 17:54:05 cyrus lmtpunix[14954]: [ID 860734 local6.debug] 
verify_user(user.balaisi2) failed: System I/O error

Thanks,
 -Shawn
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Spam Filtering in lmtpd

2004-05-30 Thread Markus Wernig
Hi all

I have setup cyrus and sendmail with spamass-milter and clam-milter and
am very happy with it. The one problem (besides user-based bayes
databases) is that every mail gets spam-scanned, even if only relayed.
My idea now is that only those messages should be passed to spamd that
are to be delivered locally. If I'm not totally wrong this can't be done
with the sendmail milter concept. I think the best possibility would be
to implement the milter concept in the local delivery agent, which is
lmtpd in most cyrus cases. This would mean e.g. to call an external
scanner through a socket from lmtpd in order to determine if the mail
can be delivered.

Now my humble questions:
Is there any way to do this with the current lmtpd?
If no, is anybody working on something similar?
In any case: Does anybody see a significant disadvantage in the concept?

If 3xno, I might try to give it a shot ... holidays allowing ;-)

Ken/Rob: where would you put such a function in lmtpd?

rgds /markus

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


2.1.13 Case Sensitive problem

2004-05-30 Thread Ricardo David Martins
Hi,

i've been having some problems dealing with cyrus mailbox case sensitive.
I cant get around it. I tried to use "lmtp_downcase_rcpt: 1" on imapd.conf
but is seems to make no difference. I use postfix along with cyrus in a
FreeBSD 5.1 platform. Postfix is case insensitive and, although I force the
user to exist in passwd, it makes no difference concerning the case. The
problem arises when postfix tries to deliver to cyrus mailbox, it can't,
ofcourse.

I am open to ideas.

Greetings

-
Ricardo David Martins

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: sieve problems (continued)

2004-05-30 Thread Bob Tito
Christian Schulte wrote:
Bob Tito wrote:
Christian Schulte wrote:
Bob Tito wrote:

Does the attached patch fix the problem ? At least it was 
reproduceable now and the patch fixed it here.

Hi Christian,
For starters it is good the hear that you are able to reproduce the 
problem... to finish it.. *IT WORKS* Thanks a lot!!

But... bacause of the limited  amount of people with this problem is 
very specific to my config ?

Hi,
its a general problem with unixhierarchysep and sieve fileinto for users 
with dots in theire names. The cause I did not notice it earlier was 
that I never really updated from 2.2.3 to 2.2.4 or 2.2.5. Starting with 
2.2.3 I made a link from /usr/local/cyrus22 -> /usr/local/cyrus2.2.3 so 
that I do not have to touch the configfiles for any updates but then 
just forgot to update the link to /usr/local/cyrus2.2.4 and 
/usr/local/cyrus2.2.5. Updating cyrus mainly is very early in the 
morning. That could explain that :-)
Duh.. i know the feeling ;-)
That time of the day caused me some problems as well ;-)
The patch looks to me more like a workaround and just fixes the problem. 
Maybe Ken or Rob will come up with a much more elegant solution.
Let's hope so, in the mean time i am VERY glad it is solved, and that 
the problem is isolated and acknowledged.

Best regards, Bob
--
Christian
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: sasldb2

2004-05-30 Thread Andreas
On Sun, May 30, 2004 at 02:16:32PM +0200, Marc-Christian Petersen wrote:
> [EMAIL PROTECTED]:[/] # ls -lsa /etc/sasldb2 
>   12 -rw-rw1 root smmsp   12288 May 27 20:10 /etc/sasldb2

On a more generic note, it would perhaps be better to create a group
called "sasl" and put in that group all users who need read access to
/etc/sasldb2, like postfix, ldap, cyrus and others.

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: sieve problems (continued)

2004-05-30 Thread Christian Schulte
Bob Tito wrote:
Christian Schulte wrote:
Bob Tito wrote:

Does the attached patch fix the problem ? At least it was 
reproduceable now and the patch fixed it here.

Hi Christian,
For starters it is good the hear that you are able to reproduce the 
problem... to finish it.. *IT WORKS* Thanks a lot!!

But... bacause of the limited  amount of people with this problem is 
very specific to my config ?
Hi,
its a general problem with unixhierarchysep and sieve fileinto for users 
with dots in theire names. The cause I did not notice it earlier was 
that I never really updated from 2.2.3 to 2.2.4 or 2.2.5. Starting with 
2.2.3 I made a link from /usr/local/cyrus22 -> /usr/local/cyrus2.2.3 so 
that I do not have to touch the configfiles for any updates but then 
just forgot to update the link to /usr/local/cyrus2.2.4 and 
/usr/local/cyrus2.2.5. Updating cyrus mainly is very early in the 
morning. That could explain that :-)
The patch looks to me more like a workaround and just fixes the problem. 
Maybe Ken or Rob will come up with a much more elegant solution.

--
Christian
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Cyrus IMAPd 2.2.5 Released

2004-05-30 Thread Edward Rudd
Andrew,
You're source RPM patches cyrus with the autocreate patch from
http://email.uoa.gr/projects/cyrus/autocreate/
You need to download the latest version for Cyrus IMAP 2.2.5 and update
the Spec file to use the new patch.

Regards,
Edward
On Sat, 2004-05-29 at 06:11, Andrew Koros wrote:
> Hello Simon,
> 
> I can't get your new cyrus-imap-2.2.5 to build on Fedora. I get this
> errror:
> 
> mailbox.c: In function `mailbox_updatequota':
> mailbox.c:2769: warning: passing arg 1 of `quota_commit' from
> incompatible pointer type
> gcc -c -I.. -I./../lib  -I./../sieve -I/usr/include/db4
> -I/usr/include/et -I/usr/kerberos/include -I/usr/include 
> -DHAVE_CONFIG_H  -O2 -g -march=i386 -mcpu=i686 -fPIC \
> mboxlist.c
> mboxlist.c:2581:21: missing terminating " character
> mboxlist.c: In function `mboxlist_changequota':
> mboxlist.c:2582: error: syntax error before "Command"
> mboxlist.c:2583:49: missing terminating " character
> mboxlist.c: In function `mboxlist_autosubscribe_sharedfolders':
> mboxlist.c:3192: warning: assignment makes integer from pointer without
> a cast
> make[1]: *** [mboxlist.o] Error 1
> make[1]: Leaving directory
> `/home/koros/rpm/BUILD/cyrus-imapd-2.2.5/imap'
> make: *** [all] Error 1
> error: Bad exit status from /var/tmp/rpm-tmp.88793 (%build)
>  
> 
> RPM build errors:
> Bad exit status from /var/tmp/rpm-tmp.88793 (%build)
> 
>  
> Regards,
> 
> Andrew Koros.
> 
> On Fri, 2004-05-28 at 22:18, Rob Siemborski wrote:
> > I'm pleased to announce the release of Cyrus IMAPd 2.2.5.  This release 
> > corrects a number of issues that were identified in the release of 2.2.4. 
> > It contains no new features.
> > 
> > A full list of changes is available in doc/changes.html in the 
> > distribution.
> > 
> > Download the release at:
> > ftp://ftp.andrew.cmu.edu/pub/cyrus/cyrus-imapd-2.2.5.tar.gz
> > or
> > http://ftp.andrew.cmu.edu/pub/cyrus/cyrus-imapd-2.2.5.tar.gz
> > 
> > I'd also like to specifically thank Simon Matter 
> > <[EMAIL PROTECTED]> for his help in debugging and testing this 
> > release.
> > 
> > -Rob
> > 
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> > Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
> > Research Systems Programmer * /usr/contributed Gatekeeper
> > 
> > 
> > ---
> > Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> > Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> > List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
-- 
Edward Rudd <[EMAIL PROTECTED]>
Website http://www.outoforder.cc/

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: sasldb2

2004-05-30 Thread Kent Nasveschuk
John Arthur wrote:
Before I switched to LDAP I had the following on RH9
-rw-r-1 cyrusmail12288 Apr 28 10:00 /etc/sasldb2
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
 

Thanks. Changed that. Got another question. I've created some shared 
folders that I gave the post ACL to in cyradm to a user in my LDAP 
directory. I'm trying to send a message to it using Mozilla mail client. 
I can see the folders in the client. When I check sendmail maillog I see:

stat=User unknown when sendmail deliver connects with imap.
I'm sending a message to the folder as: [EMAIL PROTECTED]
I can send other messages, they go to correct box. I am using LDAP 
through saslauthd. Is there anyway to do this? The postings I saw said 
to send in this manner. This is a top level mailbox:

localhost> lm
public (\HasChildren)
public.announce (\HasNoChildren)
Kent N
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: sendmail hooks for pre-checking of over-quota imap users?

2004-05-30 Thread Andrzej Filip
Sergey wrote:
On Thursday 27 May 2004 20:29, Sergey wrote:

Makking sendmail pass TEMP & PERM "explanation strings" to sendmail.cf 
is a good idea nyway (IMHO). I hope sendmail will fix it before non beta 
release of sendmail-8.13.
Is the report to sendmail developer need for it ? 
YES
And that do you think about expand smmapd and sendmail's socket map for sending
all mail's header to cyrus for sieve checking for reject rules ?
If you want to make MTA reject messages based on headers then it should be 
done in reply to "the final dot" (otherwise the gain is too little). It 
creates a lot of problems for multi recipient messages - you can only reject 
message to *all* recipients at this stage. Spammers are ready to use/abuse 
every "blind spot".

Some time ago I suggested passing to cyrus sieve parameters available at "RCPT 
TO:" stage for cyrus recipients (connecting host IP and name, envelope sender 
address, envelope recipient address) to allow cyrus sieve reject messages 
before message body is transmitted.

I think that it is worth adding special "envelope-reject" sieve scripts to 
cyrus [previous suggestion was different]

--
Andrzej [en:Andrew] Adam Filip [EMAIL PROTECTED] [EMAIL PROTECTED]
http://anfi.homeunix.net/ http://slashdot.org/~anfi
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: sasldb2

2004-05-30 Thread Marc-Christian Petersen
On Sunday 30 May 2004 13:11, Kent L. Nasveschuk wrote:

Hi Kent,

> I have cyradm working but I had an initial problem setting a password
> for user cyrus in sasl. It was a permissions thing. Permissions on
> /etc/sasldb2 were originally 640 root.root. This did not allow me to add
> a password so I could login to the localhost. I changed the permissions
> to:
>  -rwxrwxrwx1 root root12288 May 30 06:49 /etc/sasldb2*

urgs ;)


> I can now set a password using saslpasswd2 and login to localhost with
> cyradm.
> What do permissions really have to be so I can set this up correctly?

[EMAIL PROTECTED]:[/] # ls -lsa /etc/sasldb2 
  12 -rw-rw1 root smmsp   12288 May 27 20:10 /etc/sasldb2

and User Cyrus in Group smmsp (in this example).

You get the idea.

--
ciao, Marc
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


RE: sasldb2

2004-05-30 Thread John Arthur
Before I switched to LDAP I had the following on RH9

-rw-r-1 cyrusmail12288 Apr 28 10:00 /etc/sasldb2

 
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


sasldb2

2004-05-30 Thread Kent L. Nasveschuk
Hello,
I have cyradm working but I had an initial problem setting a password
for user cyrus in sasl. It was a permissions thing. Permissions on
/etc/sasldb2 were originally 640 root.root. This did not allow me to add
a password so I could login to the localhost. I changed the permissions
to:
 -rwxrwxrwx1 root root12288 May 30 06:49 /etc/sasldb2*

I can now set a password using saslpasswd2 and login to localhost with
cyradm.

What do permissions really have to be so I can set this up correctly?
. 
-- 
Kent L. Nasveschuk <[EMAIL PROTECTED]>


---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: sieve problems (continued)

2004-05-30 Thread Bob Tito
Christian Schulte wrote:
Bob Tito wrote:

Does the attached patch fix the problem ? At least it was reproduceable 
now and the patch fixed it here.
Hi Christian,
For starters it is good the hear that you are able to reproduce the 
problem... to finish it.. *IT WORKS* Thanks a lot!!

But... bacause of the limited  amount of people with this problem is 
very specific to my config ?

Best regards, Bob
--
Christian

--- cyrus-imapd-2.2.5.old/imap/lmtpd.c	2004-05-22 05:45:51.0 +0200
+++ cyrus-imapd-2.2.5/imap/lmtpd.c	2004-05-29 17:51:43.0 +0200
@@ -410,7 +410,8 @@
 
 #ifdef USE_SIEVE
 	mydata.cur_rcpt = n;
-	r = run_sieve(user, domain, mailbox, sieve_interp, &mydata);
+	r = run_sieve(user, domain, mailbox, sieve_interp, &mydata,
+	  &lmtpd_namespace);
 	/* if there was no sieve script, or an error during execution,
 	   r is non-zero and we'll do normal delivery */
 #else
--- cyrus-imapd-2.2.5.old/imap/lmtp_sieve.c	2004-05-22 05:45:51.0 +0200
+++ cyrus-imapd-2.2.5/imap/lmtp_sieve.c	2004-05-29 17:54:44.0 +0200
@@ -821,7 +821,8 @@
 }
 
 int run_sieve(const char *user, const char *domain, const char *mailbox,
-	  sieve_interp_t *interp, sieve_msgdata_t *msgdata)
+	  sieve_interp_t *interp, sieve_msgdata_t *msgdata,
+	  struct namespace *lmtpd_namespace)
 {
 char fname[MAX_MAILBOX_PATH+1];
 int r = 0;
@@ -830,6 +831,7 @@
 	script_data_t *sdata = NULL;
 	sieve_bytecode_t *bc = NULL;
 	char userbuf[MAX_MAILBOX_NAME+1];
+	char authuserbuf[MAX_MAILBOX_NAME +1];
 
 	sdata = (script_data_t *) xmalloc(sizeof(script_data_t));
 
@@ -838,9 +840,16 @@
 	strlcat(userbuf, "@", sizeof(userbuf));
 	strlcat(userbuf, domain, sizeof(userbuf));
 	}
+strlcpy(authuserbuf, userbuf, sizeof(authuserbuf));
+	if (config_getswitch(IMAPOPT_UNIXHIERARCHYSEP)) {
+	mboxname_hiersep_toexternal(lmtpd_namespace, authuserbuf,
+	(domain ?
+	 strcspn(authuserbuf, "@")
+	 : strlen(authuserbuf)));
+	}
 	sdata->username = userbuf;
 	sdata->mailboxname = mailbox;
-	sdata->authstate = auth_newstate(userbuf);
+	sdata->authstate = auth_newstate(authuserbuf);
 
 	r = sieve_script_load(fname, &bc);
 	if (r == SIEVE_OK) {
--- cyrus-imapd-2.2.5.old/imap/lmtp_sieve.h	2004-02-12 03:32:23.0 +0100
+++ cyrus-imapd-2.2.5/imap/lmtp_sieve.h	2004-05-29 17:51:25.0 +0200
@@ -70,6 +70,7 @@
 
 sieve_interp_t *setup_sieve(void);
 int run_sieve(const char *user, const char *domain, const char *mailbox,
-	  sieve_interp_t *interp, sieve_msgdata_t *mydata);
+	  sieve_interp_t *interp, sieve_msgdata_t *mydata,
+	  struct namespace *lmtpd_namespace);
 
 #endif /* LMTP_SIEVE_H */
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: cyr_expire hanging...

2004-05-30 Thread Craig Ringer
On Sun, 2004-05-30 at 15:16, David Reid wrote:
> I'm running cyrus imap 2.2.3 and have just started experiencing some very
> strange events when cyr_expire runs. It seems to somehow get "hung" in some
> sort of loop and starts eating serious amounts of cpu and then disk space in
> the system and impd logfiles. This results in enormous logfiles and the
> resultant 108% of my /var partition soon causes problems!
> 
> It's possible that cyr_expire isn't the cause, but the one common factor in
> all instances has been cyr_expire eating cpu. The log files aren't available
> as I need to delete them to restore the system to a functioning state :(
> 
> Anyone come across this before or have any ideas about what might be causing
> it?

I had a similar issue - cyr_expire would hang indefinitely, causing
quite a few of them to be hanging around after a few days. It turned out
to be deliver db corruption as found by db_verify; nuking the deliver db
did the trick nicely as db_recover couldn't fix it.

Craig Ringer

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


cyr_expire hanging...

2004-05-30 Thread David Reid
I'm running cyrus imap 2.2.3 and have just started experiencing some very
strange events when cyr_expire runs. It seems to somehow get "hung" in some
sort of loop and starts eating serious amounts of cpu and then disk space in
the system and impd logfiles. This results in enormous logfiles and the
resultant 108% of my /var partition soon causes problems!

It's possible that cyr_expire isn't the cause, but the one common factor in
all instances has been cyr_expire eating cpu. The log files aren't available
as I need to delete them to restore the system to a functioning state :(

Anyone come across this before or have any ideas about what might be causing
it?

Thanks.

david

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html