From: Alexander Wirt <formorer@debian.org>
Date: Tue, 25 Sep 2018 08:03:32 +1000
Subject: Suppress warning in amavisd-snmp-subagent if postfix isn't installed

---
 amavisd-snmp-subagent     | 2 +-
 amavisd-snmp-subagent-zmq | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/amavisd-snmp-subagent b/amavisd-snmp-subagent
index c0a427b..c641caa 100755
--- a/amavisd-snmp-subagent
+++ b/amavisd-snmp-subagent
@@ -780,7 +780,7 @@ EOD
   if (!defined $mta_queue_dir) {  # test for access to Postfix queue directory
     local($ENV{PATH}) = '/usr/sbin:/usr/local/sbin:/opt/postfix/sbin';
     $! = 0;
-    $mta_queue_dir = qx(postconf -h queue_directory);
+    $mta_queue_dir = qx(postconf -h queue_directory 2>/dev/null);
     if (!defined $mta_queue_dir) {
       if ($! != 0) {
         do_log(1, "no postfix (unable to run postconf command): $!");
diff --git a/amavisd-snmp-subagent-zmq b/amavisd-snmp-subagent-zmq
index d239e84..acccc06 100755
--- a/amavisd-snmp-subagent-zmq
+++ b/amavisd-snmp-subagent-zmq
@@ -1123,7 +1123,7 @@ my $keep_running = 1;
   if (!defined $mta_queue_dir) {  # test for access to Postfix queue directory
     local($ENV{PATH}) = '/usr/sbin:/usr/local/sbin:/opt/postfix/sbin';
     $! = 0;
-    $mta_queue_dir = qx(postconf -h queue_directory);
+    $mta_queue_dir = qx(postconf -h queue_directory 2>/dev/null);
     if (!defined $mta_queue_dir) {
       if ($! != 0) {
         do_log(1, "no postfix (unable to run postconf command): $!");
