virtdomains and autocreateinboxfolders not working!! -SOLVED
Christos Soulios
soulbros at noc.uoa.gr
Thu Dec 30 06:27:36 EST 2004
Matt Goebel wrote:
> After some further investigation I've figured out a workaround/fix for
> this problem.
>
> Web-cyradm uses the function createmb() to create a new user's mailbox
> (located in ./lib/cyradm.php). This function uses "create" to create a
> user INBOX which works fine. The problem with this is that it that's
> all it creates, and once a user has a INBOX autocreateinboxfolders
> doesn't work. (It's triggered my either a new email or first login to
> an account without an INBOX).
In order autocreateinbox to function, you must have absolutely no user
mailbox created in your mailbox db.
From what I can understand from your email, you try to create the user
using cyradm or web-cyradm and then expect that all folders are created
by the autocreateinbox patch. In this case you have no success with
web-cyradm/cyradm because it logs in using cyrus admin account and
creates the user mailbox. Then when the user logs in with his/her imap
client, INBOX already exists and no further creation takes place.
> Using cyradm "create" from the command
> line the functionality it identical. However, if you use "cm" instead
> from cyradm it creates the INBOX and all subfolders set by
> autocreateinboxfolders.
I suspect that when you login from console, using cyradm, you login
using the user account and not cyrus administrator account. In this case
the INBOX as well as subfolders are created by the autocreateinbox
patch. That is why the create mailbox command fails.
> To fix this I changed "create" to "cm" in the
> createmb() function in cyradm.php. After testing it appears that makes
> the create mailbox command fail (no errors!?) In effect you could also
> just disable the call to this function in newaccount.php and it would
> have the same effect. So since the INBOX doesn't now exist... and the
> login info does... autocreateinboxfolders works as it's supposed to.
> You just need to have it and "createonpost: 1" in your imapd.conf
> file.
>
>
>
> On Wed, 2004-12-29 at 15:11 -0500, Matt Goebel wrote:
>
>>After some testing this appears to be an issue with Web-Cyradm. Using
>>cyradm it creates the folders. Any ideas?
>>
>>On Wed, 2004-12-29 at 12:51 -0500, Matt Goebel wrote:
>>
>>>There's nothing in the log files that indicates a problem. If there was
>>>I'd probably be able to figure this one one. Autocreateinboxfolders
>>>just doesn't work. Here's the maillog entry for a new user logging in
>>>via squirrelmail though:
>>>
I think I see something here :
>>>
>>>Dec 29 11:57:51 mail imap[14936]: login: localhost.localdomain
>>>[127.0.0.1] test2.testdomain.com plaintext User logged in
From what I can see you are not logged in using a virtual domain
account. Rather you use the account test2.testdomain.com account which
qualifies as a default domain account. If you logged in using an other
than default domain account, you should have seen the following line in
your log.
imap[8035]: login: localhost [127.0.0.1] test2 at testdomain.com plaintext
User logged in
>>>Dec 29 11:57:51 mail imap[14956]: accepted connection
>>>Dec 29 11:57:51 mail imap[14956]: login: localhost.localdomain
>>>[127.0.0.1] test2.testdomain.com plaintext User logged in
>>>Dec 29 11:57:51 mail imap[14956]: seen_db: user test2^testdomain^com
>>>opened /var/lib/imap/user/t/test2^testdomain^com.seen
>>>Dec 29 11:57:51 mail imap[14956]: open: user test2^testdomain^com opened
>>>INBOX
The user test2.domain.com INBOX has been already created by web-cyradm
and thus it is not created by autocreateinbox patch.
On the contrary when you send an email using postfix, then the email is
delivered to user test2 at testdomain.com and the INBOX is normally created
in /var/spool/imap/domain/l/localdomain/t/user/testuser.testdomain.com.
Everything else is normal, if you accept my speculations.
Regards and wishes for a happy new year,
Christos
>>>Dec 29 11:57:52 mail last message repeated 2 times
>>>Dec 29 11:57:52 mail imap[14956]: SQUAT failed to open index file
>>>Dec 29 11:57:52 mail imap[14956]: SQUAT failed
>>>Dec 29 11:57:52 mail imap[14959]: accepted connection
>>>Dec 29 11:57:52 mail imap[14959]: login: localhost.localdomain
>>>[127.0.0.1] test2.testdomain.com plaintext User logged in
>>>Dec 29 11:57:52 mail imap[14959]: seen_db: user test2^testdomain^com
>>>opened /var/lib/imap/user/t/test2^testdomain^com.seen
>>>Dec 29 11:57:52 mail imap[14959]: open: user test2^testdomain^com opened
>>>INBOX/Trash
>>>Dec 29 11:57:54 mail imap[14956]: accepted connection
>>>Dec 29 11:57:54 mail imap[14956]: login: localhost.localdomain
>>>[127.0.0.1] test2.testdomain.com plaintext User logged in
>>>Dec 29 11:57:54 mail imap[14956]: open: user test2^testdomain^com opened
>>>INBOX/Drafts
>>>
>>>By default Squirrelmail creates the folders Drafts, Sent, and Trash when
>>>you log in. That isn't logged anywhere I can see.
>>>
>>>
>>>
>>>
>>>On Wed, 2004-12-29 at 01:49 +0200, Aristotelis wrote:
>>>
>>>>On Tue, 28 Dec 2004, Matt Goebel wrote:
>>>>
>>>>
>>>>>No matter what I try I can been unable to get either virtdomains or
>>>>>autocreateinboxfolders working. Without virtdomains set (as shown
>>>>
>>>> Hi,
>>>>
>>>> could you please also paste the relevant part of the log file so
>>>>that we can see the logs.
>>>>
>>>> Best Regards,
>>>> Aristotelis
>>>>---
>>>>Cyrus Home Page: http://asg.web.cmu.edu/cyrus
>>>>Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
>>>>List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>>>
>>>
>>>---
>>>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
>>
>>
>>---
>>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
>
>
>
> ---
> 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
---
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
More information about the Info-cyrus
mailing list