#1  
Old 6th May 2012, 12:31
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default email archiving

I've searched and found a couple of threads here asking the same question but no proper solution. Mostly these threads were a few years old so I am starting my own here.

Basically I have clients hosting their emails with me that need to comply with certain regional laws which means 100% reliable storage of all incoming/outgoing emails. Lets not worry about how I back this up, for now I only need a solution for archiving.

My base system runs ISPCFG3 with Debian Squeeze.

Needed features:
  • archive all emails, incoming and outgoing on a per email domain basis

Nice to have features:
  • web interface for searching and restoring from the archive into the original location
  • CLI for restoring from the archive into the original location

What I have found so far:
To be honest, the seemingly easiest solution from the ones I listed above seems to be this one: http://www.arschkrebs.de/postfix/postfix_archive.shtml but I admit I don't completely understand it.

Does anyone here have a similar solution in place and is willing to share the details?
Reply With Quote
Sponsored Links
  #2  
Old 7th May 2012, 09:54
dipeshmehta dipeshmehta is offline
Senior Member
 
Join Date: Nov 2008
Location: Rajkot, India
Posts: 175
Thanks: 5
Thanked 13 Times in 13 Posts
Send a message via Yahoo to dipeshmehta Send a message via Skype™ to dipeshmehta
Default

you may use sender_bcc_maps and recipient_bcc_maps feature.

For example: if you want bcc of all outgoing message, you may create a file with any name in /etc/postfix with something like this:
Code:
*@domain1.com mailaddress@domain1.com
*@domain2.com mailaddress@domain2.com
then run
Code:
postmap /etc/postfix/filename
and
add following line to /etc/postfix/main.cf
Code:
sender_bcc_maps = hash:/etc/postfix/filename
Similar for recipient_bcc_maps.

then, restart postfix

You may find details at http://www.postfix.org/postconf.5.html
Reply With Quote
The Following User Says Thank You to dipeshmehta For This Useful Post:
Ovidiu (7th May 2012)
  #3  
Old 7th May 2012, 10:56
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default

Thanks, that looks like the other postfix URL I posted except you explained it better :-)
Will read through your link, give it a try and report back :-)
Reply With Quote
  #4  
Old 7th May 2012, 11:05
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default

I think I already need help :-)

lets take sender_bcc_maps as an example:

lets say I use:
*@domain1.com mailaddress@domain1.com

to collect a copy of all outgoing emails at that address. would that work even if I set that email address that collects all BCCs as inactive in ISPCFG3? I'd like to have it inactive as to not receive "normal" emails, would this postfix internal method still work?

The documentation says:
Quote:
The BCC address (multiple results are not supported)
- what exactly do they mean by that?
Reply With Quote
  #5  
Old 7th May 2012, 11:32
dipeshmehta dipeshmehta is offline
Senior Member
 
Join Date: Nov 2008
Location: Rajkot, India
Posts: 175
Thanks: 5
Thanked 13 Times in 13 Posts
Send a message via Yahoo to dipeshmehta Send a message via Skype™ to dipeshmehta
Default

Quote:
Originally Posted by Ovidiu View Post
lets say I use:
*@domain1.com mailaddress@domain1.com

to collect a copy of all outgoing emails at that address. would that work even if I set that email address that collects all BCCs as inactive in ISPCFG3?
I am not using ISPC, so I am little unfamiliar with its config. Well, the suggested method is a feature of postfix, and it forwards bcc to the given address which is normal user account as others.[/QUOTE]

Quote:
Originally Posted by Ovidiu View Post
I'd like to have it inactive as to not receive "normal" emails, would this postfix internal method still work?
you may create recipient account with some random string, to minimize chances of receiving normal mails. (e.g. sentlog.hf566412z@domain.com)
Reply With Quote
  #6  
Old 7th May 2012, 12:00
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default

I need to add a small correction to the above solution, you don't need
Quote:
*
, it doesn't even work. Skip it and all is good:

Quote:
@domain1.com mailaddress@domain1.com
Regarding other solutions, I contacted the author of one of the milters for archiving via psotfix: http://www.dancingfortune.com/projec...smtp/index.php

and he explained the advantage of using the milter vs sender_bcc_maps/recipient_bcc_maps as follows:

One of the main issues with archiving SENT mail is that the user can essentially put any From: address they like. What we do to solve this problem is require that users must provide login credentials to send mail via smtp_auth. In this case the milter is able to see the username of the sender and determine where to archive it, regardless of what From: address is in the header. This is a case worth considering if the client requires the archive for legal reasons and not just backup purposes.

Sounds right to me, I think this is a more "proper" solution, am I right?
Reply With Quote
  #7  
Old 8th May 2012, 07:20
dipeshmehta dipeshmehta is offline
Senior Member
 
Join Date: Nov 2008
Location: Rajkot, India
Posts: 175
Thanks: 5
Thanked 13 Times in 13 Posts
Send a message via Yahoo to dipeshmehta Send a message via Skype™ to dipeshmehta
Default

Quote:
Originally Posted by Ovidiu View Post
One of the main issues with archiving SENT mail is that the user can essentially put any From: address they like. What we do to solve this problem is require that users must provide login credentials to send mail via smtp_auth. In this case the milter is able to see the username of the sender and determine where to archive it, regardless of what From: address is in the header. This is a case worth considering if the client requires the archive for legal reasons and not just backup purposes.

Sounds right to me, I think this is a more "proper" solution, am I right?
Sounds right to me too. Go ahead and post your experience here, all the best to you
Reply With Quote
  #8  
Old 8th May 2012, 11:27
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default

Thanks, will reply here if I reach a working config, that milter doesn't come with debian instructions so I am battling with it...
Reply With Quote
  #9  
Old 8th May 2012, 11:48
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,796
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

If you use a courier setup then you can archive the mails with a maildrop script, just add a rule to /var/vmail/.mailfilter to store a copy of all emails to a separate directory before delivering them to the mailbox.

If you use dovecot then you can not store the emails to a folder directly as sive does not support that but you can forward them to a technical "archiving" address and also set flags in the mail header if you want to kep the original recipient address etc.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 9th May 2012, 09:37
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
 
Default

Thanks, that is all great information but I realized one would need something else for a "proper" legal email archive so I had a look at open source systems but the only one I could find is enkive so I suggested it as a HowTo here: http://www.howtoforge.com/forums/showthread.php?t=57215
Reply With Quote
Reply

Bookmarks

Tags
archive, email, postfix

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Email delivery problem - Ubuntu Karmic Koala (Ubuntu 9.10) [ISPConfig 2] qiubosu General 58 16th April 2010 13:24
Email Archiving billcouper81 Installation/Configuration 4 22nd March 2010 11:34
Email delivery problem - Ubuntu Karmic Koala (Ubuntu 9.10) [ISPConfig 2] qiubosu Installation/Configuration 1 18th January 2010 10:21
hotmail rejects outgoing email nzimas Server Operation 3 1st May 2009 04:39
email forwarding locally consumes all resources rdells General 20 1st May 2006 20:43


All times are GMT +2. The time now is 05:38.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.