procmail
[Top] [All Lists]

Re: spool mail to 2 different mail directories

1997-02-13 13:54:58
On Thu, 13 Feb 1997, James Beal wrote:

Date: Thu, 13 Feb 1997 12:53:04 +0000
From: James Beal <jamesb(_at_)harlequin(_dot_)co(_dot_)uk>
X-Mailer: Mozilla 3.0 (X11; I; SunOS 5.5 sun4m)
MIME-Version: 1.0
Newsgroups: comp.mail.sendmail
To: Pamela Skillman <pamela(_at_)infi(_dot_)net>
Subject: Re: spool mail to 2 different mail directories
References: <3302165A(_dot_)41C6(_at_)infi(_dot_)net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Pamela Skillman wrote:

I would like to spool mail to 2 different directories in order to
keep a backup of spooled mail to disk until the next tape backup
runs to prevent loss of mail due to disk errors and such.....


We have a global procmailrc script to do this, procmail is our local
delivery agent. The only other thing to remeber is to rotate the backup
directorys for example an entry in cron like

1 0 * * * ( cd  /var/spool/mail/Backup ; rm -rf backup.4;mv backup.3
backup.4 ; mv backup.2 backup.3; mv backup..1 backup.2; mv today
backup.1; mkdir today ; chmod 1777 today  )  


thanks, I only have 2 more questions (yeah...so she says...:)

Question #1:
Is there a synchronization problem between 'mv today backup.1' and
'mkdir today' where a message may be in the process of being delivered
to the spool in 'today' when you move it to backup.1???  

Question(s) #2:
Also, after the 'mv' and before the 'mkdir' completes??  If it were
attempting to deliver to a non-existent directory??...what would happen
there...would the message bounce??  or attempts to deliver before the
permissions are set correctly??

Thank you again!!



:0c
{
DROPPRIVS=yes
 
:0:
/usr/spool/mail/Backup/today/$LOGNAME/.
}
 

1- the regular /var/spool/mail or in the users home-dir.
2- /var/spool/alt-mail (probably an NFS mounted partition from the
   host that will keep the 'backed-up' mail)..

-- 
James Beal - Sysadmin, Harlequin Ltd  Phone 01954 785406
--------------------------------------------------------------------------
I have great faith in fools.Self-confidence, my friends call it. :E.A.
Poe


/////////////////////////////////////////////////////////////////////////////
pamela(_at_)infi(_dot_)net                                Pamela J. Skillman
http://www.usgcc.odu.edu                       Systems Engineer III
                                               Systems Engineering
                                               InfiNet
(757) 624-2295 (x3082)
(757) 624-2473  FAX                              
/////////////////////////////////////////////////////////////////////////////

<Prev in Thread] Current Thread [Next in Thread>