1

Topic: Upgraded from 0.7.2 to 0.7.3 :: Lost Mail

==== Provide basic information to help troubleshoot ====
- iRedMail version: 0.7.3
- Linux/BSD distribution name and version: Cent OS 5.6
- Any related log? Log is helpful for troubleshooting.
====

Greetings,

On Saturday I updated our 0.7.2 install to 0.7.3 following the upgrade guide here: http://iredmail.org/wiki/index.php?titl … .7.2-0.7.3.

We have an LDAP instance.

Today, after our users have come back from the weekend, some of my users are reporting that all of their mail has disappeared. Checking their Maildir directory, it looks like there is mail in the folder.

For example, one user's mail folder is 3.7GB. However they show zero messages in their inbox. Checking in iRedAdmin Pro, the quota used also shows 0.

Does anyone have an idea of what could cause this?

Thanks.

----

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

2

Re: Upgraded from 0.7.2 to 0.7.3 :: Lost Mail

More information here...

After examining the mail folders closer, i've concluded that it is not something in the updateLDAPValues_072_to_073.py.

Instead of storing mail in /var/vmail, all new mail since the upgrade has been stored in /var/vmail/vmail.

I also ran

yum update

at the same time with the following results in the log:

Aug 27 15:19:21 Updated: glibc-common-2.5-58.el5_6.4.x86_64
Aug 27 15:19:35 Updated: glibc-2.5-58.el5_6.4.x86_64
Aug 27 15:19:35 Updated: krb5-libs-1.6.1-55.el5_6.2.x86_64
Aug 27 15:19:36 Updated: curl-7.15.5-9.el5_6.3.x86_64
Aug 27 15:19:36 Updated: php-common-5.3.6-5.el5.art.x86_64
Aug 27 15:19:36 Updated: php-pdo-5.3.6-5.el5.art.x86_64
Aug 27 15:19:37 Updated: php-cli-5.3.6-5.el5.art.x86_64
Aug 27 15:19:38 Updated: clamav-db-0.97.2-1503.el5.art.x86_64
Aug 27 15:19:40 Updated: clamav-0.97.2-1503.el5.art.x86_64
Aug 27 15:19:41 Updated: kernel-headers-2.6.18-238.19.1.el5.x86_64
Aug 27 15:19:43 Updated: xulrunner-1.9.2.18-2.el5_6.x86_64
Aug 27 15:19:44 Updated: clamd-0.97.2-1503.el5.art.x86_64
Aug 27 15:19:44 Updated: php-5.3.6-5.el5.art.x86_64
Aug 27 15:19:44 Updated: php-intl-5.3.6-5.el5.art.x86_64
Aug 27 15:19:44 Updated: php-xml-5.3.6-5.el5.art.x86_64
Aug 27 15:19:44 Updated: php-imap-5.3.6-5.el5.art.x86_64
Aug 27 15:19:44 Updated: php-ldap-5.3.6-5.el5.art.x86_64
Aug 27 15:19:44 Updated: php-mbstring-5.3.6-5.el5.art.x86_64
Aug 27 15:19:45 Updated: glibc-headers-2.5-58.el5_6.4.x86_64
Aug 27 15:19:46 Updated: glibc-devel-2.5-58.el5_6.4.x86_64
Aug 27 15:19:47 Updated: glibc-2.5-58.el5_6.4.i686
Aug 27 15:19:47 Updated: krb5-libs-1.6.1-55.el5_6.2.i386
Aug 27 15:19:48 Updated: curl-7.15.5-9.el5_6.3.i386
Aug 27 15:19:48 Updated: mysql-libs-5.1.58-2.el5.art.x86_64
Aug 27 15:19:49 Updated: mysql-5.1.58-2.el5.art.x86_64
Aug 27 15:19:50 Updated: mysql-server-5.1.58-2.el5.art.x86_64
Aug 27 15:19:50 Updated: php-mysql-5.3.6-5.el5.art.x86_64

So, it is possible that one of these may have caused the change to the path of the mail.

Additionally, here is the storage attributes for one user whose mail is no longer visible:

homeDirectory: /var/vmail/domain.com/w/we/web/web-2010.08.17.07.54.26/
mailMessageStore: vmail/domain.com/w/we/web/web-2010.08.17.07.54.26/
storageBaseDirectory: /var

Also just for S&Gs, here is the line of my dovecot-ldap.conf file that sets the maildir:

user_attrs      = homeDirectory=home,mailMessageStore=mail=maildir:/var/vmail/%$/Maildir/,mailQuota=quota_rule=*:bytes=%$

Note that this conf file has not been updated in several months:

[root@xray etc]# ls -la | grep dove
-rw-r--r--   1 root    root      5813 Oct 25  2010 dovecot-1.1.conf
-rw-r--r--   1 root    root     51276 Oct 25  2010 dovecot-1.2.conf
-rw-r--r--   1 root    root      6403 Apr 17 08:48 dovecot.conf
-rw-r--r--   1 root    root     49026 Aug 16  2010 dovecot.conf.2010.08.17.06.31.46
-rw-rw-r--   1 root    root      5813 Aug 16  2010 dovecot.conf.rpmsave
-r-x------   1 root    root       974 May 22 08:17 dovecot-ldap.conf
-rw-r--r--   1 root    root       337 Feb 17  2011 dovecot-used-quota.conf

3

Re: Upgraded from 0.7.2 to 0.7.3 :: Lost Mail

mailMessageStore=mail=maildir:/var/vmail/%$/Maildir/

iRedMail will use value of LDAP attribute mailMessageStore in maildir path, so final result is: /var/vmail/vmail/domain.com/w/we/web/web-2010.08.17.07.54.26/.

I guess original maildir path is /var/vmail/vmail1/domain.com/w/we/web/web-2010.08.17.07.54.26/.

Were these users newly created after upgrading?

4

Re: Upgraded from 0.7.2 to 0.7.3 :: Lost Mail

Thanks for the reply.

There have been no new users since the upgrade. All users were created prior to the upgrade.

I think to solve my issue, I must remove the "vmail" from my mailMessageStore in the dovecot-ldap config. That will change dovecot to resume looking in :

/var/vmail/domain.com/w/we/web/web-2010.08.17.07.54.26/

instead of

/var/vmail/vmail/domain.com/w/we/web/web-2010.08.17.07.54.26/

Do you know how I might be able to move the messages from the new location back to the old?

Thanks!

5

Re: Upgraded from 0.7.2 to 0.7.3 :: Lost Mail

bp1 wrote:

Do you know how I might be able to move the messages from the new location back to the old?

Simply copy them to the old directory.

*) Just copy emails, not dovecot index files.
*) Remove dovecot index files in old directory after copying. It will force Dovecot to index all mails in directory and re-generate index files.
*) Important one: Don't forget file owner (user/group: vmail/vmail) and permission (0700).