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.....
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)..
My thoughts are to put 'something' between sendmail and the local
delivery agent (procmail in our case) that splits the stream and
sends it to each.... However, I am concerned with how to feed
the message and args into 2 different delivery agent programs because
of the way sendmail forks and execs....and I am no C programmer.
Also, maintenance of this seems a little high... ???
A quick a dirty solution, I think, is to create OURprocmail and put
it on the local delivery agent line in the sendmail.cf file:
Mlocal P=/usr/local/bin/OURprocmail .....
Then have a .procmailrc for OURprocmail that does the following:
:0:c
*
|/usr/local/bin/procmail
:0:
*
|/usr/local/bin/deliver-to-alt-spool (this could be yet another
'procmail' prog that points to /var/spool/alt-mail).
Is there a better, more efficient way of doing this?? Also, will
all errors be reported back to sendmail?? The only ones I can think
of would be 'wrong permissions on mail spool', 'locks', 'disk fills up'.
HELP!! I figure there has to be people out there doing this and keeping
it simple at the same time. Thanks for your help!!!
/////////////////////////////////////////////////////////////////////////////
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
/////////////////////////////////////////////////////////////////////////////