Problem on creating users account and their mail boxes

Stephen Liu satimis at yahoo.com
Sun Jun 15 07:07:14 EDT 2008


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 


More information about the Info-cyrus mailing list