1

Topic: change mailbox storage path

Hello,

here is the scenario:
I have modified STORAGE_BASE_DEIRECTORY from default /var/vmail/vmail01 to      /emails

now whenever i add a new domain it's not getting listed in /emails folder
I've set the permissions to 700 and the ownership to vmail:vmail recursively to the /emails folder.


Ideally if i add a new domain, a folder named as domain name should be created in the STORAGE_BASE_DIRECTORY  along with the email addresses  structure  like /s/sa/san/ ......    etc..

There is no folder getting created in /emails but still i can send/receive the emails from the added domain..

Please advise..

Thanks,
Sandeep

2

Re: change mailbox storage path

May i know:

- Where did you modify STORAGE_BASE_DEIRECTORY?
- How did you create user/domain? with PostfixAdmin?
- If you store mail accounts in MySQL, did you update column "storagebasedirectory" and "storagenode" in table "vmail.mailbox"?

3

Re: change mailbox storage path

Hi Zhang,

Thanks for the quick reply.

I've changed the storage base directory in both settings.ini   in /var/www/iredadmin     and the shell script provided with iRedadmin   in ../tools/create_mail_user_Openldap.sh 

And I am adding a new domain from iredadmin    not from postfixadmin.. 

LDAP is being used as backend for storing mails.. I havn't changed anything other than the mentioned settings..


Thanks,
Sandeep Singh

4

Re: change mailbox storage path

Did you restart apache after changing settings in settings.ini?

iRedAdmin open source edition and iRedAdmin-Pro-1.1.x require restarting apache to make changes work. Fixed in iRedAdmin-Pro-1.2.x and later versions.

5

Re: change mailbox storage path

Yes, i did many times,,
still no luck...

I don't know how the emails are working..  and when i go to the phpldapadmin and see properties for each email address under Users OU
i can see that the user's home directory and default storage path is what i've set in the script..
But there is no directory present physically on the server file system  that is what driving me crazy..

6

Re: change mailbox storage path

Could you please set "mail_debug = yes" in /etc/dovecot.conf, restart dovecot, send one more testing email, and monitor /var/log/dovecot.log, /var/log/sieve.log? paste related log here (REPLACE sensitive information before posting)

7

Re: change mailbox storage path

Here  are the logs from dovecot.log and sieve.log

dovecot.log


dovecot: Dec 27 02:24:04 Info: IMAP(sandeep@mydomain1.com): Quota warning: bytes=49807360 (95%) messages=0 command=/usr/bin/dovecot-quota-warning.sh 95
dovecot: Dec 27 02:24:04 Info: IMAP(sandeep@mydomain1.com): maildir: data=~/mydomain1.com/sandeep-2010.12.27.02.14.35//Maildir/
dovecot: Dec 27 02:24:04 Info: IMAP(sandeep@mydomain1.com): maildir++: root=/email/mydomain1.com/sandeep-2010.12.27.02.14.35//Maildir, index=, control=, inbox=/email/mydomain1.com/sandeep-2010.12.27.02.14.35//Maildir
dovecot: Dec 27 02:24:04 Info: imap-login: Login: user=<sandeep@mydomain1.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Dec 27 02:24:04 Info: IMAP(sandeep@mydomain1.com): Disconnected: Logged out bytes=24/94






sieve.log


deliver(singh@mydomain1.com): Dec 27 02:24:02 Info: cmusieve: /var/vmail/sieve/mydomain1.com/singh/dovecot.sieve doesn't exist
deliver(singh@mydomain1.com): Dec 27 02:24:02 Info: cmusieve: Using sieve path: /var/vmail/sieve/dovecot.sieve
deliver(singh@mydomain1.com): Dec 27 02:24:02 Info: cmusieve: Script not found: /var/vmail/sieve/dovecot.sieve
deliver(sandeep.singh@mydomain2.com): Dec 27 02:24:02 Info: cmusieve: /var/vmail/sieve/mydomain2.com/sandeep.singh/dovecot.sieve doesn't exist
deliver(sandeep.singh@mydomain2.com): Dec 27 02:24:02 Info: cmusieve: Using sieve path: /var/vmail/sieve/dovecot.sieve
deliver(sandeep.singh@mydomain2.com): Dec 27 02:24:02 Info: cmusieve: Script not found: /var/vmail/sieve/dovecot.sieve
deliver(sandeep.singh@mydomain2.com): Dec 27 02:24:02 Info: msgid=<dba66f9bb8cfe10e566cd4fe5205609d@127.0.0.1>: saved mail to INBOX
deliver(singh@mydomain1.com): Dec 27 02:24:02 Info: msgid=<dba66f9bb8cfe10e566cd4fe5205609d@127.0.0.1>: saved mail to INBOX


Thanks,
Sandeep S

8

Re: change mailbox storage path

Seems dovecot found correct maildir path:

dovecot: Dec 27 02:24:04 Info: IMAP(sandeep@mydomain1.com): maildir++: root=/email/mydomain1.com/sandeep-2010.12.27.02.14.35//Maildir, index=, control=, inbox=/email/mydomain1.com/sandeep-2010.12.27.02.14.35//Maildir

9

Re: change mailbox storage path

Okay, now somehow everything is working fine... i can see the new directories being created in /email folder and the directry structure....

Okay what i did was i deleted mydomain1.com from phpldapadmin

created mydomain1.com again from iredadmin with two users.. logged into roundcube with user1 and sent out one two test mails to mydomain2.com and some other domains.. and now i can see the directory structure..


What i am thinking is if i just create a domain from iredadmin  and don't use it (send and recive mail) then the directory structure is not created...

It gets created the moment i sent out first email out... am i corrct??

Thanks,
Sandeep

10

Re: change mailbox storage path

sandeep.singh wrote:

It gets created the moment i sent out first email out... am i corrct??

Yes.

iRedAdmin just create accounts in LDAP, Dovecot (LDA) will create mailboxes when delivering mail or user login with POP3/IMAP.

11

Re: change mailbox storage path

Thanks for the information Zhang.. I must say iRedmail is a great project...

All the best for your future developments.

12

Re: change mailbox storage path

Hope you enjoy iRedMail smile