Hi all,
Need some advise again. I am new to sendmail service which is already configured by some other administrators. I would need to write a script to check whether sendmail service is enabled in Solaris and Linux.
Using this command "ps -ef | grep sendmail | grep -v grep".
Or is there any better command?
The above command will give me a line with "-q15m".
The problem is i need to check that this service is only for delivering emails and Not for receiving any emails.
How do i go about writing the script for Solaris and Linux?
You man find this on your system with the command:
man perlintro
You can open a file for input or output using the "open()" function. It's
documented in extravagant detail in perlfunc and perlopentut, but in
short:
open(INFILE, "input.txt") or die "Can't open input.txt: $!";
open(OUTFILE, ">output.txt") or die "Can't open output.txt: $!";
open(LOGFILE, ">>my.log") or die "Can't open logfile: $!";