Hi Chandana,
----- Original Message -----
> Hello All,
>
> The Postfix PMDA uses qshape(1) to gather postfix queue stats, by
> reading files the various postfix queue directories.
>
> The problem is that all of the postfix queues are only readable by the
> postfix user (or root).
>
> Since the postfix pmda (by default) is run under the user pcp, it cannot
> gather the necessary stats.
>
> I suspect that the postfix pmda worked correctly when pcp ran as root.
>
> Is there anyway we can make the postfix (or any) pmda run as root ?
>
All daemon PMDAs start out their life as root, and explicitly switch to
some less privileged user; sounds like we need the following patch, can
you try it and let me know if it works for you?
diff --git a/src/pmdas/postfix/pmdapostfix.pl b/src/pmdas/postfix/pmdapostfix.pl
index e6720ec..acce254 100644
--- a/src/pmdas/postfix/pmdapostfix.pl
+++ b/src/pmdas/postfix/pmdapostfix.pl
@@ -211,7 +211,7 @@ $pmda->add_indom($postfix_sent_indom, \@postfix_sent_dom,
'', '');
$pmda->add_indom($postfix_received_indom, \@postfix_received_dom, '', '');
$pmda->add_tail($logfile, \&postfix_log_parser, 0);
$pmda->set_fetch_callback(\&postfix_fetch_callback);
-$pmda->set_user('pcp');
+$pmda->set_user('postfix');
$pmda->run;
=pod
cheers.
--
Nathan
|