Re: Duplicate Mailboxes
- From: "Taylor, Grant" <gtaylor@xxxxxxxxxxxxxxxxx>
- Date: Thu, 04 May 2006 09:53:41 -0500
I'm trying to prevent a situation where someone accidently deletes a
message from their mailbox. I currently make every few hours backups
using rsync.
What I am looking if for messages to be delivered to both the user's
mailbox, and a duplicate mailbox. This way if someone deletes messages,
their duplicate mailbox still has a backup. Then I would use a tool
(archivemail) to periodically delete the old messages from the
duplicate mailbox.
Is there any script that can be used on a global basis for all the
users that can write to both the user and to user.bak ?
Heres a possibility. If you are using Maildir (or something like it that uses a file per message) on a unix file system (where else would you be running Sendmail?) you could have a small script run fairly often (read every few minutes???) that would hard link the files from one directory in to another. I.e. a file in "~<user>/Maildir/cur/<msgid>" would be hard linked to "~<user>/Maildir.Backup/cur/<msgid>". Another advantage that this would have is that the message would only be on the file system one time, thus taking up less space. This method would also be very easy to clean up from as you could use find to look for files in the backup maildir that only had one link "find ~<user>/Maildir.Backup/ -type f -links 1 -ctime 1" to look for any files in the backup maildir that do not have any corresponding (hard) link in the main maildir that have not had their inode status changed in 24 hours. If you could pull this off (read: if your mail storage would support this) I th
ink this would be a fairly good way to accomplish what you are after with as little wasted space on the disk as possible. Heck I think it would even be possible to hack Procmail (LDA) to write the file in one folder and hard link it to another.
Grant. . . .
.
- References:
- Duplicate Mailboxes
- From: lgoetz
- Duplicate Mailboxes
- Prev by Date: Re: Duplicate Mailboxes
- Next by Date: stickyhost feature with mail_hub and local_user_file
- Previous by thread: Re: Duplicate Mailboxes
- Next by thread: digital signatures
- Index(es):
Relevant Pages
|