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 10-09-2008, 09:16 AM   #1
glyn3332
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Rep: Reputation: 15
Question Postfix email backup?


Hi all,

I was wondering if anyone knows how to implement an email backup system with a Postfix system on CentOS 5 using courier?

I have Googled it but I only find how to use Postfix as a backup MX server.

Any help appreciated
 
Old 10-10-2008, 01:51 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Sender and recipient bcc maps should do:

http://www.postfix.org/ADDRESS_REWRI....html#auto_bcc
 
Old 10-10-2008, 02:54 AM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Or do you want to backup the emails on your server?
 
Old 10-10-2008, 03:13 AM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Backups of a courier system is nothing more than one or more tar archives of the mail stores. I do this incremental archives of mail stores nightly.
 
Old 10-10-2008, 04:28 AM   #5
glyn3332
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks for the response guys. I don't think I gave you enough information to work from as usual!

What I want to do is catch incoming mail to say me@my-domain.com and store a copy in a folder such as /backups/mail/my-domain.com/users/me/dd-mm-yyyy/ so at the end of the day i can run a cron job to turn it into a tar.gz and delete the other files so if a client asks for their mail due to loss I can place it back in their mail box for them.

Thanks for the replies I will follow the current leads now
 
Old 10-10-2008, 02:49 PM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
You want recipient_bcc_maps in use with a virtual mailbox, which specifies the location of the archive. The archive cannot be date-based (it is just a Maildir style mailbox), but you can write your archive script to pick up mail from only given dates.

The idea is this:

Code:
main.cf:

   recipient_bcc_maps = pcre:/etc/postfix/recipient_bcc


/etc/postfix/recipient_bcc recipient_bcc 

   # pick one of the methods below that work best for you:

   # Method 1: for specific users only, such as you
   me@my-domain.com       me@copy.example.org

   # Method 2: more complete forms, capturing original recipient and domains
   /^\"(.*)\"@(.*)/     "$1=$2"@copy.example.org
   /(.*)@([^@]+)$/        $1=$2@copy.example.com
This makes a copy of all mail addressed to the specified recipients.

See these threads:
http://groups.google.com/group/list....29cd94db8f19dd
http://groups.google.com/group/list....450e999e07066f
http://www.arschkrebs.de/postfix/postfix_archive.shtml

Ask more specifics if necessary for more help.
 
Old 10-10-2008, 04:42 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
I would actually take the approach of doing snapshots periodically and then back those up from there. That's if you have the hardware and or capability to do so. You can take snapshots with LVM.
 
Old 10-11-2008, 12:27 PM   #8
glyn3332
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Original Poster
Rep: Reputation: 15
Smile

Quote:
Originally Posted by Mr. C. View Post
You want recipient_bcc_maps in use with a virtual mailbox, which specifies the location of the archive. The archive cannot be date-based (it is just a Maildir style mailbox), but you can write your archive script to pick up mail from only given dates.

The idea is this:

Code:
main.cf:

   recipient_bcc_maps = pcre:/etc/postfix/recipient_bcc


/etc/postfix/recipient_bcc recipient_bcc 

   # pick one of the methods below that work best for you:

   # Method 1: for specific users only, such as you
   me@my-domain.com       me@copy.example.org

   # Method 2: more complete forms, capturing original recipient and domains
   /^\"(.*)\"@(.*)/     "$1=$2"@copy.example.org
   /(.*)@([^@]+)$/        $1=$2@copy.example.com
This makes a copy of all mail addressed to the specified recipients.

See these threads:
http://groups.google.com/group/list....29cd94db8f19dd
http://groups.google.com/group/list....450e999e07066f
http://www.arschkrebs.de/postfix/postfix_archive.shtml

Ask more specifics if necessary for more help.

That's perfect thanks
 
  


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: help required to configure postfix to redirect email. Wheddod Linux - Software 3 08-20-2008 07:55 AM
Postfix: cant send email from my Windows pc using my postfix mailserver elvisious Linux - Software 8 08-01-2008 07:01 PM
POSTFIX Email Can't Receive External Email carlosinfl Linux - Server 2 10-15-2007 06:00 AM
backup email server in Postfix LinuxLover Linux - Networking 1 12-28-2005 09:39 AM
How do I configure postfix master to forward all email to an email server ? hello321_1999 Linux - Software 1 11-18-2004 04:43 AM

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

All times are GMT -5. The time now is 06:22 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