LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-03-2015, 03:34 AM   #1
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Rep: Reputation: 30
Backup old postfix emails


Hello,
I have a postfix server with a lot of emails for the last 8-10 years. The format is mdir and the pop/imap server is dovecot.

I would like to backup those very old emails in another location, but to be able to restore them easily if necessary.

There are more domains, each with more accounts. I would like to be able to restore in the right domain/accounts (ex: user1@domain1.com in /var/vmail/domain1.com/user1 and user2@domain2.com in /var/vmail/domain2/com/user2).

There are also sub-folders in every inbox. If I wouldn't take these into consideration it would be simple (I find email older then 1 year and mv them).

What would be the best approach?


Thank you
 
Old 06-11-2015, 05:24 AM   #2
cormanstnl
Member
 
Registered: Jul 2007
Posts: 58

Rep: Reputation: 0
Is a email = 1 file ?
If yes, you could look this command who find file older in $1 directory than 5day and delete the file :
find $1 -mtime +5 -exec rm -f {} \;

rm command can be modified to mv...
 
Old 06-15-2015, 01:04 AM   #3
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
yes, I thought about that.
I wondered if there was something more dedicated to this.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix keeps bouncing my emails. zappian Linux - Networking 1 11-21-2014 03:41 PM
Postfix Rejecting Emails tsenny Linux - Newbie 4 02-27-2012 08:24 AM
Postfix can not receive emails katja1111 Linux - Server 6 08-03-2010 05:07 PM
wildcard emails using postfix rezaan.marlie Linux - Newbie 3 05-17-2007 08:37 AM
Backup Emails in Thunderbird IBall Linux - Software 1 02-17-2004 09:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration