Question: I can "tail" the maillog for a real time view of the postfix mail log BUT... is there anyone out there whom wrote a way to do this that is "reasonably formatted?"

Meaning: It's garble...even though of course I can "pick out" the stuff...but I know it could be formatted better. Has anyone done this? Thanks.

Here's the little script I run right now...

less +F /var/log/maillog
procstillrunning=$(ps -ef | grep less | grep -v "grep" | wc -l)
if (( "$procstillrunning" > 0 )); then
printf "\n\n\n\n"
echo "**************NOTE: LESS STILL RUNNING $procstillrunning TIMES. GO KILL IT."
printf "\n\n\n\n"
echo "Procs still running...."
ps -ef | grep less | grep -v "grep"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.