subfolder imap creation..

nick warr
  • nick warr

    nick warr - 2011-02-15

    I'm trying to add some subfolders during the creation of users, but the problem (from what I'm seeing) seems to be that the welcome email takes a second or two too long to go through the system, and the imap command to chdir doesn't find the directory in time..

    By the time I can find the error, the directory exists, unless the problem is that the base directory of courier isn't what imapd thinks it is (the chdir follows the /domain.tld/username@domain.tld/ format, should it be trying the entire path /usr/local/virtual/domain.tld/username@domain.tld/ ?).

    I'm of the opinion that the problem is the slowness, if I could double the wait I'm pretty sure the problem would resolve itself..

    Is there an option I can change, or do I need to edit the relevant php file?

  • nick warr

    nick warr - 2011-02-17

    Well, to let anyone who might want to know how to fix this problem, there's a line sleep(1); in the file (the section "create_mailbox_subfolders"), just add some time to it, I have it sleep for 6 seconds, and it resolved my problem…

  • Christian Boltz

    Christian Boltz - 2011-02-17

    You found the correct place to edit (it's not a $CONF option until now).

    However I'm more than surprised that you need a sleep(6) - this would indicate a *very* slow mailserver. Are the 6 seconds really needed or is it just "well, I need more than one, let's try 6"? ;-)

    (Thinking about it, maybe I can implement a "smart" delay that uses sleep(1), but tries X times after another sleep(1)…)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks