Re: Problem on creating users account and their mail boxes

2008-06-15 Thread Simon Matter
> Hi folks,
>
>
> Ubuntu LTS 6.06 amd64
>
>
> Hi folks,
>
>
> Having tried a day unable to figure out how to add users' accounts.
>
>
> Steps performed as follows;
>
>
> $ su cyrus
> Password: xyz
>
> sh-3.1$ cyradm localhost
> IMAP Password: xyz
>   localhost> cm user.aaa
> localhost> cm user.bbb
> localhost> cm user.ccc
> etc.
> localhost> quit
> sh-3.1$
>
> all went through without complaint
>
>
> Change to root
>
> sh-3.1$ su
> Password:
>
> # saslpasswd2 aaa
> Password:
> Again (for verification):
>
>
> # saslpasswd2 bbb
> Password:
> Again (for verification):
>
>
> # saslpasswd2 bbb
> Password:
> Again (for verification)
>
> etc.  All also went through without complaint.
>
>
> However on SquirrelMail I can't login to their accounts.
>
>
> $ tail /var/log/mail.log
> Jun 15 10:13:11 lampserver cyrus/ctl_cyrusdb[4589]: archiving database
> file: /var/lib/cyrus/annotations.db
> Jun 15 10:13:11 lampserver cyrus/ctl_cyrusdb[4589]: archiving log file:
> /var/lib/cyrus/db/log.01
> Jun 15 10:13:11 lampserver cyrus/ctl_cyrusdb[4589]: archiving database
> file: /var/lib/cyrus/mailboxes.db
> Jun 15 10:13:11 lampserver cyrus/ctl_cyrusdb[4589]: archiving log file:
> /var/lib/cyrus/db/log.01
> Jun 15 10:13:11 lampserver cyrus/ctl_cyrusdb[4589]: done checkpointing
> cyrus databases
> Jun 15 10:13:11 lampserver cyrus/master[3869]: process 4589 exited,
> status 0
> Jun 15 10:31:55 lampserver cyrus/master[4593]: about to exec
> /usr/lib/cyrus/bin/imapd
> Jun 15 10:31:55 lampserver cyrus/imap[4593]: executed
> Jun 15 10:31:55 lampserver cyrus/imap[4593]: accepted connection
> Jun 15 10:31:57 lampserver cyrus/imap[4593]: badlogin: localhost
> [127.0.0.1] plaintext aaa SASL(-13): authentication failure: checkpass
> failed
> * end *
>
>
>
> $ su cyrus
> Password:
> sh-3.1$ cyradm localhost
> IMAP Password:
>   localhost> lm
> INBOX.Drafts (\NonExistent \HasNoChildren)
> INBOX.Sent (\NonExistent \HasNoChildren)
> INBOX.Trash (\NonExistent \HasNoChildren)
> user.aaa (\HasNoChildren)
> user.bbb (\HasNoChildren)
> user.groupware (\HasNoChildren)
> user.ccc (\HasNoChildren)
> user.satimiscyrus (\HasNoChildren)
> user.ddd (\HasNoChildren)
> user/satimiscyrus (\HasNoChildren)
> etc.
>
>
> They are there.  satimiscyrus appears there twice, as
> "user/satimiscyrus" and "user.satimiscyrus".  I don't know why?
>
>
>
> Emails sent to them are rejected.  Example email sent to user.aaa
>
>
> $ tail /var/log/mail.log
> Jun 15 10:46:15 lampserver cyrus/lmtpunix[4625]: accepted connection
> Jun 15 10:46:15 lampserver cyrus/lmtpunix[4625]: lmtp connection
> preauth'd as postman
> Jun 15 10:46:15 lampserver cyrus/lmtpunix[4625]: verify_user(user.aaa)
> failed: Mailbox does not exist
> Jun 15 10:46:15 lampserver postfix/lmtp[4624]: EF07387812F:
> to=<[EMAIL PROTECTED]>,
> relay=/var/run/cyrus/socket/lmtp[/var/run/cyrus/socket/lmtp], delay=1,
> status=bounced (host
> /var/run/cyrus/socket/lmtp[/var/run/cyrus/socket/lmtp] said:
> 550-Mailbox unknown.  Either there is no mailbox associated with this
> 550-name or you do not have authorization to see it. 550 5.1.1 User
> unknown (in reply to RCPT TO command))
> Jun 15 10:46:15 lampserver postfix/cleanup[4622]: 37E88878132:
> message-id=<[EMAIL PROTECTED]>
> Jun 15 10:46:15 lampserver postfix/qmgr[4167]: 37E88878132: from=<>,
> size=3894, nrcpt=1 (queue active)
> Jun 15 10:46:15 lampserver postfix/qmgr[4167]: EF07387812F: removed
> Jun 15 10:46:18 lampserver postfix/smtp[4627]: 37E88878132:
> to=<[EMAIL PROTECTED]>,
> relay=gmail-smtp-in.l.google.com[209.85.201.27], delay=3, status=sent
> (250 2.0.0 OK 1213497961 20si9089638wfi.11)
> Jun 15 10:46:18 lampserver postfix/qmgr[4167]: 37E88878132: removed
> Jun 15 10:46:45 lampserver postfix/smtpd[4618]: disconnect from
> ti-out-0910.google.com[209.85.142.189]
> * end *
>
>
> $ su aaa
> Unknown id: aaa
>
> $ su bbb
> Unknown id: bbb
>
> etc.
>
>
> Searching the notes taken down during installing this box.
>
>
> I ran;
> # cyradm -u cyrus localhost
> Password:
> localhost> cm user.satimiscyrus
>
>
> creating this acount "satimiscyrus" which is the only working account
> disregarding the problem re unable deleting the emails received and the
> sent_emails can't be saved on "INBOX.sent"

You really have to understand what you are doing and how your system you
configured works. Or how you want it to work.
1) didn't you use "unixhierarchysep: 1" in your config. My personal
impression is that it's just more confusing than using the default "." as
separator. I can't help you with it because I never use unixhierarchysep
but from what I see you already messed up, just look at your mailboxes
list:

user.satimiscyrus (\HasNoChildren)
user.ddd (\HasNoChildren)
user/satimiscyrus (\HasNoChildren)

Do you see?

2) How did you configure authentication?
IIRC you were using cyrus -> saslauthd -> PAM. That means your Cyrus users
need Unix accounts (but just for authentication). If so, then forget about
saslpasswd, it does nothing f

Re: Problem on creating users account and their mail boxes

2008-06-15 Thread Stephen Liu
Hi Simon,


- snip -

> You really have to understand what you are doing and how your system
> you
> configured works. Or how you want it to work.
> 1) didn't you use "unixhierarchysep: 1" in your config. My personal
> impression is that it's just more confusing than using the default
> "." as
> separator. I can't help you with it because I never use
> unixhierarchysep


Yes I use "unixhierarchysep: 1"


$ cat /etc/imapd.conf | grep unixhierarchysep
unixhierarchysep: yes


> but from what I see you already messed up, just look at your
> mailboxes
> list:
> 
> user.satimiscyrus (\HasNoChildren)
> user.ddd (\HasNoChildren)
> user/satimiscyrus (\HasNoChildren)
> 
> Do you see?


I found this funny discovery.


Running "cm user.satimiscyrus" it creates "user.satimiscyrus
(\HasNoChildren)", with no mailbox for this user created.


# locate satimiscyru
# find / -name satimiscyrus
both having no printout.


Neither can I login SquirrelMail nor emails can be received, all
rejected.


Running "cm user/satimiscyrus" it creates "user/satimiscyrus
(\HasNoChildren)", with mailboxes for this user created.


# find / -name satimiscyrus
/var/spool/cyrus/mail/s/user/satimiscyrus


# ls -l /var/spool/cyrus/mail/s/user/satimiscyrus
total 16
-rw--- 1 cyrus mail 1503 2008-06-15 08:50 13.
-rw--- 1 cyrus mail 1116 2008-06-15 14:38 cyrus.cache
-rw--- 1 cyrus mail  158 2008-06-09 16:35 cyrus.header
-rw--- 1 cyrus mail  136 2008-06-15 14:38 cyrus.index


# ls -ld /var/spool/cyrus/mail/s/user/satimiscyrus
drwx-- 2 cyrus mail 4096 2008-06-15 14:38
/var/spool/cyrus/mail/s/user/satimiscyrus


I can login SquirrelMail sending and receiving emails.  But the email
sent can't be saved on Inbox.sent.  Nor incoming emails received can be
deleted on Inbox.


It took me half day to find it out.


> 2) How did you configure authentication?
> IIRC you were using cyrus -> saslauthd -> PAM. That means your Cyrus
> users
> need Unix accounts (but just for authentication). If so, then forget
> about
> saslpasswd, it does nothing for you.


I already solved the authentication problem by adding a line 
"sasl_saslauthd_path: /var/spool/postfix/var/run/saslauthd/mux" on
/etc/imapd.conf


I don't know why it was missed.


> 3) You have created a mailbox for user aaa and expected it to become
> a
> Unix user, I see it because you tried "su aaa". Cyrus mailboxes have
> nothing to do with Unix account so creating a Cyrus mailbox never
> creates
> a Unix account.
> 
> What that all means is, if you really use cyrus -> saslauthd -> PAM
> for
> authentication, then to create a mailbox, to this:
> 
> With cyradm, create a mailbox:
> cm user.someuser


Login cyrus
then ran;
cyradm localhost
cm user/aaa

to create mail boxes for user "aaa".  


If running "cm user.aaa", no mail box will be created.

# find / -name aaa
can't find it.



> The create a Unix account for it (the command can be different for
> distributions):
> 
> useradd someuser
> 
> And now give it a password:
> 
> passwd someuser
> 
> Now, when you login to the IMAP server as "someuser", the user is
> authenticated to the Unix user "someuser" but that's it, there is no
> other
> relation between the Cyrus user and the Unix user.


I did the same only adding the option "-m" on running;

# useradd -m aaa
to create aaa's home directory.


Now mail boxes are created but the user has no previlage using them.



B.R.
Stephen

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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: Problem on creating users account and their mail boxes

2008-06-15 Thread Simon Matter
> Hi Simon,
>
>
> - snip -
>
>> You really have to understand what you are doing and how your system
>> you
>> configured works. Or how you want it to work.
>> 1) didn't you use "unixhierarchysep: 1" in your config. My personal
>> impression is that it's just more confusing than using the default
>> "." as
>> separator. I can't help you with it because I never use
>> unixhierarchysep
>
>
> Yes I use "unixhierarchysep: 1"
>
>
> $ cat /etc/imapd.conf | grep unixhierarchysep
> unixhierarchysep: yes

I know that you are using it. I only wanted to tell you that it makes
things more complicated than using the default. All examples you find in
the docs are for the default, that's why using unixhierarchysep is more
confusing.

>
>
>> but from what I see you already messed up, just look at your
>> mailboxes
>> list:
>>
>> user.satimiscyrus (\HasNoChildren)
>> user.ddd (\HasNoChildren)
>> user/satimiscyrus (\HasNoChildren)
>>
>> Do you see?
>
>
> I found this funny discovery.
>
>
> Running "cm user.satimiscyrus" it creates "user.satimiscyrus
> (\HasNoChildren)", with no mailbox for this user created.

The example is for users without unixhierarchysep, which is the default
for Cyrus.

>
>
> # locate satimiscyru
> # find / -name satimiscyrus
> both having no printout.

Well as someone else already told you, stop looking around on the
filesystem, look around with cyradm only. But if you really want, try

find / -name "*satimiscyrus*"


>
>
> Neither can I login SquirrelMail nor emails can be received, all
> rejected.
>
>
> Running "cm user/satimiscyrus" it creates "user/satimiscyrus
> (\HasNoChildren)", with mailboxes for this user created.
>
>
> # find / -name satimiscyrus
> /var/spool/cyrus/mail/s/user/satimiscyrus
>
>
> # ls -l /var/spool/cyrus/mail/s/user/satimiscyrus
> total 16
> -rw--- 1 cyrus mail 1503 2008-06-15 08:50 13.
> -rw--- 1 cyrus mail 1116 2008-06-15 14:38 cyrus.cache
> -rw--- 1 cyrus mail  158 2008-06-09 16:35 cyrus.header
> -rw--- 1 cyrus mail  136 2008-06-15 14:38 cyrus.index
>
>
> # ls -ld /var/spool/cyrus/mail/s/user/satimiscyrus
> drwx-- 2 cyrus mail 4096 2008-06-15 14:38
> /var/spool/cyrus/mail/s/user/satimiscyrus
>
>
> I can login SquirrelMail sending and receiving emails.  But the email
> sent can't be saved on Inbox.sent.  Nor incoming emails received can be
> deleted on Inbox.

Maybe your Cyrus works but you have misconfigured Squirrelmail.

>
>
> It took me half day to find it out.
>
>
>> 2) How did you configure authentication?
>> IIRC you were using cyrus -> saslauthd -> PAM. That means your Cyrus
>> users
>> need Unix accounts (but just for authentication). If so, then forget
>> about
>> saslpasswd, it does nothing for you.
>
>
> I already solved the authentication problem by adding a line
> "sasl_saslauthd_path: /var/spool/postfix/var/run/saslauthd/mux" on
> /etc/imapd.conf
>
>
> I don't know why it was missed.

I'm not talking about that. Somewhere you told us that you were using
saslpasswd to add passwords. I only told you that saslpasswd is not used
at all in your setup.

>
>
>> 3) You have created a mailbox for user aaa and expected it to become
>> a
>> Unix user, I see it because you tried "su aaa". Cyrus mailboxes have
>> nothing to do with Unix account so creating a Cyrus mailbox never
>> creates
>> a Unix account.
>>
>> What that all means is, if you really use cyrus -> saslauthd -> PAM
>> for
>> authentication, then to create a mailbox, to this:
>>
>> With cyradm, create a mailbox:
>> cm user.someuser
>
>
> Login cyrus
> then ran;
> cyradm localhost
> cm user/aaa
>
> to create mail boxes for user "aaa".
>
>
> If running "cm user.aaa", no mail box will be created.

My examples are alywas for the default "unixhierarchysep: 0".

>
> # find / -name aaa
> can't find it.

Yes, because I guess the "/" is translated to another char with
"unixhierarchysep: 1.

Simon

>
>
>
>> The create a Unix account for it (the command can be different for
>> distributions):
>>
>> useradd someuser
>>
>> And now give it a password:
>>
>> passwd someuser
>>
>> Now, when you login to the IMAP server as "someuser", the user is
>> authenticated to the Unix user "someuser" but that's it, there is no
>> other
>> relation between the Cyrus user and the Unix user.
>
>
> I did the same only adding the option "-m" on running;
>
> # useradd -m aaa
> to create aaa's home directory.
>
>
> Now mail boxes are created but the user has no previlage using them.
>
>
>
> B.R.
> Stephen
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
> 
> 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
>



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: Problem on mail boxe

2008-06-15 Thread Joseph Brennan
I wrote,

> I assume that when Squirrelmail refers to INBOX.Trash it actually
> means a mailbox called Trash under user.satimiscyrus.

But now that I have seen this,

>   localhost> lm
> INBOX.Drafts (\NonExistent \HasNoChildren)
> INBOX.Sent (\NonExistent \HasNoChildren)
> INBOX.Trash (\NonExistent \HasNoChildren)
> user.aaa (\HasNoChildren)
> user.bbb (\HasNoChildren)
> user.groupware (\HasNoChildren)
> user.ccc (\HasNoChildren)
> user.satimiscyrus (\HasNoChildren)
> user.ddd (\HasNoChildren)
> user/satimiscyrus (\HasNoChildren)

I take it back.  This is really at the point where I think I would
wipe everything out and start over.  Use the dot separator next time,
to clarify the distinction between Cyrus mailboxes and unix files.

Joseph Brennan
Columbia University Information Technology


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: Problem on creating users account and their mail boxes

2008-06-15 Thread Stephen Liu
Hi Simon,


OK I'll start again using cyrus.conf defualt and imapd.conf default. 
If I make a wrong step please inform me.  Thanks.


$ sudo cp -p /etc/cyrus.conf /etc/cyrus.conf.bak_20080615
$ sudo cp /etc/cyrus.conf.origin.20080606 /etc/cyrus.conf

$ sudo cp -p /etc/imapd.conf /etc/imapd.conf.bak_20080615
$ sudo cp -p /etc/imapd.conf.origin.20080526 /etc/imapd.conf


$ cat /etc/imapd.conf | grep unixhierarchysep
unixhierarchysep: no


$ sudo nano /etc/cyrus.conf

Making following changes;
SERVICES {
# --- Normal cyrus spool, or Murder backends ---
# add or remove based on preferences
imapcmd="imapd -U 30" listen="imap" prefork=0
maxchild=100
imaps   cmd="imapd -s -U 30" listen="imaps" prefork=0
maxchild=100
#pop3   cmd="pop3d -U 30" listen="pop3" prefork=0
maxchild=50
#pop3s  cmd="pop3d -s -U 30" listen="pop3s" prefork=0
maxchild=50


Adding following lines at the end of the file;

admins: cyrus
unixhierarchysep: 0



$ sudo nano /etc/imapd.conf

Making following changes
8<
# Uncomment the following and add the space-separated users who
# have admin rights for all services.
admins: cyrus
8<


8<
# Do note that, since sasl will be run as user cyrus, you may have a
lot of
# trouble to set this up right.
sasl_pwcheck_method: saslauthd
8<


Adding following lines at the end of the file;
# path to mux
sasl_saslauthd_path: /var/spool/postfix/var/run/saslauthd/mux



$ sudo /etc/init.d/cyrus2.2 restart
Stopping Cyrus IMAPd: cyrmaster.
Waiting for complete shutdown
Starting Cyrus IMAPd: cyrmaster.


$ sudo /etc/init.d/saslauthd restart
Stopping SASL Authentication Daemon: saslauthd.
Starting SASL Authentication Daemon: saslauthd.


$ su cyrus
Password: abc
sh-3.1$ cyradm localhost
Password: xyz
localhost>  lm
INBOX^Drafts (\NonExistent \HasNoChildren)  
INBOX^Sent (\NonExistent \HasNoChildren)
INBOX^Trash (\NonExistent \HasNoChildren)   
user.aaa (\HasNoChildren) 
user.satimiscyrus (\HasNoChildren)  
user.bbb (\HasChildren)  
user.bbb.bbb (\HasNoChildren) 
user^groupware (\HasNoChildren) 
user^satimiscyrus (\HasNoChildren)


It is working now.  On SquirrelMail emails on INBOX/Trash can be
deleted.  Accounts aaa, satimiscyrus and bbb are working.

What shall I do with account user.bbb.bbb, user^groupware and
user^satimiscyrus?

Shall I run "dm user.bbb.bbb" etc. to delele them while running on
'cyradm'?

If permission denied whether I can run "sam user.aaa cyrus all" first?


Please advise.  TIA.


B.R.
Stephen



--- Simon Matter <[EMAIL PROTECTED]> wrote:

> > Hi Simon,
> >
> >
> > - snip -
> >
> >> You really have to understand what you are doing and how your
> system
> >> you
> >> configured works. Or how you want it to work.
> >> 1) didn't you use "unixhierarchysep: 1" in your config. My
> personal
> >> impression is that it's just more confusing than using the default
> >> "." as
> >> separator. I can't help you with it because I never use
> >> unixhierarchysep
> >
> >
> > Yes I use "unixhierarchysep: 1"
> >
> >
> > $ cat /etc/imapd.conf | grep unixhierarchysep
> > unixhierarchysep: yes
> 
> I know that you are using it. I only wanted to tell you that it makes
> things more complicated than using the default. All examples you find
> in
> the docs are for the default, that's why using unixhierarchysep is
> more
> confusing.
> 
> >
> >
> >> but from what I see you already messed up, just look at your
> >> mailboxes
> >> list:
> >>
> >> user.satimiscyrus (\HasNoChildren)
> >> user.ddd (\HasNoChildren)
> >> user/satimiscyrus (\HasNoChildren)
> >>
> >> Do you see?
> >
> >
> > I found this funny discovery.
> >
> >
> > Running "cm user.satimiscyrus" it creates "user.satimiscyrus
> > (\HasNoChildren)", with no mailbox for this user created.
> 
> The example is for users without unixhierarchysep, which is the
> default
> for Cyrus.
> 
> >
> >
> > # locate satimiscyru
> > # find / -name satimiscyrus
> > both having no printout.
> 
> Well as someone else already told you, stop looking around on the
> filesystem, look around with cyradm only. But if you really want, try
> 
> find / -name "*satimiscyrus*"
> 
> 
> >
> >
> > Neither can I login SquirrelMail nor emails can be received, all
> > rejected.
> >
> >
> > Running "cm user/satimiscyrus" it creates "user/satimiscyrus
> > (\HasNoChildren)", with mailboxes for this user created.
> >
> >
> > # find / -name satimiscyrus
> > /var/spool/cyrus/mail/s/user/satimiscyrus
> >
> >
> > # ls -l /var/spool/cyrus/mail/s/user/satimiscyrus
> > total 16
> > -rw--- 1 cyrus mail 1503 2008-06-15 08:50 13.
> > -rw--- 1 cyrus mail 1116 2008-06-15 14:38 cyrus.cache
> > -rw--- 1 cyrus mail  158 2008-06-09 16:35 cyrus.header
> > -rw--- 1 cyrus mail  136 2008-06-15 14:38

Re: Problem on creating users account and their mail boxes

2008-06-15 Thread Simon Matter
> Hi Simon,
>
>
> OK I'll start again using cyrus.conf defualt and imapd.conf default.

OK, that seems to be the best thing you can do.
Just one note: Be aware that you are using a distribution which heavily
modifies configs and sometimes causes much trouble to some users. As an
example take postfix, Debian/Ubuntu seems to use it chrooted whenever
possible beside the fact that the postfix creator doesn't recommend it.
That may not be a problem if you only rely on the documentation delivered
with Debian/Ubunutu, but be aware that alot of howto's on the net are not
for Debian/Ubuntu. The same applies more or less to other distros as well
but they usually do less modifications.

> If I make a wrong step please inform me.  Thanks.
>
>
> $ sudo cp -p /etc/cyrus.conf /etc/cyrus.conf.bak_20080615
> $ sudo cp /etc/cyrus.conf.origin.20080606 /etc/cyrus.conf
>
> $ sudo cp -p /etc/imapd.conf /etc/imapd.conf.bak_20080615
> $ sudo cp -p /etc/imapd.conf.origin.20080526 /etc/imapd.conf
>
>
> $ cat /etc/imapd.conf | grep unixhierarchysep
> unixhierarchysep: no
>
>
> $ sudo nano /etc/cyrus.conf
>
> Making following changes;
> SERVICES {
> # --- Normal cyrus spool, or Murder backends ---
> # add or remove based on preferences
> imapcmd="imapd -U 30" listen="imap" prefork=0
> maxchild=100
> imaps   cmd="imapd -s -U 30" listen="imaps" prefork=0
> maxchild=100
> #pop3   cmd="pop3d -U 30" listen="pop3" prefork=0
> maxchild=50
> #pop3s  cmd="pop3d -s -U 30" listen="pop3s" prefork=0
> maxchild=50
>
>
> Adding following lines at the end of the file;
>
> admins: cyrus
> unixhierarchysep: 0
>
>
>
> $ sudo nano /etc/imapd.conf
>
> Making following changes
> 8<
> # Uncomment the following and add the space-separated users who
> # have admin rights for all services.
> admins: cyrus
> 8<
>
>
> 8<
> # Do note that, since sasl will be run as user cyrus, you may have a
> lot of
> # trouble to set this up right.
> sasl_pwcheck_method: saslauthd
> 8<
>
>
> Adding following lines at the end of the file;
> # path to mux
> sasl_saslauthd_path: /var/spool/postfix/var/run/saslauthd/mux
>
>
>
> $ sudo /etc/init.d/cyrus2.2 restart
> Stopping Cyrus IMAPd: cyrmaster.
> Waiting for complete shutdown
> Starting Cyrus IMAPd: cyrmaster.
>
>
> $ sudo /etc/init.d/saslauthd restart
> Stopping SASL Authentication Daemon: saslauthd.
> Starting SASL Authentication Daemon: saslauthd.
>
>
> $ su cyrus
> Password: abc
> sh-3.1$ cyradm localhost
> Password: xyz
> localhost>  lm
> INBOX^Drafts (\NonExistent \HasNoChildren)
> INBOX^Sent (\NonExistent \HasNoChildren)
> INBOX^Trash (\NonExistent \HasNoChildren)
> user.aaa (\HasNoChildren)
> user.satimiscyrus (\HasNoChildren)
> user.bbb (\HasChildren)
> user.bbb.bbb (\HasNoChildren)
> user^groupware (\HasNoChildren)
> user^satimiscyrus (\HasNoChildren)
>
>
> It is working now.  On SquirrelMail emails on INBOX/Trash can be

OK, it seems now SquirrelMail got the config right.

> deleted.  Accounts aaa, satimiscyrus and bbb are working.
>
> What shall I do with account user.bbb.bbb, user^groupware and
> user^satimiscyrus?
>
> Shall I run "dm user.bbb.bbb" etc. to delele them while running on
> 'cyradm'?
>
> If permission denied whether I can run "sam user.aaa cyrus all" first?

Exactly, I suggest you remove all mailboxes and then start creating the
correct new ones.

Looks like you are almost there.
If you really want unixhierarchysep then you may try to activate it after
you have everything up and runnning and the configs in a safe place. But I
don't think there is a very good reason to do so.

Simon

>
>
> Please advise.  TIA.
>
>
> B.R.
> Stephen
>
>
>
> --- Simon Matter <[EMAIL PROTECTED]> wrote:
>
>> > Hi Simon,
>> >
>> >
>> > - snip -
>> >
>> >> You really have to understand what you are doing and how your
>> system
>> >> you
>> >> configured works. Or how you want it to work.
>> >> 1) didn't you use "unixhierarchysep: 1" in your config. My
>> personal
>> >> impression is that it's just more confusing than using the default
>> >> "." as
>> >> separator. I can't help you with it because I never use
>> >> unixhierarchysep
>> >
>> >
>> > Yes I use "unixhierarchysep: 1"
>> >
>> >
>> > $ cat /etc/imapd.conf | grep unixhierarchysep
>> > unixhierarchysep: yes
>>
>> I know that you are using it. I only wanted to tell you that it makes
>> things more complicated than using the default. All examples you find
>> in
>> the docs are for the default, that's why using unixhierarchysep is
>> more
>> confusing.
>>
>> >
>> >
>> >> but from what I see you already messed up, just look at your
>> >> mailboxes
>> >> list:
>> >>
>> >> user.satimiscyrus (\HasNoChildren)
>> >> user.ddd (\HasNoChildren)
>> >> user/satimiscyrus (\HasNoChildren)
>> >>
>> >> Do you see?
>> >
>> >
>> > I found this fun

Re: Problem on creating users account and their mail boxes

2008-06-15 Thread Nicolas KOWALSKI
On Sun, Jun 15, 2008 at 07:22:24PM +0200, Simon Matter wrote:
> Just one note: Be aware that you are using a distribution which 
> heavily modifies configs and sometimes causes much trouble to some 
> users. As an example take postfix, Debian/Ubuntu seems to use it 
> chrooted whenever possible beside the fact that the postfix creator 
> doesn't recommend it.

This is OT, but I second this. Debian is a really good distribution - I 
use it almost exclusively since 8 years, but its developers often modify 
upstream configurations and/or code too much; the exim (configuration 
done by a gazillions of others Debian-specific files) and more recently 
openssl (entropy broken) examples come to my mind.

Back to Cyrus-imapd, I tried to use the Debian version, but after 
considering the Debian-specifics docs and scripts, I ended up compiling 
my own version, and use a really simple configuration, provided by the 
sources.

> If you really want unixhierarchysep then you may try to activate it 
> after you have everything up and runnning and the configs in a safe 
> place. But I don't think there is a very good reason to do so.

Well, I always found the '.' separator confusing for e-mail, but this is 
probably because I used uw-imap a lot before. IMHO, using the '/' 
hierarchy separator is easier for me, because I immediatly know that it 
is 'talking' about sub/folder. '.' is used for many other things, such 
as file extensions for example...

-- 
Nicolas

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: FUD client with virtual domains

2008-06-15 Thread Tornoci Laszlo
Tornoci Laszlo wrote:
> I have been using the FUD client/server for local users for some time 
> successfully. I am planning to introduce virtual domains, and did some 
> testing.
> 
> ACL's are ok for local user torlasz and virtual user 
> [EMAIL PROTECTED]:
> localhost.localdomain> lam user.torlasz
> torlasz lrswipcda
> anonymous 0
> localhost.localdomain> lam [EMAIL PROTECTED]
> [EMAIL PROTECTED] lrswipkxtecda
> anonymous 0
> 
> FUD works fine for local user torlasz:
> $ ./fud-client localhost torlasz user.torlasz
> user: torlasz
> mbox: user.torlasz
> Number of Recent 5
> Last read: Mon May 19 20:55:00 2008
> Last arrived: Wed May 21 04:10:10 2008
> 
> However, fud times out for the virtual user (line may be wrapped):
> $ ./fud-client localhost [EMAIL PROTECTED] 
> [EMAIL PROTECTED]
> fud-client: request timed out.
> 
> FUD responds to local users about virtual mailboxes:
> $ ./fud-client localhost foobar [EMAIL PROTECTED]
> user: foobar
> mbox: [EMAIL PROTECTED]
> Number of Recent 9
> Last read: Thu Jan  1 01:00:00 1970
> Last arrived: Wed May 21 13:44:41 2008

In the meantime I did more tests. The user requesting the FUD info does 
not have to be local to get a response, it just has to have a login name 
which is shorter than 20 chars (including local part, '@' and the domain 
name). If the login name is 20 chars or longer, the request times out. 
This is reproducible and definitely looks like a bug, or at least an 
inappropriate limitation. However, I am not much of a programmer to 
delve into the code to find it. Can anyone help?

Yours: Laszlo

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


Is skiplist dependant on byte order?

2008-06-15 Thread Gary Mills
I recently upgraded a murder front end server from Solaris 9 SPARC to
Solaris 10 x86 by copying the /imap directory.  I did dump the
mailboxes database before the copy.  It's a skiplist database.  I'm
running cyrus-imapd-2.3.8 on both systems.  As a test, I first checked
on the mailboxes database like this:

# su cyrus -c ksh
# /usr/local/cyrus/bin/ctl_mboxlist -d | wc -l
   0

This message appeared in the log:

Jun 11 16:24:43 setup01 ctl_mboxlist[14082]: [ID 864961 local6.crit] 
DBERROR: critical database situation

After I reloaded it, I got the correct output:

# /usr/local/cyrus/bin/ctl_mboxlist -u < mailboxes.txt
# /usr/local/cyrus/bin/ctl_mboxlist -d | wc -l
  77

This is a test server with only a few mailboxes.  I'll upgrade the
production server later.

I'm assuming that skiplist is dependant on the machine's byte order,
and that a dump and reload is necessary in this case.

Are there any other databases that I should also dump and reload?  As
far as I can tell, the annotation_db, duplicate_db, and tlscache_db
are empty and can simply be removed.  Are there any others on a murder
front end that I've missed?  Where do they reside?

-- 
-Gary Mills--Unix Support--U of M Academic Computing and Networking-

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