diff -Naur ce/html/includes/graphs/application/dovecot_auth_cache.inc.php new/html/includes/graphs/application/dovecot_auth_cache.inc.php
--- ce/html/includes/graphs/application/dovecot_auth_cache.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/html/includes/graphs/application/dovecot_auth_cache.inc.php	2017-07-16 00:10:21.192732962 +0200
@@ -0,0 +1,44 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage graphs
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+include_once($config['html_dir']."/includes/graphs/common.inc.php");
+
+$scale_min    = 0;
+$colours      = "mixed";
+$nototal      = (($width < 550) ? 1 : 0);
+$rrd_filename = get_rrd_path($device, "app-dovecot.rrd");
+$array        = array(
+			'auth_cache_hits' => array('descr' => 'hits')
+                     );
+
+$i            = 0;
+$x            = 0;
+
+if (is_file($rrd_filename))
+{
+  $max_colours = count($config['graph_colours'][$colours]);
+  foreach ($array as $ds => $data)
+  {
+    $x = (($x<=$max_colours) ? $x : 0);
+    $rrd_list[$i]['filename'] = $rrd_filename;
+    $rrd_list[$i]['descr']    = $data['descr'];
+    $rrd_list[$i]['ds']       = $ds;
+    $rrd_list[$i]['colour']   = $config['graph_colours'][$colours][$x];
+    $i++;
+    $x++;
+  }
+}
+
+include($config['html_dir']."/includes/graphs/generic_multi.inc.php");
+
+// EOF
diff -Naur ce/html/includes/graphs/application/dovecot_auth.inc.php new/html/includes/graphs/application/dovecot_auth.inc.php
--- ce/html/includes/graphs/application/dovecot_auth.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/html/includes/graphs/application/dovecot_auth.inc.php	2017-07-15 23:08:23.746920751 +0200
@@ -0,0 +1,47 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage graphs
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+include_once($config['html_dir']."/includes/graphs/common.inc.php");
+
+$scale_min    = 0;
+$colours      = "mixed";
+$nototal      = (($width < 550) ? 1 : 0);
+$rrd_filename = get_rrd_path($device, "app-dovecot.rrd");
+$array        = array(
+			'auth_successes' => array('descr' => 'Successful auths / s'),
+			'auth_master_success' => array('descr' => 'Master auths / s'),
+			'auth_failures' => array('descr' => 'Failed auths / s'),
+			'auth_db_tempfails' => array('descr' => 'Temporary failures / s')
+                     );
+
+$i            = 0;
+$x            = 0;
+
+if (is_file($rrd_filename))
+{
+  $max_colours = count($config['graph_colours'][$colours]);
+  foreach ($array as $ds => $data)
+  {
+    $x = (($x<=$max_colours) ? $x : 0);
+    $rrd_list[$i]['filename'] = $rrd_filename;
+    $rrd_list[$i]['descr']    = $data['descr'];
+    $rrd_list[$i]['ds']       = $ds;
+    $rrd_list[$i]['colour']   = $config['graph_colours'][$colours][$x];
+    $i++;
+    $x++;
+  }
+}
+
+include($config['html_dir']."/includes/graphs/generic_multi.inc.php");
+
+// EOF
diff -Naur ce/html/includes/graphs/application/dovecot_cache.inc.php new/html/includes/graphs/application/dovecot_cache.inc.php
--- ce/html/includes/graphs/application/dovecot_cache.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/html/includes/graphs/application/dovecot_cache.inc.php	2017-07-15 23:08:34.646936065 +0200
@@ -0,0 +1,44 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage graphs
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+include_once($config['html_dir']."/includes/graphs/common.inc.php");
+
+$scale_min    = 0;
+$colours      = "mixed";
+$nototal      = (($width < 550) ? 1 : 0);
+$rrd_filename = get_rrd_path($device, "app-dovecot.rrd");
+$array        = array(
+			'mail_cache_hits' => array('descr' => 'Mail cache hits')
+                     );
+
+$i            = 0;
+$x            = 0;
+
+if (is_file($rrd_filename))
+{
+  $max_colours = count($config['graph_colours'][$colours]);
+  foreach ($array as $ds => $data)
+  {
+    $x = (($x<=$max_colours) ? $x : 0);
+    $rrd_list[$i]['filename'] = $rrd_filename;
+    $rrd_list[$i]['descr']    = $data['descr'];
+    $rrd_list[$i]['ds']       = $ds;
+    $rrd_list[$i]['colour']   = $config['graph_colours'][$colours][$x];
+    $i++;
+    $x++;
+  }
+}
+
+include($config['html_dir']."/includes/graphs/generic_multi.inc.php");
+
+// EOF
diff -Naur ce/html/includes/graphs/application/dovecot_commands.inc.php new/html/includes/graphs/application/dovecot_commands.inc.php
--- ce/html/includes/graphs/application/dovecot_commands.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/html/includes/graphs/application/dovecot_commands.inc.php	2017-07-15 23:08:45.994952004 +0200
@@ -0,0 +1,44 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage graphs
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+include_once($config['html_dir']."/includes/graphs/common.inc.php");
+
+$scale_min    = 0;
+$colours      = "mixed";
+$nototal      = (($width < 550) ? 1 : 0);
+$rrd_filename = get_rrd_path($device, "app-dovecot.rrd");
+$array        = array(
+			'num_cmds' => array('descr' => 'Commands')
+                     );
+
+$i            = 0;
+$x            = 0;
+
+if (is_file($rrd_filename))
+{
+  $max_colours = count($config['graph_colours'][$colours]);
+  foreach ($array as $ds => $data)
+  {
+    $x = (($x<=$max_colours) ? $x : 0);
+    $rrd_list[$i]['filename'] = $rrd_filename;
+    $rrd_list[$i]['descr']    = $data['descr'];
+    $rrd_list[$i]['ds']       = $ds;
+    $rrd_list[$i]['colour']   = $config['graph_colours'][$colours][$x];
+    $i++;
+    $x++;
+  }
+}
+
+include($config['html_dir']."/includes/graphs/generic_multi.inc.php");
+
+// EOF
diff -Naur ce/html/includes/graphs/application/dovecot_connected.inc.php new/html/includes/graphs/application/dovecot_connected.inc.php
--- ce/html/includes/graphs/application/dovecot_connected.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/html/includes/graphs/application/dovecot_connected.inc.php	2017-07-15 23:08:53.622962717 +0200
@@ -0,0 +1,44 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage graphs
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+include_once($config['html_dir']."/includes/graphs/common.inc.php");
+
+$scale_min    = 0;
+$colours      = "mixed";
+$nototal      = (($width < 550) ? 1 : 0);
+$rrd_filename = get_rrd_path($device, "app-dovecot.rrd");
+$array        = array(
+			'num_connected_sess' => array('descr' => 'Connected sessions')
+                     );
+
+$i            = 0;
+$x            = 0;
+
+if (is_file($rrd_filename))
+{
+  $max_colours = count($config['graph_colours'][$colours]);
+  foreach ($array as $ds => $data)
+  {
+    $x = (($x<=$max_colours) ? $x : 0);
+    $rrd_list[$i]['filename'] = $rrd_filename;
+    $rrd_list[$i]['descr']    = $data['descr'];
+    $rrd_list[$i]['ds']       = $ds;
+    $rrd_list[$i]['colour']   = $config['graph_colours'][$colours][$x];
+    $i++;
+    $x++;
+  }
+}
+
+include($config['html_dir']."/includes/graphs/generic_multi.inc.php");
+
+// EOF
diff -Naur ce/html/includes/graphs/application/dovecot_cpu.inc.php new/html/includes/graphs/application/dovecot_cpu.inc.php
--- ce/html/includes/graphs/application/dovecot_cpu.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/html/includes/graphs/application/dovecot_cpu.inc.php	2017-07-15 23:09:10.474986377 +0200
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage graphs
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+include_once($config['html_dir']."/includes/graphs/common.inc.php");
+
+$scale_min    = 0;
+$colours      = "mixed";
+$nototal      = (($width < 550) ? 1 : 0);
+$rrd_filename = get_rrd_path($device, "app-dovecot.rrd");
+$array        = array(
+			'user_cpu' => array('descr' => 'User CPU'),
+			'sys_cpu' => array('descr' => 'System CPU')
+                     );
+
+$i            = 0;
+$x            = 0;
+
+if (is_file($rrd_filename))
+{
+  $max_colours = count($config['graph_colours'][$colours]);
+  foreach ($array as $ds => $data)
+  {
+    $x = (($x<=$max_colours) ? $x : 0);
+    $rrd_list[$i]['filename'] = $rrd_filename;
+    $rrd_list[$i]['descr']    = $data['descr'];
+    $rrd_list[$i]['ds']       = $ds;
+    $rrd_list[$i]['colour']   = $config['graph_colours'][$colours][$x];
+    $i++;
+    $x++;
+  }
+}
+
+include($config['html_dir']."/includes/graphs/generic_multi.inc.php");
+
+// EOF
diff -Naur ce/html/includes/graphs/application/dovecot_io.inc.php new/html/includes/graphs/application/dovecot_io.inc.php
--- ce/html/includes/graphs/application/dovecot_io.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/html/includes/graphs/application/dovecot_io.inc.php	2017-07-15 23:09:55.063048940 +0200
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage graphs
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+include_once($config['html_dir']."/includes/graphs/common.inc.php");
+
+$scale_min    = 0;
+$colours      = "mixed";
+$nototal      = (($width < 550) ? 1 : 0);
+$rrd_filename = get_rrd_path($device, "app-dovecot.rrd");
+$array        = array(
+			'disk_input' => array('descr' => 'Disk Input'),
+			'disk_output' => array('descr' => 'Disk Output'),
+			'read_count' => array('descr' => 'Read Count'),
+			'read_bytes' => array('descr' => 'Read Bytes'),
+			'write_count' => array('descr' => 'Write Count'),
+			'write_bytes' => array('descr' => 'Write Bytes')
+                     );
+
+$i            = 0;
+$x            = 0;
+
+if (is_file($rrd_filename))
+{
+  $max_colours = count($config['graph_colours'][$colours]);
+  foreach ($array as $ds => $data)
+  {
+    $x = (($x<=$max_colours) ? $x : 0);
+    $rrd_list[$i]['filename'] = $rrd_filename;
+    $rrd_list[$i]['descr']    = $data['descr'];
+    $rrd_list[$i]['ds']       = $ds;
+    $rrd_list[$i]['colour']   = $config['graph_colours'][$colours][$x];
+    $i++;
+    $x++;
+  }
+}
+
+include($config['html_dir']."/includes/graphs/generic_multi.inc.php");
+
+// EOF
diff -Naur ce/html/includes/graphs/application/dovecot_pages.inc.php new/html/includes/graphs/application/dovecot_pages.inc.php
--- ce/html/includes/graphs/application/dovecot_pages.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/html/includes/graphs/application/dovecot_pages.inc.php	2017-07-15 23:10:17.243080042 +0200
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage graphs
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+include_once($config['html_dir']."/includes/graphs/common.inc.php");
+
+$scale_min    = 0;
+$colours      = "mixed";
+$nototal      = (($width < 550) ? 1 : 0);
+$rrd_filename = get_rrd_path($device, "app-dovecot.rrd");
+$array        = array(
+			'min_faults' => array('descr' => 'Minor page reclaims'),
+			'maj_faults' => array('descr' => 'Major page reclaims')
+                     );
+
+$i            = 0;
+$x            = 0;
+
+if (is_file($rrd_filename))
+{
+  $max_colours = count($config['graph_colours'][$colours]);
+  foreach ($array as $ds => $data)
+  {
+    $x = (($x<=$max_colours) ? $x : 0);
+    $rrd_list[$i]['filename'] = $rrd_filename;
+    $rrd_list[$i]['descr']    = $data['descr'];
+    $rrd_list[$i]['ds']       = $ds;
+    $rrd_list[$i]['colour']   = $config['graph_colours'][$colours][$x];
+    $i++;
+    $x++;
+  }
+}
+
+include($config['html_dir']."/includes/graphs/generic_multi.inc.php");
+
+// EOF
diff -Naur ce/html/includes/graphs/application/dovecot_storage.inc.php new/html/includes/graphs/application/dovecot_storage.inc.php
--- ce/html/includes/graphs/application/dovecot_storage.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/html/includes/graphs/application/dovecot_storage.inc.php	2017-07-15 23:15:29.315588435 +0200
@@ -0,0 +1,47 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage graphs
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+include_once($config['html_dir']."/includes/graphs/common.inc.php");
+
+$scale_min    = 0;
+$colours      = "mixed";
+$nototal      = (($width < 550) ? 1 : 0);
+$rrd_filename = get_rrd_path($device, "app-dovecot.rrd");
+$array        = array(
+			'mail_lookup_path' => array('descr' => 'open() and stat() calls'),
+			'mail_lookup_attr' => array('descr' => 'stat() and fstat() calls'),
+			'mail_read_count' => array('descr' => 'read() calls for messages'),
+			'mail_read_bytes' => array('descr' => 'message bytes read()')
+                     );
+
+$i            = 0;
+$x            = 0;
+
+if (is_file($rrd_filename))
+{
+  $max_colours = count($config['graph_colours'][$colours]);
+  foreach ($array as $ds => $data)
+  {
+    $x = (($x<=$max_colours) ? $x : 0);
+    $rrd_list[$i]['filename'] = $rrd_filename;
+    $rrd_list[$i]['descr']    = $data['descr'];
+    $rrd_list[$i]['ds']       = $ds;
+    $rrd_list[$i]['colour']   = $config['graph_colours'][$colours][$x];
+    $i++;
+    $x++;
+  }
+}
+
+include($config['html_dir']."/includes/graphs/generic_multi.inc.php");
+
+// EOF
diff -Naur ce/html/includes/graphs/application/dovecot_usage.inc.php new/html/includes/graphs/application/dovecot_usage.inc.php
--- ce/html/includes/graphs/application/dovecot_usage.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/html/includes/graphs/application/dovecot_usage.inc.php	2017-07-15 23:13:03.291319315 +0200
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage graphs
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+include_once($config['html_dir']."/includes/graphs/common.inc.php");
+
+$scale_min    = 0;
+$colours      = "mixed";
+$nototal      = (($width < 550) ? 1 : 0);
+$rrd_filename = get_rrd_path($device, "app-dovecot.rrd");
+$array        = array(
+			'vol_cs' => array('descr' => 'Voluntary Context Switchess'),
+			'invol_cs' => array('descr' => 'Involuntary Context Switches')
+                     );
+
+$i            = 0;
+$x            = 0;
+
+if (is_file($rrd_filename))
+{
+  $max_colours = count($config['graph_colours'][$colours]);
+  foreach ($array as $ds => $data)
+  {
+    $x = (($x<=$max_colours) ? $x : 0);
+    $rrd_list[$i]['filename'] = $rrd_filename;
+    $rrd_list[$i]['descr']    = $data['descr'];
+    $rrd_list[$i]['ds']       = $ds;
+    $rrd_list[$i]['colour']   = $config['graph_colours'][$colours][$x];
+    $i++;
+    $x++;
+  }
+}
+
+include($config['html_dir']."/includes/graphs/generic_multi.inc.php");
+
+// EOF
diff -Naur ce/html/pages/device/apps/dovecot.inc.php new/html/pages/device/apps/dovecot.inc.php
--- ce/html/pages/device/apps/dovecot.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/html/pages/device/apps/dovecot.inc.php	2017-07-15 21:55:24.717920226 +0200
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * Observium Network Management and Monitoring System
+ * Copyright (C) 2006-2015, Adam Armstrong - http://www.observium.org
+ *
+ * @package    observium
+ * @subpackage applications
+ * @author     Adam Armstrong <adama@observium.org>
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+$app_graphs['default'] = array('dovecot_commands' => 'Commands',
+                               'dovecot_connected' => 'Connected sessions',
+                               'dovecot_auth' => 'Auth',
+                               'dovecot_auth_cache' => 'Auth cache hitrate %',
+                               'dovecot_io' => 'IO',
+                               'dovecot_storage' => 'Storage',
+                               'dovecot_cache' => 'Mail cache hits',
+                               'dovecot_usage' => 'Context Switches',
+                               'dovecot_pages' => 'Page Reclaims',
+                               'dovecot_cpu' => 'CPU usage');
+ 
+// EOF
diff -Naur ce/includes/definitions/apps.inc.php new/includes/definitions/apps.inc.php
--- ce/includes/definitions/apps.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/includes/definitions/apps.inc.php	2017-07-15 23:05:44.026695896 +0200
@@ -0,0 +1,3 @@
+<?php
+
+$config['app']['dovecot']['top']            = array('connected');
diff -Naur ce/includes/definitions/rrdtypes.inc.php new/includes/definitions/rrdtypes.inc.php
--- ce/includes/definitions/rrdtypes.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/includes/definitions/rrdtypes.inc.php	2017-07-15 21:32:15.975534111 +0200
@@ -0,0 +1,34 @@
+<?php
+
+$config['rrd_types']['dovecot'] = array(
+  'file'  => 'app-dovecot.rrd',
+  'ds'    => array(
+	  'num_logins' => array('type' => 'COUNTER'),
+	  'num_cmds' => array('type' => 'COUNTER'),
+	  'num_connected_sess' => array('type' => 'GAUGE'),
+	  'auth_successes' => array('type' => 'COUNTER'),
+	  'auth_master_success' => array('type' => 'COUNTER'),
+	  'auth_failures' => array('type' => 'COUNTER'),
+	  'auth_db_tempfails' => array('type' => 'COUNTER'),
+	  'auth_cache_hits' => array('type' => 'COUNTER'),
+	  'auth_cache_misses' => array('type' => 'COUNTER'),
+	  'user_cpu' => array('type' => 'COUNTER'),
+	  'sys_cpu' => array('type' => 'COUNTER'),
+	  'clock_time' => array('type' => 'COUNTER'),
+	  'min_faults' => array('type' => 'COUNTER'),
+	  'maj_faults' => array('type' => 'COUNTER'),
+	  'vol_cs' => array('type' => 'COUNTER'),
+	  'invol_cs' => array('type' => 'COUNTER'),
+	  'disk_input' => array('type' => 'COUNTER'),
+	  'disk_output' => array('type' => 'COUNTER'),
+	  'read_count' => array('type' => 'COUNTER'),
+	  'read_bytes' => array('type' => 'COUNTER'),
+	  'write_count' => array('type' => 'COUNTER'),
+	  'write_bytes' => array('type' => 'COUNTER'),
+	  'mail_lookup_path' => array('type' => 'COUNTER'),
+	  'mail_lookup_attr' => array('type' => 'COUNTER'),
+	  'mail_read_count' => array('type' => 'COUNTER'),
+	  'mail_read_bytes' => array('type' => 'COUNTER'),
+	  'mail_cache_hits' => array('type' => 'COUNTER'),
+  ),
+);
diff -Naur ce/includes/polling/applications/dovecot.inc.php new/includes/polling/applications/dovecot.inc.php
--- ce/includes/polling/applications/dovecot.inc.php	1970-01-01 01:00:00.000000000 +0100
+++ new/includes/polling/applications/dovecot.inc.php	2017-07-15 21:51:48.145715150 +0200
@@ -0,0 +1,81 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage poller
+ * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
+ *
+ */
+
+if (!empty($agent_data['app']['dovecot']))
+{
+  $app_id = discover_app($device, 'dovecot');
+
+  list (,,$num_logins,$num_cmds,$num_connected_sessions,$auth_successes,$auth_master_successes,$auth_failures,$auth_db_tempfails,$auth_cache_hits,$auth_cache_misses,$user_cpu,$sys_cpu,$clock_time,$min_faults,$maj_faults,$vol_cs,$invol_cs,$disk_input,$disk_output,$read_count,$read_bytes,$write_count,$write_bytes,$mail_lookup_path,$mail_lookup_attr,$mail_read_count,$mail_read_bytes,$mail_cache_hits) = explode("\n", $agent_data['app']['dovecot']);
+
+  update_application($app_id, array(
+	  'num_logins' => $num_logins,
+	  'num_cmds' => $num_cmds,
+	  'num_connected_sess' => $num_connected_sessions,
+	  'auth_successes' => $auth_successes,
+	  'auth_master_success' => $auth_master_successes,
+	  'auth_failures' => $auth_failures,
+	  'auth_db_tempfails' => $auth_db_tempfails,
+	  'auth_cache_hits' => $auth_cache_hits,
+	  'auth_cache_misses' => $auth_cache_misses,
+	  'user_cpu' => $user_cpu,
+	  'sys_cpu' => $sys_cpu,
+	  'clock_time' => $clock_time,
+	  'min_faults' => $min_faults,
+	  'maj_faults' => $maj_faults,
+	  'vol_cs' => $vol_cs,
+	  'invol_cs' => $invol_cs,
+	  'disk_input' => $disk_input,
+	  'disk_output' => $disk_output,
+	  'read_count' => $read_count,
+	  'read_bytes' => $read_bytes,
+	  'write_count' => $write_count,
+	  'write_bytes' => $write_bytes,
+	  'mail_lookup_path' => $mail_lookup_path,
+	  'mail_lookup_attr' => $mail_lookup_attr,
+	  'mail_read_count' => $mail_read_count,
+	  'mail_read_bytes' => $mail_read_bytes,
+	  'mail_cache_hits' => $mail_cache_hits
+  ));
+
+  rrdtool_update_ng($device, 'dovecot', array(
+	  'num_logins' => $num_logins,
+	  'num_cmds' => $num_cmds,
+	  'num_connected_sess' => $num_connected_sessions,
+	  'auth_successes' => $auth_successes,
+	  'auth_master_success' => $auth_master_successes,
+	  'auth_failures' => $auth_failures,
+	  'auth_db_tempfails' => $auth_db_tempfails,
+	  'auth_cache_hits' => $auth_cache_hits,
+	  'auth_cache_misses' => $auth_cache_misses,
+	  'user_cpu' => $user_cpu,
+	  'sys_cpu' => $sys_cpu,
+	  'clock_time' => $clock_time,
+	  'min_faults' => $min_faults,
+	  'maj_faults' => $maj_faults,
+	  'vol_cs' => $vol_cs,
+	  'invol_cs' => $invol_cs,
+	  'disk_input' => $disk_input,
+	  'disk_output' => $disk_output,
+	  'read_count' => $read_count,
+	  'read_bytes' => $read_bytes,
+	  'write_count' => $write_count,
+	  'write_bytes' => $write_bytes,
+	  'mail_lookup_path' => $mail_lookup_path,
+	  'mail_lookup_attr' => $mail_lookup_attr,
+	  'mail_read_count' => $mail_read_count,
+	  'mail_read_bytes' => $mail_read_bytes,
+	  'mail_cache_hits' => $mail_cache_hits,
+  ), $app_id);
+}
+
+// EOF
diff -Naur ce/scripts/agent-local/dovecot new/scripts/agent-local/dovecot
--- ce/scripts/agent-local/dovecot	1970-01-01 01:00:00.000000000 +0100
+++ new/scripts/agent-local/dovecot	2017-07-17 15:33:57.617217613 +0200
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+echo '<<<app-dovecot>>>'
+doveadm stats dump global | tail -1 | tr '\t' '\n' | cut -d '.' -f 1
+
