Hi Guys,
So for some reason I’m unable to monitor my postfix queue

I have tried the below Resolution but no success.
Open the postfixdetailed file and change /var/log/maillog to /var/log/mail.log
I also changed the $pflogsumm= variable so it includes the sudo command.
$pflogsumm=’/usr/bin/env /usr/bin/sudo /usr/sbin/pflogsumm’;
And added this code to a sudoers file;
snmp ALL=(ALL) NOPASSWD: /usr/sbin/pflogsumm /var/log/mail.log
Maybe you need to change the first word “snmp” to the username your snmp deamon runs on.
For postfix-queues i’ve edited the file to include the sudo command;
COUNT=sudo /usr/sbin/qshape $i | grep TOTAL | awk '{print $2}'
And added this to a sudoers file
snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape incoming
snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape active
snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape deferred
snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape hold
Please note that you need to restart the snmp daemon so the sudoers permissions are set.
run ./poller.php -h HOSTNAME -d
and look to see why no services data is being returned.
soo found this after running poller
Can’t open ‘/var/cache/postfixdetailed’ at /etc/snmp/postfixdetailed line 546.
This is n resolution
Make sure the cache file in /etc/snmp/postfixdetailed is some place that snmpd can write too.
but I’m not sure how to implement it.
not sure how I can resolve this CHMOD does not work setting up sudo rights does not work
“Can’t cd to active: Permission denied
at /usr/sbin/qshape line 375.
0
Can’t cd to active: Permission denied
at /usr/sbin/qshape line 375.
0
Can’t cd to active: Permission denied
at /usr/sbin/qshape line 375.
0
Can’t cd to active: Permission denied
at /usr/sbin/qshape line 375.
0”
I fixed it with this in my /etc/sudoers file:
Debian-snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape /var/spool/postfix/incoming
Debian-snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape /var/spool/postfix/active
Debian-snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape /var/spool/postfix/deferred
Debian-snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape /var/spool/postfix/hold