1

Topic: Archive / Move Emails to another mailbox

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.5.1
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version: Debian 10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hey there,

we have a mailbox that grew over 150 GB in size and now no longer work in most email clients. Outlook stuck at startup and I have no chance to archive the emails from there.

Now my idea was to move the emails filtered by creation date to another (new) mailbox. Since my Linux knowledge is not very extensive, I would ask for your suggestions here.

The goal is to move all mails older than 2016 into the new mailbox, which I can open in outlook to create an offline archive. Its very important not to lose any emails from this mailbox, so the procedure should be safe.

Thanks 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: Archive / Move Emails to another mailbox

Use the spider email archiver

3

Re: Archive / Move Emails to another mailbox

Hi, I already thought about that, but im missing a feature to export the archived emails. We need to archive the emails offline as .pst format (is an internal policy).

4 (edited by Cthulhu 2022-08-11 00:50:27)

Re: Archive / Move Emails to another mailbox

iredmail does not offer saving emails as .pst, it is an outlook only file format which is not used by postfix, postfix uses .eml which is just a plain textfile

5

Re: Archive / Move Emails to another mailbox

mf_edvw wrote:

The goal is to move all mails older than 2016 into the new mailbox, which I can open in outlook to create an offline archive. Its very important not to lose any emails from this mailbox, so the procedure should be safe.

You can simply filter old emails with "find" command (with "-ctime" argument or similar), then move found emails to a new sub-folder in mailbox, no need to move to a new mailbox.

6

Re: Archive / Move Emails to another mailbox

Thanks for your answers, the problem is that if i don't move the mails out of the mailbox, the outlook of the user won't connect because the mailbox is way too large.

I need to move like 100GB of emails out of the primary mailbox to get this working again.

Can I move the mails with the find command to another mailbox, or will this break something with the database or the current mailbox?

7

Re: Archive / Move Emails to another mailbox

it is an internal policy to archive mails in pst format, but it seems there have not been any backups or achriving for... 6 years.. since you talk about emails older than 2016

i really dont understand what kind of policy that is, but emails are JUST and ONLY textfiles like already said, why dont you just copy them from filesystem and then convert it to whatever format you like? why you even want to connect with outlook and do this?

8

Re: Archive / Move Emails to another mailbox

mf_edvw wrote:

Can I move the mails with the find command to another mailbox

Sure.

mf_edvw wrote:

or will this break something with the database or the current mailbox?

No.

9

Re: Archive / Move Emails to another mailbox

Large mailbox is a challenge to IMAP server, hence sysadmin should integrate some FTS (full-text search) plugin in Dovecot for fast search in large mailbox, otherwise end user will experience (http, webmail) timeout and the (IMAP) search slows down IMAP server, causes high CPU usage, and somehow impact other end users.

2 suggestions (after you solved the issue):

1) Enable FTS integration in Dovecot. You can use fts-xapian (recommend at this stage), or Apache Solr. Another option is fts-flatcurve which will be available in next Dovecot stable release, v2.4, but no idea when it will be released, so current best option IMO is fts-xapian.
2) Run an email archiving software on another server and import all existing email messages for archiving. Archiving software usually offers blazing fast full-text search, it can be used as a backup too, so sysadmin (or end users) can remove their old messages in mailboxes on the mail server to save disk space and avoid large mailbox. The less messages in single mailbox, the faster IMAP works.

iRedMail team develops a new email archiving software named "Spider", you may be interested in take a look: https://spiderd.io/

10

Re: Archive / Move Emails to another mailbox

Cthulhu wrote:

i really dont understand what kind of policy that is, but emails are JUST and ONLY textfiles like already said, why dont you just copy them from filesystem and then convert it to whatever format you like? why you even want to connect with outlook and do this?

That was the info i needed, thanks - sorry im an microsoft admin and not very familiar with mailservers on linux servers, I'm very careful when it comes to move files directly on the file system - on an microsoft exchange server you will brake the whole system with such things wink