Archiving Mail
Craig Daters
craig at WESTPRESS.COM
Mon Jan 10 17:39:01 GMT 2005
[ The following text is in the "ISO-8859-1" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
Martin Hepworth wrote:
> Craig
>
> I do the entire outside email traffic.
>
> tar it up after three days, then manually burnt to CD once I get enough
> to fit onto a CD.
>
> If you make the "Archive Mail = users.rule" you can populate the rule
> file with the users you want to archive.
>
> I then have a script that's called by cron to tar.gz up the directories..
>
> #!/usr/bin/perl
>
>
> #
> # IMPORTANT NOTE:
> #
> # Change the next line to 0 instead of 1 to enable this script.
> # By default it will be disabled and will not do anything.
> #
>
> $disabled = 0;
>
>
>
> $archive_dir = '/usr/MailScanner/archive/';
> $backup_dir = '/usr/MailScanner/backup_archive';
> $days_to_keep = 2;
>
> exit if $disabled;
>
> # Standardise the format of the directory name
> die 'Path for archive_dir must be absolute' unless $archive_dir =~ /^\//;
> $archive_dir =~ s/\/$//; # Delete trailing slash
>
> # Now get the content list for the directory.
> opendir(QDIR, $archive_dir) or die "Couldn't read directory $archive_dir";
>
> # Loop through this list looking for any *directory* which hasn't been
> # modified in the last $days_to_keep days.
> # Unfortunately this will do nothing if the filesystem is backed up
> using tar.
> while($entry = readdir(QDIR)) {
> next if $entry =~ /^\./;
> $backup_file = $backup_dir . '/' . $entry . '.tgz';
> $entry = $archive_dir . '/' . $entry;
> system("tar zcf $backup_file --remove-files $entry ; rm -rf
> $entry") if
> -d $entry && -M $entry > $days_to_keep;
> }
> closedir(QDIR);
>
>
> --
> Martin Hepworth
> Snr Systems Administrator
> Solid State Logic
> Tel: +44 (0)1865 842300
>
>
> Craig Daters wrote:
>
>> Hello Everyone. We have been using MailScanner for a couple of years
>> now, and I must say that it is great! My company has been steadily
>> growing larger and larger, and we do business with quite a few people
>> via email. Our clients, upon seeing some sort of proof from us, will
>> give us an okay to print via email, and the need to archive mail for a
>> sort of paper trail when disputes arise has always been in the back of
>> our mind.
>>
>> We have about 4 or 5 people who deal with these clients, and they hang
>> onto their mail for a couple of months before deleting everything.
>> Sometimes we instances come up where if we had the email, we would have
>> gotten paid for the job, but unfortunately was deleted.
>>
>> I have been trying to work out a solution using MailScanner to archive a
>> months worth of mail, tar it up and burn these off to CD or something.
>>
>> We have one MailServer, sitting on the Internet side of our firewall,
>> that all of our 20+ employees who have email, check via POP3.
>>
>> Installed along side of MailScanner is MailWatch, SpamAssassin, ClamAV,
>> ViSpan, and SquirrelMail
>>
>> I am curious to know if anyone is currently, or has considered, setting
>> up some sort of archiving action and how you may have approached it?
>> Does anyone have any thoughts or guidance.
>>
>> I have looked through the FAQ's and am working my mind through the
>> "Archive Mail =" configuration so as to set up some sort of streamlined
>> process to maybe backup mail for these 4 or 5 users weekly, then all the
>> weeklys into a monthly, montly's onto a CD. as well as some way to
>> retrieve and view the messages easily to find the particular mail.
>>
>> Any thoughts, ideas, or redirects? Any help or comments would be
>> welcomed.
>>
>> Thank you,
>>
>> Craig D.
>>
>> --
>>
>> Craig Daters (craig at westpress.com)
>> Systems Administrator
>> West Press Print Communications
>>
>> 1663 West Grant Road
>> Tucson, Arizona 85705
>> (520) 624-4939
>> (520) 624-2715 fax
>>
>> www.westpress.com
>>
>> ------------------------ MailScanner list ------------------------
>> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
>> 'leave mailscanner' in the body of the email.
>> Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
>> the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>>
>> Support MailScanner development - buy the book off the website!
>
>
> **********************************************************************
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote confirms that this email message has been swept
> for the presence of computer viruses and is believed to be clean.
>
> **********************************************************************
>
> ------------------------ MailScanner list ------------------------
> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
> 'leave mailscanner' in the body of the email.
> Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
> the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>
> Support MailScanner development - buy the book off the website!
>
Thanks Martin,
This gives me an idea of how to start a backup script. I do not want to
back up all of it, as this would be to big. I only want to back up like
4 or 5 users email is all. Then be able to restore it somewhere to be
able to find a particular message, preferably from a windows machine as
no one other than myself knows how to use Linux....
--
Craig Daters (craig at westpress.com)
Systems Administrator
West Press Print Communications
1663 West Grant Road
Tucson, Arizona 85705
(520) 624-4939
(520) 624-2715 fax
www.westpress.com
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list