On 24 Oct 1996, Naveed Mustafa wrote:
We have a fleet of RS/6000 machines running AIX. We would like to get the
configuration snapshots of these servers and archive them to a central
server.
I have written a small procmailrc filter which I want to run as root. The
reason for running it as root is because the configuration snapshot contains
some secured files, for instance, /etc/security/passwd file etc. The filter
creates a directory of the server from which it received the "configuration"
information and copy the body of the mail message as the <server>.config
file.
You can try putting the .procmailrc file in /etc/procmailrcs/ . If the
file is owned by root, procmail will execute the commands with root
privileges.
Reconfigure sendmail to include procmail. (FEATURE(use_procmail) in the
newer m4 configurations - or something like that.)
Then, you should set up a rule to forward root's mail to the newly
defined procmail mailer, with the rc file as argument. I'm not sure how
to do this.
Here is the .procmailrc recipe;
PATH=/bin:/usr/bin:/usr/local/bin
DIR=/temp
(Is this a typo or should it be /tmp ?)
--
Guy Geens <guy(_dot_)geens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be>: Ph.D.
student at ELIS -- TFCG / IMEC
Home Page: http://www.elis.rug.ac.be/ELISgroups/tfcg/staff/gg.html
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use
keyserver)
Dilbert: I've discovered the exact chemical compound which produces
happiness. I've calculated the exact mixture of fruits and
vegetables needed to produce happiness. Do you realize what
this means?
Dogbert: Yes, that the government will ban all fruits and vegetables.