1

Topic: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

Hello, i'm new on forums and i'm trying to get working and understand this iRedMail mailserver stack implementation ^^.

I've installed it over a clean Ubuntu Server 9.04. First problem i found: using postfixadmin, i create a new user for my domain, then, i can login over webmail without problems, but i can't receive or send any emails from that new user account, checking the files under /mydomain/ i see that the directory tree for that new mailbox it doesn't get created, so dovecot lda isn't making that mailbox. Checking dovecot's logs i see this error:

dovecot: Jul 24 15:29:31 Error: IMAP(mynewuser@mydomain): mkdir(//mydomain/mynewuser//Maildir/cur) failed: Permission denied (euid=1001(vmail) egid=1001(vmail) missing +w perm: /)

No matter if i try to login over Pop3 or Imap or Webmail, dovecot doesn't create the mailbox directory tree, i've already tried to send an email to that new user from another account and the result is email deferred 'couse there is no mailbox to deliver it. I know that is some permission problem with the user vmail, but all directory structure under /.../mydomain/ has 700 vmail:vmail, so i guest it's fine hmm.

Any advice or help?. Thks in advance.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

Could you please post SQL record of this new user? It seems dovecot doesn't append value of 'storagebasedirectory'.

Database: vmail
Table: mailbox

3

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

ZhangHuangbin wrote:

Could you please post SQL record of this new user? It seems dovecot doesn't append value of 'storagebasedirectory'.

Database: vmail
Table: mailbox

| user1@mydomain | $1$626781f8$SM/8u9z2CCSH7zpPwZtup/ | user1 |                      | mydomain/user1/                                 |   250 | mydomain |            | normal | NULL       |          1 |          1 |          1 |             1 |                 1 | 2009-07-24 14:17:38 | 2009-07-24 14:17:38 | 9999-12-31 00:00:00 |      1 |
| user2@mydomain  | $1$846b69a9$f/bt8hFUZ6iKoineeaw210 | user2   |                      | mydomain/user2/                                  |   200 | mydomain |            | normal | NULL       |          1 |          1 |          1 |             1 |                 1 | 2009-07-24 14:55:28 | 2009-07-24 14:55:28 | 9999-12-31 00:00:00 |      1 |

Yes, indeed you are right, there is no value on storagebasedirectory field for those users, but in the first user created during install:

| info@mydomain   | $1$8LVUmwtV$7dw2.MHxgOgIGKfeMK278/ | info            | /home/vmail          | c/ca/mydomain/i/in/inf/info-2009.07.22.15.53.30/ |   100 | mydomain |            | normal | NULL       |          1 |          1 |          1 |             1 |                 1 | 2009-07-22 16:13:50 | 0000-00-00 00:00:00 | 9999-12-31 00:00:00 |      1

As you can see the base directory is fine :S

4

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

You have to modify tools/create_mail_user_MySQL.sh, set correct 'STORAGE_BASE_DIRECTORY' before you create new users. smile

5

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

Hi, JEU.

This issue should be fixed (for fresh installation) moment ago:
http://code.google.com/p/iredmail/sourc … 9ee060cbc0

Thanks for your feedback. smile

6

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

ZhangHuangbin wrote:

You have to modify tools/create_mail_user_MySQL.sh, set correct 'STORAGE_BASE_DIRECTORY' before you create new users. smile

One (maybe dumb) question, i installed iRedMail from /home/user/iRedMail-0.5.0-RC2. Then, after installation was done, i moved iRedMail folder to /home/user/Installers/iRedMail, that has anything to do with the failure? in other words, is anything from the original installation directory used again (or referenced) during the normal server function? for example that create_user script in ../tools?, because maybe was my mistake for moving installation folder...

7

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

iRedMail script set is *NOT* need anymore after installation, you can move it to other directory or even delete it.

8

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

All right, about the problem, where is defined the variable "storagebasedirectory"? so i can change it for all to work fine every time i add some new user?

9

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

You can set a default value with mysql command:

mysql> USE vmail;
mysql> ALTER TABLE mailbox ALTER storagebasedirectory SET DEFAULT '/home/vmail';

After execute above command, you can use 'desc' command to check it out:

mysql> DESC mailbox;
+----------------------+--------------+------+-----+---------------------+-------+
| Field                | Type         | Null | Key | Default             | Extra |
+----------------------+--------------+------+-----+---------------------+-------+
| storagebasedirectory | varchar(255) | NO   |     | /home/vmail         |       |

10 (edited by JEU 2009-07-28 23:56:09)

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

Awesome smile. Thks.

11

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

I have a new problem now lol, i changed the default value for storagebasedirectory in mysql table as you said, in the first account created during install this value is /home/vmail, so i put that value as default, and all new accounts take it without problem, but path on the first account (info@) is this:

/home/vmail/c/ca/ca*********/i/in/inf/info-2009.07.22.15.53.30/

and on the rest of the mailboxes that i created is:

/home/vmail/ca*******/username

So obviusly those path doesn't match hmm. Any clue about how to fix it? or why first account has that complicated path?
I was thinking on delete the first account and re create it so it matches the general maildir. No idea if it will break something :?.

12 (edited by simonbouchard 2009-07-29 06:30:18)

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

Just downloaded the same package, installed on debian lenny, had the same problem ; fixed mysql table. working. Oh... i forgot, i had the delete the mailbox and re-create it. smile

13 (edited by JEU 2009-07-29 06:33:07)

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

simonbouchard wrote:

Just downloaded the same package, installed on debian lenny, had the same problem ; fixed mysql table. working. Oh... i forget, i had the delete the mailbox and re-create it. smile

Yes indeed, but about the path, why the first account created during install has one, and the others other completely different :S

P.S.: I'll do the same and remain with the doubt hmm

14

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

JEU wrote:

but path on the first account (info@) is this:

/home/vmail/c/ca/ca*********/i/in/inf/info-2009.07.22.15.53.30/

For this *strange* maildir design, please refer to this post:
http://www.iredmail.org/forum/topic60-w … 90610.html

and on the rest of the mailboxes that i created is:

/home/vmail/ca*******/username

Which version of iRedMail did you deploy? and how did you create these users? use 'tools/create_mail_user_*.sh'?

And, the *strange* maildir format is recommend for large-scale deployment for better performance.

15

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

ZhangHuangbin wrote:

For this *strange* maildir design, please refer to this post:
http://www.iredmail.org/forum/topic60-w … 90610.html

Lol, apologies for not searching on the forum before asking :S

ZhangHuangbin wrote:

Which version of iRedMail did you deploy? and how did you create these users? use 'tools/create_mail_user_*.sh'?
And, the *strange* maildir format is recommend for large-scale deployment for better performance.

The one on the post name, irm 0.5.0-rc2. I'm just using postfixadmin to add new users/mailboxes to the virtual domain. I'm not using that script you said (at least not directly).

16

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

Maildir format created by postfixadmin is always domain.ltd/user/

17

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

All right, then i must create new users with the script and use postfixadmin just to modify their properties. Otherwise it won't respect the directory structure, is that right?.

18

Re: iRM 0.5.0-rc2 + UbuSrv 9.04 + Mailbox Create Problem

You can use postfixadmin-style maildir. it works well too.
Mixing two styles is not recommend.