]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
dma: add loggingoption to weblog for mail
authorAlexander Marx <alexander.marx@ipfire.org>
Tue, 25 Aug 2015 12:11:44 +0000 (14:11 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Aug 2015 12:57:03 +0000 (13:57 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/logs.cgi/log.dat

index 1813862fe0eeacc15266f95feb0c0b4ff469f2b5..e8635d7a3b38c150a7d228f978fda649b5ac1f12 100644 (file)
@@ -53,6 +53,7 @@ my %sections = (
         'red' => '(red:|pppd\[.*\]: |chat\[.*\]|pppoe\[.*\]|pptp\[.*\]|pppoa\[.*\]|pppoa3\[.*\]|pppoeci\[.*\]|ipppd|ipppd\[.*\]|kernel: ippp\d|kernel: isdn.*|ibod\[.*\]|dhcpcd\[.*\]|modem_run\[.*\])',
         'ddns' => '(ddns\[\d+\]:)',
         'dns' => '(dnsmasq\[.*\]: )',
+        'dma' => '(dma\[.*\]: )',
         'dhcp' => '(dhcpd: )',
         'clamav' => '(clamd\[.*\]: |freshclam\[.*\]: )',
         'collectd' => '(collectd\[.*\]: )',
@@ -73,6 +74,7 @@ my %trsections = (
         'red' => 'RED',
         'ddns' => $Lang::tr{'dynamic dns'},
         'dns' => 'DNS',
+        'dma' => 'Mail',
         'dhcp' => "$Lang::tr{'dhcp server'}",
         'cron' => 'Cron',
         'collectd' => 'Collectd',
@@ -192,8 +194,10 @@ while ($gzindex >=0 && $loop) {
         # calculate file name
         if ($gzindex == 0) {
             $filestr = "/var/log/messages";
+            $filestr = "/var/log/mail" if (${section} =~ 'dma');
         } else {
             $filestr = "/var/log/messages.$gzindex";
+            $filestr = "/var/log/mail.$gzindex" if (${section} =~ 'dma');
            $filestr = "$filestr.gz" if -f "$filestr.gz";
         }
        # now read file if existing