Caching imap proxy

2009-09-09 Thread Kai Moritz
Hi all!

We need something like a caching imap proxy.

If an imap client accesses the proxy, instead of delegating the client
to the real server, the proxy should first try to serve the request out
of its cache. So that, if several clients access the proxy and ask for
the contents of the same message in the same folder, it is only
requested once from the original server.

As far as I know, imap proxies normally does not do stuff like this.
They only delegate requests to an original server. But the murder
documentation sounds a little bit, like cyrus murder might be capable to
do it.

If cyrus murder cannot cache imap read requests, perhaps anyone has an
idea, how this caching problem can be solved. Or is it only possible to
cache imap request in the imap client itself?


Greetings

Kai Moritz


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


Caching Proxy

2009-08-31 Thread Kai Moritz
Hi,

my company receives a lot of mails with big attachments. Since the
internet-link is slow, it would be desireable to store these mails on a
local server. But unfortunatly, the received mail has to be accessable
(read, copy, delete) for some employees, which are working at home as
well.

So, I was thinking of some kind of caching IMAP-proxy. At first glance,
I thought, that cyrus murder might do the trick. But diving into the
documentation, it looks like a front end server is only caching the
Mailbox-Metadata, not the messages itself.

Is it possible to build a cyrus cluster with a frontend server, that
caches messages, so that a second FETCH for the same message hits on the
cached copy located on the front end server, instead of fetching it
again from the backend server?

Or does anybody has another suggestion to deal with this problem?


Greetings 

Kai Moritz


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


HELP! A storage failure resulted in data corruption

2006-11-23 Thread Kai Wang


Greetings.

We had a storage failure recently. A user's data were corrupted. The 
user client keeps terminated abnormally.Below are the error messages.I 
also noticed two .NEW files created in the user's INBOX. Can anybody 
gave me any suggestion?


Nov 23 08:58:14 cms3 imap[19511]: seen_db: user USERNAMEopened 
/var/lib/imap/user/k/USERNAME.seen

Nov 23 08:58:14 cms3 imap[19511]: open: user USERNAME opened Trash
Nov 23 08:58:15 cms3 imap[19511]: open: user USERNAME opened INBOX
Nov 23 08:58:15 cms3 master[3354]: process 19511 exited, signaled to 
death by 7
Nov 23 08:58:15 cms3 master[3354]: service imap pid 19511 in BUSY state: 
terminated abnormally


-rw---  1 cyrus mail 413140 Nov 21 16:20 cyrus.cache
-rw---  1 cyrus mail 409600 Nov 23 10:44 cyrus.cache.NEW
-rw---  1 cyrus mail183 Nov 23 10:38 cyrus.header
-rw---  1 cyrus mail  10336 Nov 21 16:20 cyrus.index
-rw---  1 cyrus mail   8192 Nov 23 10:44 cyrus.index.NEW

Thanks

--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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


...murder...USERNAME

2006-09-22 Thread Kai Wang


One of our user does not the term murder in the message header. He 
questioned us that "Why does it contains the term "murder" in the email 
header? I don't think "murder...MYNAME" is the appropriate terms 
appears in my email header."  Is there a way to remove this?


Received: from murder ([unix socket])
(authenticated user=USERNAME bits=0)
by cms6.ucalgary.ca (Cyrus v2.2.12-Invoca-RPM-2.2.12-3.RHEL4.1) 
with LMTPA;

Tue, 19 Sep 2006 10:34:47 -0600
X-Sieve: CMU Sieve 2.2
      :
  :

--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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


Quota limit?

2006-09-19 Thread Kai Wang


Greetings.

We are running cyrus-imapd-2.2.12-3.RHEL4.1. We found that if we set 
quota over 4194000, cyrus quota warning kicks in no matter how much your 
usage is. Is there a hard coded quota limit in the imapd daemon?



--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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


Re: How to clean up database garbages?

2006-08-16 Thread Kai Wang


I did 'ctl_mboxlist -d > mboxlist.txt' and found all the mailbox names 
in mboxlist.txt are valid. The old mailbox names only appear in the 
/usr/lib/cyrus-imapd/quota command output. In this case, I guess, I just 
need to do the last two steps ('rm /var/lib/imap/user/?/*username*' and 
'rm /var/lib/imap/quota/?/*username*') and can do them while services 
are still on, . Am I right?



Simon Brown wrote:

On 8/15/06 5:07 PM, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:

  

I'm in the process of migrating from uw-imap servers to cyrus servers. I
cloned my second cyrus server from the first one and forgot to
initialize the database. My second machine is in production. I found the
first machine's accounts are on the second one and I can not delete them
because the mail store is gone. Does anybody know if there is any force
delete option to clean up this?




The following is how I've done it on an OSX Server. Anyone else have a
better method?

  

 - su - cyrusimap
 - ctl_mboxlist -d > ~/mboxlist.txt
 - cp ~/mboxlist.txt ~/mboxlist.bak
 - edit ~/mboxlist.txt and remove lines containing this user.
 - cp /Volumes/GroupWare\ Data/mail_datqbase/mailboxes.db ~
 - rm /Volumes/GroupWare\ Data/mail_datqbase/mailboxes.db
 - cat ~/mboxlist.txt | ctl_mboxlist -u
 - rm -rf /var/spool/imap/username
 - rm /var/lib/imap/user/?/*username*
 - rm /var/lib/imap/quota/?/*username* 
  

--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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


How to clean up database garbages?

2006-08-15 Thread Kai Wang


I'm in the process of migrating from uw-imap servers to cyrus servers. I 
cloned my second cyrus server from the first one and forgot to 
initialize the database. My second machine is in production. I found the 
first machine's accounts are on the second one and I can not delete them 
because the mail store is gone. Does anybody know if there is any force 
delete option to clean up this?


Thanks

--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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


How to restrict pop/imap access by user/group names

2006-08-14 Thread Kai Wang


Greetings.

We want to restrict some users only to use pop and some users only to 
use imap. Can anybody tell me how to do that?


Thanks

--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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: Too many open files

2006-06-14 Thread Kai Wang


Solved. Instead of  "user.username", you delete "+user.username".


Kai Wang wrote:


I actually changed the nofile by editing the /etc/security/limits.conf 
file. It was only 1024. I have increased it to be bigger than the 
total number of messages the test user has. The test user account 
contains 760+ folders and 76000+ messages. I restore the user and 
deleted it again. The problem remains.


[EMAIL PROTECTED] ~]# su - cyrus
-bash-3.00$ ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
file size   (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory   (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files  (-n) 131072
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size  (kbytes, -s) 10240
cpu time   (seconds, -t) unlimited
max user processes  (-u) 59390
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited


Zachariah Mully wrote:

On Mon, 2006-06-12 at 14:51 -0600, Kai Wang wrote:
 

Greetings.

I'm running Cyrus on Redhat AS4. cyrus complains about too many open 
files when I try to delete a user with large number of 
mailboxes/messages. I increased /proc/sys/fs/file-max and max number
of open files a few times. The errors still happen. Actually the 
user is successfully deleted. I wonder if I should have any concern 
about

these error messages.

[EMAIL PROTECTED] ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
[EMAIL PROTECTED] ~]# uname -a
Linux lms2.acs.ucalgary.ca 2.6.9-11.ELsmp #1 SMP Fri May 20 18:26:27
EDT 2005 i686 i686 i386 GNU/Linux
[EMAIL PROTECTED] ~]# ulimit -a 


Under debian with the speedblue.org debs, cyrus imapd runs under the
cyrus user, so you'll want to adjust the file-max for that user, not
just for root (as you did). Edit /etc/security/limits.conf 
Z
  




--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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: Too many open files

2006-06-12 Thread Kai Wang


I actually changed the nofile by editing the /etc/security/limits.conf 
file. It was only 1024. I have increased it to be bigger than the total 
number of messages the test user has. The test user account contains 
760+ folders and 76000+ messages. I restore the user and deleted it 
again. The problem remains.


[EMAIL PROTECTED] ~]# su - cyrus
-bash-3.00$ ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
file size   (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory   (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files  (-n) 131072
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size  (kbytes, -s) 10240
cpu time   (seconds, -t) unlimited
max user processes  (-u) 59390
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited


Zachariah Mully wrote:

On Mon, 2006-06-12 at 14:51 -0600, Kai Wang wrote:
  

Greetings.

I'm running Cyrus on Redhat AS4. cyrus complains about too many open 
files when I try to delete a user with large number of 
mailboxes/messages. I increased /proc/sys/fs/file-max and max number
of 
open files a few times. The errors still happen. Actually the user is 
successfully deleted. I wonder if I should have any concern about
these 
error messages.


[EMAIL PROTECTED] ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
[EMAIL PROTECTED] ~]# uname -a
Linux lms2.acs.ucalgary.ca 2.6.9-11.ELsmp #1 SMP Fri May 20 18:26:27
EDT 
2005 i686 i686 i386 GNU/Linux
[EMAIL PROTECTED] ~]# ulimit -a 



Under debian with the speedblue.org debs, cyrus imapd runs under the
cyrus user, so you'll want to adjust the file-max for that user, not
just for root (as you did). Edit /etc/security/limits.conf  


Z
  


--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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


Too many open files

2006-06-12 Thread Kai Wang


Greetings.

I'm running Cyrus on Redhat AS4. cyrus complains about too many open 
files when I try to delete a user with large number of 
mailboxes/messages. I increased /proc/sys/fs/file-max and max number of 
open files a few times. The errors still happen. Actually the user is 
successfully deleted. I wonder if I should have any concern about these 
error messages.


[EMAIL PROTECTED] ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
[EMAIL PROTECTED] ~]# uname -a
Linux lms2.acs.ucalgary.ca 2.6.9-11.ELsmp #1 SMP Fri May 20 18:26:27 EDT 
2005 i686 i686 i386 GNU/Linux

[EMAIL PROTECTED] ~]# ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
file size   (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory   (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files  (-n) 16384
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size  (kbytes, -s) 10240
cpu time   (seconds, -t) unlimited
max user processes  (-u) 59390
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited
[EMAIL PROTECTED] ~]# cat /proc/sys/fs/file-max
2995744

Jun 12 11:50:11 lms2 imap[3320]: IOERROR: opening quota file 
/var/lib/imap/quota/w/user.wangtest: Too many open files
Jun 12 11:50:11 lms2 imap[3320]: DBERROR: error fetching user.wangtest: 
cyrusdb error
Jun 12 11:50:11 lms2 imap[3320]: IOERROR: opening quota file 
/var/lib/imap/quota/w/user.wangtest: Too many open files
Jun 12 11:50:11 lms2 imap[3320]: DBERROR: error fetching user.wangtest: 
cyrusdb error
Jun 12 11:50:11 lms2 imap[3320]: IOERROR: opening quota file 
/var/lib/imap/quota/w/user.wangtest: Too many open files
Jun 12 11:50:11 lms2 imap[3320]: DBERROR: error fetching user.wangtest: 
cyrusdb error
Jun 12 11:50:11 lms2 imap[3320]: IOERROR: opening quota file 
/var/lib/imap/quota/w/user.wangtest: Too many open files
Jun 12 11:50:11 lms2 imap[3320]: DBERROR: error fetching user.wangtest: 
cyrusdb error
Jun 12 11:50:11 lms2 imap[3320]: LOSTQUOTA: unable to remove quota root 
user.wangtest for user.wangtest: Mailbox does not exist


Thanks

--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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: Renaming A User

2006-03-22 Thread Kai Wang


Simon,

How do you know if a user is logged in?


Simon Matter wrote:

Hi all

I Googled it and looked over the archives and couldn't find a
definitive answer, so I'm going to ask here...

I have a user who got married and changed her name.  On the UNIX side
of things, the name change is pretty easy.  I can handle this part.
The part where I'm having trouble is with the name change in cyradm.
I found the old documentation from the O'Reilly book.  However,
that's apparently extremely out of date.  I tried to find an updated
version of "Managing IMAP", but there is apparently not enough call
for it.  I have some pretty heavy lifting to do in the next few
months and would like to have a good reference.

On a different list, someone flippantly suggested I just rename the
user in cyradm.  Is this prudent?  If she has a lot of sub-mailboxes,
will they all make it over in the newer versions of cyrus?  As I
recall, this wasn't completely functional at the time the book was
written.



You need 'allowusermoves: yes' in /etc/imapd.conf to make renaming work.
Then, when you rename, make absolutely sure the user is not logged in
while renaming in cyradm.

Simon

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
  


--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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


Incorrect quota usage?

2006-03-14 Thread Kai Wang


I'm running cyrus-imapd-2.2.12 on redhat AS4. I downloaded the src file 
from Simon Matter's website and rebuilt the rpm. All my folders are in 
one partition /cyrus. I'm using only 1.2G but the quota command shows 
that I use 8+G. Could there be anything wrong?


[EMAIL PROTECTED] imap]# rpm -q cyrus-imapd
cyrus-imapd-2.2.12-15
[EMAIL PROTECTED] imap]# /bin/su cyrus -c '/usr/lib/cyrus-imapd/quota -f 
user/kwang'

  Quota   % Used Used Root
1024000  874  8957932 user/kwang
[EMAIL PROTECTED] imap]# du -sh /cyrus/k/user/kwang
1.2G    /cyrus/k/user/kwang

--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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


How to activate sieve script for users?

2006-03-08 Thread Kai Wang


Greetings.

We are migrating from uw-imap to cyrus. I have converted our users' 
procmailrc files to sieve scripts. I have root access and know the user 
cyrus' password. But I don't know users' password. Can anybody tell me 
how to activate for them?


Thanks in advance

--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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: Migrate message flags to cyrus

2006-03-08 Thread Kai Wang


What patch did you make? Aleksandar. Is it on the IMAPClient module? I 
found it does not handle special characters in folder names.


Aleksandar Milivojevic wrote:

Quoting Michael Menge <[EMAIL PROTECTED]>:

The best way to perserve the flags is by transfering the eMails over 
the  IMAP-Protocol. There are severel tools to do this job. Most of 
them are written to sync two ore more mailfolders.


As far as i have tested them there was no perfect ore even best 
migration tool.


We will use the mailutil programm which comes with the uw-imap 
server. It was the fastest programm and it keeps the flags.


Another tool that I used for "small" migrations was imapsync.  
Michael, I beleive I sent you my patched version of imapsync.  Could 
you tell me what was a speed difference between imapsync and mailutil 
that you observed?  I'll need to move one huge mailbox in near future, 
so just wondering if it would make sense using mailutil for this job 
instead of imapsync.




--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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: Migrate message flags to cyrus

2006-03-07 Thread Kai Wang


Thank you, Michael. Do you know how to run mailutil in a script? I tried 
it. But I could not find how to submit a user's password to it.


Michael Menge wrote:

Kai Wang wrote:


Greetings.

We are in the process of migrating from uw-imap to cyrus. I could not 
find any tool to migrate message flags(answered, deleted, flagged, 
draft, seen). I know that the first 4 flags are saved in cyrus.index 
file and the seen one is in .seen file. The "tagged for 
deletion" flag is very important to us and I need to migrate at least 
this one. I wonder if anybody can give me a hand.


Thanks

The best way to perserve the flags is by transfering the eMails over 
the  IMAP-Protocol. There are severel tools to do this job. Most of 
them are written to sync two ore more mailfolders.


As far as i have tested them there was no perfect ore even best 
migration tool.


We will use the mailutil programm which comes with the uw-imap server. 
It was the fastest programm and it keeps the flags.






--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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


Migrate message flags to cyrus

2006-03-06 Thread Kai Wang


Greetings.

We are in the process of migrating from uw-imap to cyrus. I could not 
find any tool to migrate message flags(answered, deleted, flagged, 
draft, seen). I know that the first 4 flags are saved in cyrus.index 
file and the seen one is in .seen file. The "tagged for 
deletion" flag is very important to us and I need to migrate at least 
this one. I wonder if anybody can give me a hand.


Thanks

--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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


Authentication and authorization

2006-02-10 Thread Kai Wang


Greetings.

Our account information is saved in ldap database. Every user has an eID 
as "firstname.lastname" and a uID as less than 8 alphanumeric 
characters. We are considering to migrate our email to cyrus. I know the 
difference between authentication and authorization. I want to 
authenticate a user by the eID and grant authorization ID of uID. We run 
Redhat  Linux. Can anybody tell me how to do this?


Thanks in advance

--
Kai Wang


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: Promblem delete mailboxes

2006-02-10 Thread Kai Wang


You need to setacl 'c' (Create) on the folders to your admin user first.

Peter Koinange wrote:
I have cyrus installed and someone create to mailbox somehow incorrectly 
INBOX (\HasNoChildren)

Sent Items (\HasNoChildren)
user/0733268763 (\HasNoChildren)


I have been trying to delete them but it proving impossible  how to I delete 
them or get them out of the cyrus database


Peter Koinange

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
  


--
Kai Wang
System Services
Information Technologies, University of Calgary,
2500 University Drive, N.W.,
Calgary, Alberta, Canada T2N 1N4
Phone (403) 220-2423, Fax (403) 282-9361


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: how to use cyradm in a not-so-interactive way?

2003-10-15 Thread Kai
Hi,Javier Cano
 I set mailbox's quota by the following script,maybe it's useful to you?
 my $rc=$client->setquota("$mailbox",'STORAGE',"$quota");

Regards
---
Kai
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/



Re: how to use cyradm in a not-so-interactive way?

2003-10-13 Thread Kai
Hi
Use the following scripts

#!/usr/bin/perl
use Cyrus::IMAP::Admin;
my $client=Cyrus::IMAP::Admin->new('yourhost');
$client->authenticate(-authz=>'',
-user=>'admin',
-password=>'yourpasswordhere',
-mechanism=>'PLAIN');
my $result=$client->createmailbox("$mailbox");

Regards
Kai

> I am trying to automate some tasks in order to create new mail
> accounts... I am using Postfix, Cyrus-IMAP and MySQL.
> Maybe there is a quite obvious answer to this question but I have no
> idea about Perl...
> I would like to find a way to create users in a not-so-interactive way
> like introducing directly these commands (for example). To do this I
> have to connect to cyradm (e.g.,cyradm --user cyrus --server localhost)
> from the terminal and then introduce:
>
> localhost> cm user.test0004
> localhost> sam user.test0004 cyrus lrswipcda
> localhost> sq user.test0004 2
> localhost> quit
>
> In the man page of cyradm it says it can be used in this other way:
>  perl -MCyrus::IMAP::Shell -e 'run("myscript")'
> but, honestly, I can not understand how to do this. What should be the
> content of "myscript"? how to connect to cyradm in this case? how to
> provide the password?
>
> Any help would be very grateful!
>
> Greetings!
> Javier Cano


__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/



About mailbox's upper case

2003-10-11 Thread Kai
Hi list,
How can I let Cyrus ignore  the case of mailbox ? I mean ,I want
Cyrus treating the upper case's mailbox and lower case's mailbox as the
same recipient if their spelling are same.
Any advise would be appreciated.

Regards,
Kai


__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/



Question about Quota Display

2003-08-25 Thread Kai
Hi List,
 I want to display the quota of each mailbox when user login to webmail.
 I try to write a Perl script using Cyrus::IMAP::Admin module.It like
following..


#!/usr/bin/perl -w
use Cyrus::IMAP::Admin;
my $client=Cyrus::IMAP::Admin->new('www.server.com');
$client->authenticate(-authz=>'',
-user=>'cyrus',
-password=>'test',
-mechanism=>'PLAIN');
my $rc=$client->listquotaroot('[EMAIL PROTECTED]');
print "$rc\n";
-
 I just got a result "2". But the result of running the command cyradm is
-
www.server.com> lq [EMAIL PROTECTED]
 STORAGE 892/1024 (87.109375%)
-
 Where is the problem ?  Please give me a hint.
 And ,I found the method that get the quota by inviting Cyrus::IMAP::Admin
module is very slowly.Someone have a nice solution ?

---
Kai



__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/



Problem about Virtual Domain

2003-08-19 Thread Kai
Hi list.
 I am using Postifx+Cyrus-imap-2.2.
Now my postfix can receive virtual domain's mail and deliver to cyrus. but
even I created the mailbox in cyradm,I still got the following message:

[EMAIL PROTECTED] : data format error. Command output: user1: Mailbox
does not exist.

I checked my imapd's log and found only the left-hand-side of email was
delivered by Cyrus.
the log..

Aug 20 05:30:09 www master[13358]: about to exec /usr/cyrus/bin/lmtpd
Aug 20 05:30:09 www lmtpunix[13358]: executed
Aug 20 05:30:09 www lmtpunix[13358]: accepted connection
Aug 20 05:30:09 www lmtpunix[13358]: lmtp connection preauth'd as postman
Aug 20 05:30:09 www lmtpunix[13358]: append_check() of 'user.user1' failed

would someone help me ? thanks very much.
---
Kai


__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/



Problem about Postfix/Cyrus-imap/Mysql/Virtual domains

2003-08-19 Thread Kai
Hi,list.
 I am a newbie.
 I am using Cyrus-imapd-2.2.0 and postfix 2.0.7. I dont know how to let my
postfix lookups virtual domain  in Mysql.And I sent the question to
postfix's maillinglist,but nobody replied me.Would someone give me a sample
of postfix' configuration about virtual domain?
 Thanx!
---
Kai


__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/



lmtpd delivery problem: User unknown

2003-05-27 Thread Kai Lanz

I'm trying to set up IMAP on a Tru64 4.0G box running sendmail 8.12.7,
patched.  We have hundreds of users, who currently use a mix of pine,
elm, and POP clients to read their mail.  We want to give them the option
of using IMAP clients as well.

Following the steps in install-configure.html, I made a new config file
for sendmail with definitions and rules for the cyrusv2 mailer.  If 
I start up master and then switch sendmail over to the new config file,
mail delivery stops working.  The mail.log shows "User unknown" for all
delivery attempts by cyrusv2; if there's a dead.letter, it contains a
more verbose error: "Mailbox unknown.  Either there is no mailbox 
associated with this name or you do not have authorization to see it."
The local6.log file only shows lmtp startup and shutdown messages.
Master is running, and so is lmtpd.

To me it looks like lmtpd can't write to our system inboxes under
/var/spool/mail.  Probably a permissions problem; so we reset the files
in this directory to be owned by group "mail" with group RW permissions.
That didn't help; we still get the User unknown complaint.

What's the right way to do this?  That is, to add IMAP service to our 
host without breaking pine et al.  Is lmtpd supposed to take care of this?
Can I turn up the debugging level on lmtpd to get a more detailed idea of
what's actually going on?



Cyrus-imap-2.2 cyradm failure

2003-01-21 Thread Kai
hi all,
 I got a Cyrus-imap-2.2 from CVS yeserday and I compiled it successfully.But
I can't use cyradm to create mailbox.
 System gave me a error message as follows

Can't load
'/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Cyrus/IMAP/IMAP.so' f
or module Cyrus::IMAP:
/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Cyrus/IMAP
/IMAP.so: undefined symbol: db_version at
/usr/lib/perl5/5.6.1/i386-linux/DynaLo
ader.pm line 206.
 at /usr/lib/perl5/site_perl/5.6.1/i386-linux/Cyrus/IMAP/Admin.pm line 44
Compilation failed in require at
/usr/lib/perl5/site_perl/5.6.1/i386-linux/Cyrus
/IMAP/Admin.pm line 44.
---

would anyone help me ?
 Thanks a lot.

---
Kai



__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/




reconstruct after deleting folders

2002-09-19 Thread Kai Groshert

Hi everybody,

I'm not sure I fully understood the function of "reconstruct", so if
anyone could give me a hint here...

I'm trying to move one mailfolder for the user "dimitri", which is
located in /var/spool/imap/user/dimitri:

-rw---1 cyrusmail4 Sep 19 22:47 cyrus.cache
-rw---1 cyrusmail  181 Sep 19 22:47 cyrus.header
-rw---1 cyrusmail   56 Sep 19 22:47 cyrus.index
drwx--2 cyrusroot  117 Sep 19 22:47 drafts
drwx--2 cyrusroot  117 Sep 19 22:47 sent-mail
drwx--2 cyrusroot  117 Sep 19 22:46 spam
drwx--2 cyrusroot  117 Sep 19 22:51 trash

I'm trying to move the "spam" folder below the "trash" folder (using
"mv"). After this I obviously need something like reconstruct, but it
gives me this:

cyrus@centauri:~ > reconstruct -r user.dimitri
user.dimitri
user.dimitri.drafts
user.dimitri.sent-mail
user.dimitri.spam: System I/O error No such file or directory
user.dimitri.trash


So I thought, well, the "-f" option looks promising, but wait:

cyrus@centauri:~ > reconstruct -rf user.dimitri
user.dimitri
user.dimitri.drafts
user.dimitri.sent-mail
user.dimitri.spam: System I/O error No such file or directory
discovered user.dimitri.trash.spam
user.dimitri.trash: Mailbox does not exist 
user.dimitri.trash.spam


So it found the moved mailbox, but it didn't remove the missing one.
Using "reconstruct -m" doesn't work either: "reconstructing mailboxes.db
currently not supported".

I'm not sure if the quota command should help, but I get some error too:

cyrus@centauri:~ > quota -f
__db_assert: "0" failed: file "../dist/../db/db_cam.c", line 86
Aborted


Still, if I run it on a single mailbox (not the modified one), it works:

cyrus@centauri:~ > quota -f user.christin
   Quota  % UsedUsed Root
  25   0   2 user.christin



Does anybody know what I'm doing wrong? Is there any way to make imapd
aware of removed folders?

Any hint would be greatly appreciated. I'm quite confused.

I'm using cyrus-imapd 2.0.16.


Regards,
Kai