(SOLVED) Re: Problem on creating users account and their mail boxes

2008-06-16 Thread Stephen Liu
--- Simon Matter [EMAIL PROTECTED] wrote:

- snip -

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


Hi Simon,


I take your advice deleting all mailboxes while running cyradm and
recreate them afterwards.


SquirrelMail is now running nicely sending/receiving emails w/o
problem.  Emails on SM can be deleted and transferred btw mailboxes.



 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.


I don't think I need unixhierarchysep.  Neither I have a full
understanding of its function.


Others noted with thanks.



Hi folks, lot of thanks for your assistance.



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-16 Thread Stephen Liu
Hi Nicolas,


- snip -


 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.


The only reason for me installing packages on repo is easy to
update/upgrade.  I also prefer download/install packages on their
official sites selecting the directory on the OS where I prefer
installing them, at my own control.  I seldomly do it now after ceasing
building my own Linux/Unix OS, LFS, couple years ago.


The advantage on building my own version OS is avoiding installing the
packages which I never use.  The OS is quick to boot.


Others noted with thanks


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

2008-06-16 Thread Alain Spineux
On Mon, Jun 16, 2008 at 9:29 AM, Stephen Liu [EMAIL PROTECTED] wrote:
 --- Simon Matter [EMAIL PROTECTED] wrote:

 - snip -

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


 Hi Simon,


 I take your advice deleting all mailboxes while running cyradm and
 recreate them afterwards.


 SquirrelMail is now running nicely sending/receiving emails w/o
 problem.  Emails on SM can be deleted and transferred btw mailboxes.



 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.


 I don't think I need unixhierarchysep.  Neither I have a full
 understanding of its function.


unixhierarchysep is usefull to have allow dot into mailbox name.
If you are not using unixhierarchysep and want dot, you need to do
some mapping at SMTP level.



 Others noted with thanks.



 Hi folks, lot of thanks for your assistance.



 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




-- 
Alain Spineux
aspineux gmail com
May the sources be with you

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

2008-06-16 Thread Stephen Liu

--- Alain Spineux [EMAIL PROTECTED] wrote:


  I don't think I need unixhierarchysep.  Neither I have a full
  understanding of its function.
 
 
 unixhierarchysep is usefull to have allow dot into mailbox name.


Hi Alain,


Whether you meant;


INBOX
INBOX.Drafts
INBOX.Sent Items
INBOX.friends
INBOX.work
INBOX.work.aaa
user.aaa
user.aaa.stuff
etc.

???


Thanks


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

2008-06-16 Thread Alain Spineux
On Tue, Jun 17, 2008 at 2:51 AM, Stephen Liu [EMAIL PROTECTED] wrote:

 --- Alain Spineux [EMAIL PROTECTED] wrote:


  I don't think I need unixhierarchysep.  Neither I have a full
  understanding of its function.
 

 unixhierarchysep is usefull to have allow dot into mailbox name.


 Hi Alain,


 Whether you meant;


 INBOX
 INBOX.Drafts
 INBOX.Sent Items
 INBOX.friends
 INBOX.work
 INBOX.work.aaa
 user.aaa
 user.aaa.stuff
 etc.

 ???

rather

user/stephen.liu
user/stephen.liu/Drafts
user/stephen.liu/Sent Items

user/someone.else





 Thanks


 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




-- 
Alain Spineux
aspineux gmail com
May the sources be with you

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 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 for you.

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 

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 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 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 

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 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
  

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


Problem on creating users account and their mail boxes

2008-06-14 Thread Stephen Liu
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


Please help.  TIA


B.R.
Stephen L

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