#!/usr/bin/perl -w # mailgraph -- detailed postfix mail traffic statistics # copyright (c) 2000-2007 ETH Zurich # copyright (c) 2000-2007 David Schweikert # modified 2011 for queuegraph by Ralf Hildebrandt # modified 2015 for mailgraph-ng by Django based on # patches from Sebastian van de Meer # released under the GNU General Public License use RRDs; use POSIX qw(uname); my $VERSION = "1.15"; my $host = (POSIX::uname())[1]; my $scriptname = $ENV{"SCRIPT_NAME"}; my $xpoints = 800; my $points_per_sample = 3; my $ypoints = 160; my $rrd_11 = '/var/lib/mailgraph/mx11/mailgraph.rrd'; my $rrd_12 = '/var/lib/mailgraph/mx12/mailgraph.rrd'; my $rrd_13 = '/var/lib/mailgraph/mx13/mailgraph.rrd'; my $rrd_14 = '/var/lib/mailgraph/mx14/mailgraph.rrd'; my $rrd_virus_11 = '/var/lib/mailgraph/mx11/mailgraph_virus.rrd'; my $rrd_virus_12 = '/var/lib/mailgraph/mx12/mailgraph_virus.rrd'; my $rrd_virus_13 = '/var/lib/mailgraph/mx13/mailgraph_virus.rrd'; my $rrd_virus_14 = '/var/lib/mailgraph/mx14/mailgraph_virus.rrd'; my $rrd_grey_11 = '/var/lib/mailgraph/mx11/mailgraph_grey.rrd'; my $rrd_grey_12 = '/var/lib/mailgraph/mx12/mailgraph_grey.rrd'; my $rrd_grey_13 = '/var/lib/mailgraph/mx13/mailgraph_grey.rrd'; my $rrd_grey_14 = '/var/lib/mailgraph/mx14/mailgraph_grey.rrd'; my $rrd_dane_11 = '/var/lib/mailgraph/mx11/mailgraph_dane.rrd'; my $rrd_dane_12 = '/var/lib/mailgraph/mx12/mailgraph_dane.rrd'; my $rrd_dane_13 = '/var/lib/mailgraph/mx13/mailgraph_dane.rrd'; my $rrd_dane_14 = '/var/lib/mailgraph/mx14/mailgraph_dane.rrd'; my $rrd_dmarc_11 = '/var/lib/mailgraph/mx11/mailgraph_dmarc.rrd'; my $rrd_dmarc_12 = '/var/lib/mailgraph/mx12/mailgraph_dmarc.rrd'; my $rrd_dmarc_13 = '/var/lib/mailgraph/mx13/mailgraph_dmarc.rrd'; my $rrd_dmarc_14 = '/var/lib/mailgraph/mx14/mailgraph_dmarc.rrd'; my $rrd_smtpd_11 = '/var/lib/mailgraph/mx11/mailgraph_smtpd.rrd'; my $rrd_smtpd_12 = '/var/lib/mailgraph/mx12/mailgraph_smtpd.rrd'; my $rrd_smtpd_13 = '/var/lib/mailgraph/mx13/mailgraph_smtpd.rrd'; my $rrd_smtpd_14 = '/var/lib/mailgraph/mx14/mailgraph_smtpd.rrd'; my $rrd_queue_11 = '/var/lib/mailgraph/mx11/mailqueues.rrd'; my $rrd_queue_12 = '/var/lib/mailgraph/mx12/mailqueues.rrd'; my $rrd_queue_13 = '/var/lib/mailgraph/mx13/mailqueues.rrd'; my $rrd_queue_14 = '/var/lib/mailgraph/mx14/mailqueues.rrd'; my $rrd_post_11 = '/var/lib/mailgraph/mx11/mailgraph_post.rrd'; my $rrd_post_12 = '/var/lib/mailgraph/mx12/mailgraph_post.rrd'; my $rrd_post_13 = '/var/lib/mailgraph/mx13/mailgraph_post.rrd'; my $rrd_post_14 = '/var/lib/mailgraph/mx14/mailgraph_post.rrd'; my $tmp_dir = '/var/cache/mailgraph'; my @graphs = ( { title => 'Letzter Tag', seconds => 3600*24, }, { title => 'Letzte Woche', seconds => 3600*24*7, }, { title => 'Letzter Monat', seconds => 3600*24*31, }, { title => 'Letztes Jahr', seconds => 3600*24*365, }, ); my %color = ( # rrggbb in hex # n sent => '000099', received => '009900', bounced => '000000', virus => 'DDBB00', spam => '999999', rejected => 'AA0000', greylisted => 'CCCCCC', delayed => '006400', whitelist => '00D8FF', awl => 'FF7700', early => 'AA0000', pswl => 'E1FFC1', # psbl => 'EBBAD5', passold => 'BAFF70', # veto => 'EBEBD5', pregreet => 'EBA8D5', dnsbl => 'EB75D5', pipelining => 'B85BA7', nonsmtp => '793C6E', barenewline => '793C2E', command => '47231B', hangup => 'C12C0A', passnew => '468700', # new => 'FF77EE', reconnectok => '7700DD', active => 'EFEF00', deferred => 'DD8800', untrustedtls => 'ffebd1', anonymoustls => 'ffcf90', trustedtls => 'ffb24f', verifiedtls => 'ff5800', untrustedtlsin => 'ddd1ff', anonymoustlsin => 'a8a8ff', trustedtlsin => '6767ff', spfnone => '12FF0A', spffail => 'f80b6f', spfpass => '2E5fEC', dkimnone => 'E6E27A', dkimfail => 'FF6600', dkimpass => '3013EC', dmarcnone => 'F0B166', dmarcfail => 'f11717', dmarcpass => '00FFD5', ); my $url = "http://mailgraph-ng.nausch.org/mx/"; my $url1 = "http://mailgraph-ng.nausch.org/mx11/"; my $url2 = "http://mailgraph-ng.nausch.org/mx12/"; my $url3 = "http://mailgraph-ng.nausch.org/mx13/"; my $url4 = "http://mailgraph-ng.nausch.org/mx14/"; my $url11 = "http://mailgraph-ng.nausch.org/mx11/#G"; my $url12 = "http://mailgraph-ng.nausch.org/mx12/#G"; my $url13 = "http://mailgraph-ng.nausch.org/mx13/#G"; my $url14 = "http://mailgraph-ng.nausch.org/mx14/#G"; sub rrd_graph(@) { my ($range, $file, $ypoints, @rrdargs) = @_; my $step = $range*$points_per_sample/$xpoints; my $end = time; $end -= $end % $step; my $date = localtime(time); $date =~ s|:|\\:|g unless $RRDs::VERSION < 1.199908; my ($graphret,$xs,$ys) = RRDs::graph($file, '--imgformat', 'PNG', '--width', $xpoints, '--height', $ypoints, '--start', "-$range", '--end', $end, '--vertical-label', 'msgs/min', '--lower-limit', 0, '--units-exponent', 0, # don't show milli-messages/s '--lazy', '--color', 'SHADEA#ffffff', '--color', 'SHADEB#ffffff', '--color', 'BACK#ffffff', $RRDs::VERSION < 1.2002 ? () : ( '--slope-mode'), @rrdargs, 'COMMENT:['.$date.']\r', ); my $ERR=RRDs::error; die "ERROR: $ERR\n" if $ERR; } sub graph($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:sent_11=$rrd_11:sent:AVERAGE", "DEF:msent_11=$rrd_11:sent:MAX", "DEF:sent_12=$rrd_12:sent:AVERAGE", "DEF:msent_12=$rrd_12:sent:MAX", "DEF:sent_13=$rrd_13:sent:AVERAGE", "DEF:msent_13=$rrd_13:sent:MAX", "DEF:sent_14=$rrd_14:sent:AVERAGE", "DEF:msent_14=$rrd_14:sent:MAX", "CDEF:rsent=sent_11,sent_12,+,sent_13,+,sent_14,+,60,*", "CDEF:rmsent=msent_11,msent_12,+,msent_13,+,msent_14,+,60,*", "CDEF:dsent=sent_11,sent_12,+,sent_13,+,sent_14,+,UN,0,sent_11,sent_12,+,sent_13,+,sent_14,+,IF,$step,*", "CDEF:ssent=PREV,UN,dsent,PREV,IF,dsent,+", "AREA:rsent#$color{sent}:Sent ", 'GPRINT:ssent:MAX:total\: %15.0lf msgs', 'GPRINT:rsent:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmsent:MAX:max\: %11.0lf msgs/min\l', "DEF:recv_11=$rrd_11:recv:AVERAGE", "DEF:mrecv_11=$rrd_11:recv:MAX", "DEF:recv_12=$rrd_12:recv:AVERAGE", "DEF:mrecv_12=$rrd_12:recv:MAX", "DEF:recv_13=$rrd_13:recv:AVERAGE", "DEF:mrecv_13=$rrd_13:recv:MAX", "DEF:recv_14=$rrd_14:recv:AVERAGE", "DEF:mrecv_14=$rrd_14:recv:MAX", "CDEF:rrecv=recv_11,recv_12,+,recv_13,+,recv_14,+,60,*", "CDEF:rmrecv=mrecv_11,mrecv_12,+,mrecv_13,+,mrecv_14,+,60,*", "CDEF:drecv=recv_11,recv_12,+,recv_13,+,recv_14,+,UN,0,recv_11,recv_12,+,recv_13,+,recv_14,+,IF,$step,*", "CDEF:srecv=PREV,UN,drecv,PREV,IF,drecv,+", "LINE2:rrecv#$color{received}:Received ", 'GPRINT:srecv:MAX:total\: %15.0lf msgs', 'GPRINT:rrecv:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmrecv:MAX:max\: %11.0lf msgs/min\l', ); } sub graph_virus($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:rejected_11=$rrd_11:rejected:AVERAGE", "DEF:mrejected_11=$rrd_11:rejected:MAX", "DEF:rejected_12=$rrd_12:rejected:AVERAGE", "DEF:mrejected_12=$rrd_12:rejected:MAX", "DEF:rejected_13=$rrd_13:rejected:AVERAGE", "DEF:mrejected_13=$rrd_13:rejected:MAX", "DEF:rejected_14=$rrd_14:rejected:AVERAGE", "DEF:mrejected_14=$rrd_14:rejected:MAX", "CDEF:rrejected=rejected_11,rejected_12,+,rejected_13,+,rejected_14,+,60,*", "CDEF:drejected=rejected_11,rejected_12,+,rejected_13,+,rejected_14,+,UN,0,rejected_11,rejected_12,+,rejected_13,+,rejected_14,+,IF,$step,*", "CDEF:srejected=PREV,UN,drejected,PREV,IF,drejected,+", "CDEF:rmrejected=mrejected_11,mrejected_12,+,mrejected_13,+,mrejected_14,+,60,*", "AREA:rrejected#$color{rejected}:Rejected/SPAM/Viren ", 'GPRINT:srejected:MAX:total\: %15.0lf msgs', 'GPRINT:rrejected:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmrejected:MAX:max\: %11.0lf msgs/min\l', "DEF:virus_11=$rrd_virus_11:virus:AVERAGE", "DEF:mvirus_11=$rrd_virus_11:virus:MAX", "DEF:virus_12=$rrd_virus_12:virus:AVERAGE", "DEF:mvirus_12=$rrd_virus_12:virus:MAX", "DEF:virus_13=$rrd_virus_13:virus:AVERAGE", "DEF:mvirus_13=$rrd_virus_13:virus:MAX", "DEF:virus_14=$rrd_virus_14:virus:AVERAGE", "DEF:mvirus_14=$rrd_virus_14:virus:MAX", "CDEF:rvirus=virus_11,virus_12,+,virus_13,+,virus_14,+,60,*", "CDEF:dvirus=virus_11,virus_12,+,virus_13,+,virus_14,+,UN,0,virus_11,virus_12,+,virus_13,+,virus_14,+,IF,$step,*", "CDEF:svirus=PREV,UN,dvirus,PREV,IF,dvirus,+", "CDEF:rmvirus=mvirus_11,mvirus_12,+,mvirus_13,+,mvirus_14,+,60,*", "AREA:rvirus#$color{virus}:Viruses ", 'GPRINT:svirus:MAX:total\: %15.0lf msgs', 'GPRINT:rvirus:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmvirus:MAX:max\: %11.0lf msgs/min\l', "DEF:spam_11=$rrd_virus_11:spam:AVERAGE", "DEF:mspam_11=$rrd_virus_11:spam:MAX", "DEF:spam_12=$rrd_virus_12:spam:AVERAGE", "DEF:mspam_12=$rrd_virus_12:spam:MAX", "DEF:spam_13=$rrd_virus_13:spam:AVERAGE", "DEF:mspam_13=$rrd_virus_13:spam:MAX", "DEF:spam_14=$rrd_virus_14:spam:AVERAGE", "DEF:mspam_14=$rrd_virus_14:spam:MAX", "CDEF:rspam=spam_11,spam_12,+,spam_13,+,spam_14,+,60,*", "CDEF:dspam=spam_11,spam_12,+,spam_13,+,spam_14,+,UN,0,spam_11,spam_12,+,spam_13,+,spam_14,+,IF,$step,*", "CDEF:sspam=PREV,UN,dspam,PREV,IF,dspam,+", "CDEF:rmspam=mspam_11,mspam_12,+,mspam_13,+,mspam_14,+,60,*", "STACK:rspam#$color{spam}:Spam ", 'GPRINT:sspam:MAX:total\: %15.0lf msgs', 'GPRINT:rspam:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmspam:MAX:max\: %11.0lf msgs/min\l', "DEF:bounced=$rrd:bounced:AVERAGE", "DEF:mbounced=$rrd:bounced:MAX", "DEF:bounced_11=$rrd_11:bounced:AVERAGE", "DEF:mbounced_11=$rrd_11:bounced:MAX", "DEF:bounced_12=$rrd_12:bounced:AVERAGE", "DEF:mbounced_12=$rrd_12:bounced:MAX", "DEF:bounced_13=$rrd_13:bounced:AVERAGE", "DEF:mbounced_13=$rrd_13:bounced:MAX", "DEF:bounced_14=$rrd_14:bounced:AVERAGE", "DEF:mbounced_14=$rrd_14:bounced:MAX", "CDEF:rbounced=bounced_11,bounced_12,+,bounced_13,+,bounced_14,+,60,*", "CDEF:dbounced=bounced_11,bounced_12,+,bounced_13,+,bounced_14,+,UN,0,bounced_11,bounced_12,+,bounced_13,+,bounced_14,+,IF,$step,*", "CDEF:sbounced=PREV,UN,dbounced,PREV,IF,dbounced,+", "CDEF:rmbounced=mbounced_11,mbounced_12,+,mbounced_13,+,mbounced_14,+,60,*", "LINE2:rbounced#$color{bounced}:Bounced ", 'GPRINT:sbounced:MAX:total\: %15.0lf msgs', 'GPRINT:rbounced:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmbounced:MAX:max\: %11.0lf msgs/min\l', ); } sub graph_greylist($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:new_11=$rrd_grey_11:new:AVERAGE", "DEF:mnew_11=$rrd_grey_11:new:MAX", "DEF:new_12=$rrd_grey_12:new:AVERAGE", "DEF:mnew_12=$rrd_grey_12:new:MAX", "DEF:new_13=$rrd_grey_13:new:AVERAGE", "DEF:mnew_13=$rrd_grey_13:new:MAX", "DEF:new_14=$rrd_grey_14:new:AVERAGE", "DEF:mnew_14=$rrd_grey_14:new:MAX", "CDEF:rnew=new_11,new_12,+,new_13,+,new_14,+,60,*", "CDEF:rmnew=mnew_11,mnew_12,+,mnew_13,+,mnew_14,+,60,*", "CDEF:dnew=new_11,new_12,+,new_13,+,new_14,+,UN,0,new_11,new_12,+,new_13,+,new_14,+,IF,$step,*", "CDEF:snew=PREV,UN,dnew,PREV,IF,dnew,+", "AREA:rnew#$color{new}:New ", 'GPRINT:snew:MAX:total\: %15.0lf msgs', 'GPRINT:rnew:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmnew:MAX:max\: %11.0lf msgs/min\l', "DEF:reconnectok_11=$rrd_grey_11:reconnectok:AVERAGE", "DEF:mreconnectok_11=$rrd_grey_11:reconnectok:MAX", "DEF:reconnectok_12=$rrd_grey_12:reconnectok:AVERAGE", "DEF:mreconnectok_12=$rrd_grey_12:reconnectok:MAX", "DEF:reconnectok_13=$rrd_grey_13:reconnectok:AVERAGE", "DEF:mreconnectok_13=$rrd_grey_13:reconnectok:MAX", "DEF:reconnectok_14=$rrd_grey_14:reconnectok:AVERAGE", "DEF:mreconnectok_14=$rrd_grey_14:reconnectok:MAX", "CDEF:rreconnectok=reconnectok_11,reconnectok_12,+,reconnectok_13,+,reconnectok_14,+,60,*", "CDEF:dreconnectok=reconnectok_11,reconnectok_12,+,reconnectok_13,+,reconnectok_14,+,UN,0,reconnectok_11,reconnectok_12,+,reconnectok_13,+,reconnectok_14,+,IF,$step,*", "CDEF:sreconnectok=PREV,UN,dreconnectok,PREV,IF,dreconnectok,+", "CDEF:rmreconnectok=mreconnectok_11,mreconnectok_12,+,mreconnectok_13,+,mreconnectok_14,+,60,*", "LINE2:rreconnectok#$color{reconnectok}:Reconnect O.K. ", 'GPRINT:sreconnectok:MAX:total\: %15.0lf msgs', 'GPRINT:rreconnectok:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmreconnectok:MAX:max\: %11.0lf msgs/min\l', ); } sub graph_greystats($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:greylisted_11=$rrd_grey_11:greylisted:AVERAGE", "DEF:mgreylisted_11=$rrd_grey_11:greylisted:MAX", "DEF:greylisted_12=$rrd_grey_12:greylisted:AVERAGE", "DEF:mgreylisted_12=$rrd_grey_12:greylisted:MAX", "DEF:greylisted_13=$rrd_grey_13:greylisted:AVERAGE", "DEF:mgreylisted_13=$rrd_grey_13:greylisted:MAX", "DEF:greylisted_14=$rrd_grey_14:greylisted:AVERAGE", "DEF:mgreylisted_14=$rrd_grey_14:greylisted:MAX", "CDEF:rgreylisted=greylisted_11,greylisted_12,+,greylisted_13,+,greylisted_14,+,60,*", "CDEF:rmgreylisted=mgreylisted_11,mgreylisted_12,+,mgreylisted_13,+,mgreylisted_14,+,60,*", "CDEF:dgreylisted=greylisted_11,greylisted_12,+,greylisted_13,+,greylisted_14,+,UN,0,greylisted_11,greylisted_12,+,greylisted_13,+,greylisted_14,+,IF,$step,*", "CDEF:sgreylisted=PREV,UN,dgreylisted,PREV,IF,dgreylisted,+", "AREA:rgreylisted#$color{greylisted}:Greylisted ", 'GPRINT:sgreylisted:MAX:total\: %15.0lf msgs', 'GPRINT:rgreylisted:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmgreylisted:MAX:max\: %11.0lf msgs/min\l', "DEF:delayed_11=$rrd_grey_11:delayed:AVERAGE", "DEF:mdelayed_11=$rrd_grey_11:delayed:MAX", "DEF:delayed_12=$rrd_grey_12:delayed:AVERAGE", "DEF:mdelayed_12=$rrd_grey_12:delayed:MAX", "DEF:delayed_13=$rrd_grey_13:delayed:AVERAGE", "DEF:mdelayed_13=$rrd_grey_13:delayed:MAX", "DEF:delayed_14=$rrd_grey_14:delayed:AVERAGE", "DEF:mdelayed_14=$rrd_grey_14:delayed:MAX", "CDEF:rdelayed=delayed_11,delayed_12,+,delayed_13,+,delayed_14,+,60,*", "CDEF:rmdelayed=mdelayed_11,mdelayed_12,+,mdelayed_13,+,mdelayed_14,+,60,*", "CDEF:ddelayed=delayed_11,delayed_12,+,delayed_13,+,delayed_14,+,UN,0,delayed_11,delayed_12,+,delayed_13,+,delayed_14,+,IF,$step,*", "CDEF:sdelayed=PREV,UN,ddelayed,PREV,IF,ddelayed,+", "LINE2:rdelayed#$color{delayed}:Delayed ", 'GPRINT:sdelayed:MAX:total\: %15.0lf msgs', 'GPRINT:rdelayed:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmdelayed:MAX:max\: %11.0lf msgs/min\l', "DEF:whitelist_11=$rrd_grey_11:whitelist:AVERAGE", "DEF:mwhitelist_11=$rrd_grey_11:whitelist:MAX", "DEF:whitelist_12=$rrd_grey_12:whitelist:AVERAGE", "DEF:mwhitelist_12=$rrd_grey_12:whitelist:MAX", "DEF:whitelist_13=$rrd_grey_13:whitelist:AVERAGE", "DEF:mwhitelist_13=$rrd_grey_13:whitelist:MAX", "DEF:whitelist_14=$rrd_grey_14:whitelist:AVERAGE", "DEF:mwhitelist_14=$rrd_grey_14:whitelist:MAX", "CDEF:rwhitelist=whitelist_11,whitelist_12,+,whitelist_13,+,whitelist_14,+,60,*", "CDEF:rmwhitelist=mwhitelist_11,mwhitelist_12,+,mwhitelist_13,+,mwhitelist_14,+,60,*", "CDEF:dwhitelist=whitelist_11,whitelist_12,+,whitelist_13,+,whitelist_14,+,UN,0,whitelist_11,whitelist_12,+,whitelist_13,+,whitelist_14,+,IF,$step,*", "CDEF:swhitelist=PREV,UN,dwhitelist,PREV,IF,dwhitelist,+", "AREA:rwhitelist#$color{whitelist}:Whitelist ", 'GPRINT:swhitelist:MAX:total\: %15.0lf msgs', 'GPRINT:rwhitelist:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmwhitelist:MAX:max\: %11.0lf msgs/min\l', "DEF:awl_11=$rrd_grey_11:awl:AVERAGE", "DEF:mawl_11=$rrd_grey_11:awl:MAX", "DEF:awl_12=$rrd_grey_12:awl:AVERAGE", "DEF:mawl_12=$rrd_grey_12:awl:MAX", "DEF:awl_13=$rrd_grey_13:awl:AVERAGE", "DEF:mawl_13=$rrd_grey_13:awl:MAX", "DEF:awl_14=$rrd_grey_14:awl:AVERAGE", "DEF:mawl_14=$rrd_grey_14:awl:MAX", "CDEF:rawl=awl_11,awl_12,+,awl_13,+,awl_14,+,60,*", "CDEF:dawl=awl_11,awl_12,+,awl_13,+,awl_14,+,UN,0,awl_11,awl_12,+,awl_13,+,awl_14,+,IF,$step,*", "CDEF:sawl=PREV,UN,dawl,PREV,IF,dawl,+", "CDEF:rmawl=mawl_11,mawl_12,+,mawl_13,+,mawl_14,+,60,*", "LINE2:rawl#$color{awl}:Auto whitelist ", 'GPRINT:sawl:MAX:total\: %15.0lf msgs', 'GPRINT:rawl:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmawl:MAX:max\: %11.0lf msgs/min\l', "DEF:early_11=$rrd_grey_11:early:AVERAGE", "DEF:mearly_11=$rrd_grey_11:early:MAX", "DEF:early_12=$rrd_grey_12:early:AVERAGE", "DEF:mearly_12=$rrd_grey_12:early:MAX", "DEF:early_13=$rrd_grey_13:early:AVERAGE", "DEF:mearly_13=$rrd_grey_13:early:MAX", "DEF:early_14=$rrd_grey_14:early:AVERAGE", "DEF:mearly_14=$rrd_grey_14:early:MAX", "CDEF:rearly=early_11,early_12,+,early_13,+,early_14,+,60,*", "CDEF:rmearly=mearly_11,mearly_12,+,mearly_13,+,mearly_14,+,60,*", "CDEF:dearly=early_11,early_12,+,early_13,+,early_14,+,UN,0,early_11,early_12,+,early_13,+,early_14,+,IF,$step,*", "CDEF:searly=PREV,UN,dearly,PREV,IF,dearly,+", "AREA:rearly#$color{early}:Early connect ", 'GPRINT:searly:MAX:total\: %15.0lf msgs', 'GPRINT:rearly:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmearly:MAX:max\: %11.0lf msgs/min\l', ); } sub graph_postscreen($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:pswl_11=$rrd_post_11:pswl:AVERAGE", "DEF:mpswl_11=$rrd_post_11:pswl:MAX", "DEF:pswl_12=$rrd_post_12:pswl:AVERAGE", "DEF:mpswl_12=$rrd_post_12:pswl:MAX", "DEF:pswl_13=$rrd_post_13:pswl:AVERAGE", "DEF:mpswl_13=$rrd_post_13:pswl:MAX", "DEF:pswl_14=$rrd_post_14:pswl:AVERAGE", "DEF:mpswl_14=$rrd_post_14:pswl:MAX", "CDEF:rpswl=pswl_11,pswl_12,+,pswl_13,+,pswl_14,+,60,*", "CDEF:rmpswl=mpswl_11,mpswl_12,+,mpswl_13,+,mpswl_14,+,60,*", "CDEF:dpswl=pswl_11,pswl_12,+,pswl_13,+,pswl_14,+,UN,0,pswl_11,pswl_12,+,pswl_13,+,pswl_14,+,IF,$step,*", "CDEF:spswl=PREV,UN,dpswl,PREV,IF,dpswl,+", "AREA:rpswl#$color{pswl}:WHITELISTED ", 'GPRINT:spswl:MAX:total\: %15.0lf msgs', 'GPRINT:rpswl:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmpswl:MAX:max\: %11.0lf msgs/min\l', "DEF:passold_11=$rrd_post_11:passold:AVERAGE", "DEF:mpassold_11=$rrd_post_11:passold:MAX", "DEF:passold_12=$rrd_post_12:passold:AVERAGE", "DEF:mpassold_12=$rrd_post_12:passold:MAX", "DEF:passold_13=$rrd_post_13:passold:AVERAGE", "DEF:mpassold_13=$rrd_post_13:passold:MAX", "DEF:passold_14=$rrd_post_14:passold:AVERAGE", "DEF:mpassold_14=$rrd_post_14:passold:MAX", "CDEF:rpassold=passold_11,passold_12,+,passold_13,+,passold_14,+,60,*", "CDEF:dpassold=passold_11,passold_12,+,passold_13,+,passold_14,+,UN,0,passold_11,passold_12,+,passold_13,+,passold_14,+,IF,$step,*", "CDEF:spassold=PREV,UN,dpassold,PREV,IF,dpassold,+", "CDEF:rmpassold=mpassold_11,mpassold_12,+,mpassold_13,+,mpassold_14,+,60,*", "STACK:rpassold#$color{passold}:PASS OLD ", 'GPRINT:spassold:MAX:total\: %15.0lf msgs', 'GPRINT:rpassold:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmpassold:MAX:max\: %11.0lf msgs/min\l', "DEF:passnew_11=$rrd_post_11:passnew:AVERAGE", "DEF:mpassnew_11=$rrd_post_11:passnew:MAX", "DEF:passnew_12=$rrd_post_12:passnew:AVERAGE", "DEF:mpassnew_12=$rrd_post_12:passnew:MAX", "DEF:passnew_13=$rrd_post_13:passnew:AVERAGE", "DEF:mpassnew_13=$rrd_post_13:passnew:MAX", "DEF:passnew_14=$rrd_post_14:passnew:AVERAGE", "DEF:mpassnew_14=$rrd_post_14:passnew:MAX", "CDEF:rpassnew=passnew_11,passnew_12,+,passnew_13,+,passnew_14,+,60,*", "CDEF:dpassnew=passnew_11,passnew_12,+,passnew_13,+,passnew_14,+,UN,0,passnew_11,passnew_12,+,passnew_13,+,passnew_14,+,IF,$step,*", "CDEF:spassnew=PREV,UN,dpassnew,PREV,IF,dpassnew,+", "CDEF:rmpassnew=mpassnew_11,mpassnew_12,+,mpassnew_13,+,mpassnew_14,+,60,*", "LINE2:rpassnew#$color{passnew}:PASS NEW ", 'GPRINT:spassnew:MAX:total\: %15.0lf msgs', 'GPRINT:rpassnew:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmpassnew:MAX:max\: %11.0lf msgs/min\l', ); } sub graph_postscreenstats($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:psbl_11=$rrd_post_11:psbl:AVERAGE", "DEF:mpsbl_11=$rrd_post_11:psbl:MAX", "DEF:psbl_12=$rrd_post_12:psbl:AVERAGE", "DEF:mpsbl_12=$rrd_post_12:psbl:MAX", "DEF:psbl_13=$rrd_post_13:psbl:AVERAGE", "DEF:mpsbl_13=$rrd_post_13:psbl:MAX", "DEF:psbl_14=$rrd_post_14:psbl:AVERAGE", "DEF:mpsbl_14=$rrd_post_14:psbl:MAX", "CDEF:rpsbl=psbl_11,psbl_12,+,psbl_13,+,psbl_14,+,60,*", "CDEF:dpsbl=psbl_11,psbl_12,+,psbl_13,+,psbl_14,+,UN,0,psbl_11,psbl_12,+,psbl_13,+,psbl_14,+,IF,$step,*", "CDEF:spsbl=PREV,UN,dpsbl,PREV,IF,dpsbl,+", "CDEF:rmpsbl=mpsbl_11,mpsbl_12,+,mpsbl_13,+,mpsbl_14,+,60,*", "AREA:rpsbl#$color{psbl}:BLACKLISTED ", 'GPRINT:spsbl:MAX:total\: %15.0lf msgs', 'GPRINT:rpsbl:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmpsbl:MAX:max\: %11.0lf msgs/min\l', "DEF:veto_11=$rrd_post_11:veto:AVERAGE", "DEF:mveto_11=$rrd_post_11:veto:MAX", "DEF:veto_12=$rrd_post_12:veto:AVERAGE", "DEF:mveto_12=$rrd_post_12:veto:MAX", "DEF:veto_13=$rrd_post_13:veto:AVERAGE", "DEF:mveto_13=$rrd_post_13:veto:MAX", "DEF:veto_14=$rrd_post_14:veto:AVERAGE", "DEF:mveto_14=$rrd_post_14:veto:MAX", "CDEF:rveto=veto_11,veto_12,+,veto_13,+,veto_14,+,60,*", "CDEF:dveto=veto_11,veto_12,+,veto_13,+,veto_14,+,UN,0,veto_11,veto_12,+,veto_13,+,veto_14,+,IF,$step,*", "CDEF:sveto=PREV,UN,dveto,PREV,IF,dveto,+", "CDEF:rmveto=mveto_11,mveto_12,+,mveto_13,+,mveto_14,+,60,*", "STACK:rveto#$color{veto}:WHITELIST VETO ", 'GPRINT:sveto:MAX:total\: %15.0lf msgs', 'GPRINT:rveto:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmveto:MAX:max\: %11.0lf msgs/min\l', "DEF:pregreet_11=$rrd_post_11:pregreet:AVERAGE", "DEF:mpregreet_11=$rrd_post_11:pregreet:MAX", "DEF:pregreet_12=$rrd_post_12:pregreet:AVERAGE", "DEF:mpregreet_12=$rrd_post_12:pregreet:MAX", "DEF:pregreet_13=$rrd_post_13:pregreet:AVERAGE", "DEF:mpregreet_13=$rrd_post_13:pregreet:MAX", "DEF:pregreet_14=$rrd_post_14:pregreet:AVERAGE", "DEF:mpregreet_14=$rrd_post_14:pregreet:MAX", "CDEF:rpregreet=pregreet_11,pregreet_12,+,pregreet_13,+,pregreet_14,+,60,*", "CDEF:dpregreet=pregreet_11,pregreet_12,+,pregreet_13,+,pregreet_14,+,UN,0,pregreet_11,pregreet_12,+,pregreet_13,+,pregreet_14,+,IF,$step,*", "CDEF:spregreet=PREV,UN,dpregreet,PREV,IF,dpregreet,+", "CDEF:rmpregreet=mpregreet_11,mpregreet_12,+,mpregreet_13,+,mpregreet_14,+,60,*", "STACK:rpregreet#$color{pregreet}:PREGREET ", 'GPRINT:spregreet:MAX:total\: %15.0lf msgs', 'GPRINT:rpregreet:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmpregreet:MAX:max\: %11.0lf msgs/min\l', "DEF:dnsbl_11=$rrd_post_11:dnsbl:AVERAGE", "DEF:mdnsbl_11=$rrd_post_11:dnsbl:MAX", "DEF:dnsbl_12=$rrd_post_12:dnsbl:AVERAGE", "DEF:mdnsbl_12=$rrd_post_12:dnsbl:MAX", "DEF:dnsbl_13=$rrd_post_13:dnsbl:AVERAGE", "DEF:mdnsbl_13=$rrd_post_13:dnsbl:MAX", "DEF:dnsbl_14=$rrd_post_14:dnsbl:AVERAGE", "DEF:mdnsbl_14=$rrd_post_14:dnsbl:MAX", "CDEF:rdnsbl=dnsbl_11,dnsbl_12,+,dnsbl_13,+,dnsbl_14,+,60,*", "CDEF:ddnsbl=dnsbl_11,dnsbl_12,+,dnsbl_13,+,dnsbl_14,+,UN,0,dnsbl_11,dnsbl_12,+,dnsbl_13,+,dnsbl_14,+,IF,$step,*", "CDEF:sdnsbl=PREV,UN,ddnsbl,PREV,IF,ddnsbl,+", "CDEF:rmdnsbl=mdnsbl_11,mdnsbl_12,+,mdnsbl_13,+,mdnsbl_14,+,60,*", "STACK:rdnsbl#$color{dnsbl}:DNSBL ", 'GPRINT:sdnsbl:MAX:total\: %15.0lf msgs', 'GPRINT:rdnsbl:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmdnsbl:MAX:max\: %11.0lf msgs/min\l', "DEF:pipelining_11=$rrd_post_11:pipelining:AVERAGE", "DEF:mpipelining_11=$rrd_post_11:pipelining:MAX", "DEF:pipelining_12=$rrd_post_12:pipelining:AVERAGE", "DEF:mpipelining_12=$rrd_post_12:pipelining:MAX", "DEF:pipelining_13=$rrd_post_13:pipelining:AVERAGE", "DEF:mpipelining_13=$rrd_post_13:pipelining:MAX", "DEF:pipelining_14=$rrd_post_14:pipelining:AVERAGE", "DEF:mpipelining_14=$rrd_post_14:pipelining:MAX", "CDEF:rpipelining=pipelining_11,pipelining_12,+,pipelining_13,+,pipelining_14,+,60,*", "CDEF:dpipelining=pipelining_11,pipelining_12,+,pipelining_13,+,pipelining_14,+,UN,0,pipelining_11,pipelining_12,+,pipelining_13,+,pipelining_14,+,IF,$step,*", "CDEF:spipelining=PREV,UN,dpipelining,PREV,IF,dpipelining,+", "CDEF:rmpipelining=mpipelining_11,mpipelining_12,+,mpipelining_13,+,mpipelining_14,+,60,*", "STACK:rpipelining#$color{pipelining}:PIPELINING ", 'GPRINT:spipelining:MAX:total\: %15.0lf msgs', 'GPRINT:rpipelining:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmpipelining:MAX:max\: %11.0lf msgs/min\l', "DEF:nonsmtp_11=$rrd_post_11:nonsmtp:AVERAGE", "DEF:mnonsmtp_11=$rrd_post_11:nonsmtp:MAX", "DEF:nonsmtp_12=$rrd_post_12:nonsmtp:AVERAGE", "DEF:mnonsmtp_12=$rrd_post_12:nonsmtp:MAX", "DEF:nonsmtp_13=$rrd_post_13:nonsmtp:AVERAGE", "DEF:mnonsmtp_13=$rrd_post_13:nonsmtp:MAX", "DEF:nonsmtp_14=$rrd_post_14:nonsmtp:AVERAGE", "DEF:mnonsmtp_14=$rrd_post_14:nonsmtp:MAX", "CDEF:rnonsmtp=nonsmtp_11,nonsmtp_12,+,nonsmtp_13,+,nonsmtp_14,+,60,*", "CDEF:dnonsmtp=nonsmtp_11,nonsmtp_12,+,nonsmtp_13,+,nonsmtp_14,+,UN,0,nonsmtp_11,nonsmtp_12,+,nonsmtp_13,+,nonsmtp_14,+,IF,$step,*", "CDEF:snonsmtp=PREV,UN,dnonsmtp,PREV,IF,dnonsmtp,+", "CDEF:rmnonsmtp=mnonsmtp_11,mnonsmtp_12,+,mnonsmtp_13,+,mnonsmtp_14,+,60,*", "STACK:rnonsmtp#$color{nonsmtp}:NON SMTP COMMAND ", 'GPRINT:snonsmtp:MAX:total\: %15.0lf msgs', 'GPRINT:rnonsmtp:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmnonsmtp:MAX:max\: %11.0lf msgs/min\l', "DEF:barenewline_11=$rrd_post_11:barenewline:AVERAGE", "DEF:mbarenewline_11=$rrd_post_11:barenewline:MAX", "DEF:barenewline_12=$rrd_post_12:barenewline:AVERAGE", "DEF:mbarenewline_12=$rrd_post_12:barenewline:MAX", "DEF:barenewline_13=$rrd_post_13:barenewline:AVERAGE", "DEF:mbarenewline_13=$rrd_post_13:barenewline:MAX", "DEF:barenewline_14=$rrd_post_14:barenewline:AVERAGE", "DEF:mbarenewline_14=$rrd_post_14:barenewline:MAX", "CDEF:rbarenewline=barenewline_11,barenewline_12,+,barenewline_13,+,barenewline_14,+,60,*", "CDEF:dbarenewline=barenewline_11,barenewline_12,+,barenewline_13,+,barenewline_14,+,UN,0,barenewline_11,barenewline_12,+,barenewline_13,+,barenewline_14,+,IF,$step,*", "CDEF:sbarenewline=PREV,UN,dbarenewline,PREV,IF,dbarenewline,+", "CDEF:rmbarenewline=mbarenewline_11,mbarenewline_12,+,mbarenewline_13,+,mbarenewline_14,+,60,*", "STACK:rbarenewline#$color{barenewline}:BARE NEWLINE ", 'GPRINT:sbarenewline:MAX:total\: %15.0lf msgs', 'GPRINT:rbarenewline:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmbarenewline:MAX:max\: %11.0lf msgs/min\l', "DEF:command_11=$rrd_post_11:command:AVERAGE", "DEF:mcommand_11=$rrd_post_11:command:MAX", "DEF:command_12=$rrd_post_12:command:AVERAGE", "DEF:mcommand_12=$rrd_post_12:command:MAX", "DEF:command_13=$rrd_post_13:command:AVERAGE", "DEF:mcommand_13=$rrd_post_13:command:MAX", "DEF:command_14=$rrd_post_14:command:AVERAGE", "DEF:mcommand_14=$rrd_post_14:command:MAX", "CDEF:rcommand=command_11,command_12,+,command_13,+,command_14,+,60,*", "CDEF:dcommand=command_11,command_12,+,command_13,+,command_14,+,UN,0,command_11,command_12,+,command_13,+,command_14,+,IF,$step,*", "CDEF:scommand=PREV,UN,dcommand,PREV,IF,dcommand,+", "CDEF:rmcommand=mcommand_11,mcommand_12,+,mcommand_13,+,mcommand_14,+,60,*", "STACK:rcommand#$color{command}:COMMAND LIMITS ", 'GPRINT:scommand:MAX:total\: %15.0lf msgs', 'GPRINT:rcommand:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmcommand:MAX:max\: %11.0lf msgs/min\l', "DEF:hangup_11=$rrd_post_11:hangup:AVERAGE", "DEF:mhangup_11=$rrd_post_11:hangup:MAX", "DEF:hangup_12=$rrd_post_12:hangup:AVERAGE", "DEF:mhangup_12=$rrd_post_12:hangup:MAX", "DEF:hangup_13=$rrd_post_13:hangup:AVERAGE", "DEF:mhangup_13=$rrd_post_13:hangup:MAX", "DEF:hangup_14=$rrd_post_14:hangup:AVERAGE", "DEF:mhangup_14=$rrd_post_14:hangup:MAX", "CDEF:rhangup=hangup_11,hangup_12,+,hangup_13,+,hangup_14,+,60,*", "CDEF:dhangup=hangup_11,hangup_12,+,hangup_13,+,hangup_14,+,UN,0,hangup_11,hangup_12,+,hangup_13,+,hangup_14,+,IF,$step,*", "CDEF:shangup=PREV,UN,dhangup,PREV,IF,dhangup,+", "CDEF:rmhangup=mhangup_11,mhangup_12,+,mhangup_13,+,mhangup_14,+,60,*", "STACK:rhangup#$color{hangup}:HUNGUP ", 'GPRINT:shangup:MAX:total\: %15.0lf msgs', 'GPRINT:rhangup:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmhangup:MAX:max\: %11.0lf msgs/min\l', ); } sub graph_dane($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:untrustedtls_11=$rrd_dane_11:untrustedtls:AVERAGE", "DEF:muntrustedtls_11=$rrd_dane_11:untrustedtls:MAX", "DEF:untrustedtls_12=$rrd_dane_12:untrustedtls:AVERAGE", "DEF:muntrustedtls_12=$rrd_dane_12:untrustedtls:MAX", "DEF:untrustedtls_13=$rrd_dane_13:untrustedtls:AVERAGE", "DEF:muntrustedtls_13=$rrd_dane_13:untrustedtls:MAX", "DEF:untrustedtls_14=$rrd_dane_14:untrustedtls:AVERAGE", "DEF:muntrustedtls_14=$rrd_dane_14:untrustedtls:MAX", "CDEF:runtrustedtls=untrustedtls_11,untrustedtls_12,+,untrustedtls_13,+,untrustedtls_14,+,60,*", "CDEF:duntrustedtls=untrustedtls_11,untrustedtls_12,+,untrustedtls_13,+,untrustedtls_14,+,UN,0,untrustedtls_11,untrustedtls_12,+,untrustedtls_13,+,untrustedtls_14,+,IF,$step,*", "CDEF:suntrustedtls=PREV,UN,duntrustedtls,PREV,IF,duntrustedtls,+", "CDEF:rmuntrustedtls=muntrustedtls_11,muntrustedtls_12,+,muntrustedtls_13,+,muntrustedtls_14,+,60,*", "AREA:runtrustedtls#$color{untrustedtls}:Out Untrusted TLS ", 'GPRINT:suntrustedtls:MAX:total\: %15.0lf msgs', 'GPRINT:runtrustedtls:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmuntrustedtls:MAX:max\: %11.0lf msgs/min\l', "DEF:anonymoustls_11=$rrd_dane_11:anonymoustls:AVERAGE", "DEF:manonymoustls_11=$rrd_dane_11:anonymoustls:MAX", "DEF:anonymoustls_12=$rrd_dane_12:anonymoustls:AVERAGE", "DEF:manonymoustls_12=$rrd_dane_12:anonymoustls:MAX", "DEF:anonymoustls_13=$rrd_dane_13:anonymoustls:AVERAGE", "DEF:manonymoustls_13=$rrd_dane_13:anonymoustls:MAX", "DEF:anonymoustls_14=$rrd_dane_14:anonymoustls:AVERAGE", "DEF:manonymoustls_14=$rrd_dane_14:anonymoustls:MAX", "CDEF:ranonymoustls=anonymoustls_11,anonymoustls_12,+,anonymoustls_13,+,anonymoustls_14,+,60,*", "CDEF:danonymoustls=anonymoustls_11,anonymoustls_12,+,anonymoustls_13,+,anonymoustls_14,+,UN,0,anonymoustls_11,anonymoustls_12,+,anonymoustls_13,+,anonymoustls_14,+,IF,$step,*", "CDEF:sanonymoustls=PREV,UN,danonymoustls,PREV,IF,danonymoustls,+", "CDEF:rmanonymoustls=manonymoustls_11,manonymoustls_12,+,manonymoustls_13,+,manonymoustls_14,+,60,*", "STACK:ranonymoustls#$color{anonymoustls}:Out Anonymous TLS ", 'GPRINT:sanonymoustls:MAX:total\: %15.0lf msgs', 'GPRINT:ranonymoustls:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmanonymoustls:MAX:max\: %11.0lf msgs/min\l', "DEF:trustedtls_11=$rrd_dane_11:trustedtls:AVERAGE", "DEF:mtrustedtls_11=$rrd_dane_11:trustedtls:MAX", "DEF:trustedtls_12=$rrd_dane_12:trustedtls:AVERAGE", "DEF:mtrustedtls_12=$rrd_dane_12:trustedtls:MAX", "DEF:trustedtls_13=$rrd_dane_13:trustedtls:AVERAGE", "DEF:mtrustedtls_13=$rrd_dane_13:trustedtls:MAX", "DEF:trustedtls_14=$rrd_dane_14:trustedtls:AVERAGE", "DEF:mtrustedtls_14=$rrd_dane_14:trustedtls:MAX", "CDEF:rtrustedtls=trustedtls_11,trustedtls_12,+,trustedtls_13,+,trustedtls_14,+,60,*", "CDEF:dtrustedtls=trustedtls_11,trustedtls_12,+,trustedtls_13,+,trustedtls_14,+,UN,0,trustedtls_11,trustedtls_12,+,trustedtls_13,+,trustedtls_14,+,IF,$step,*", "CDEF:strustedtls=PREV,UN,dtrustedtls,PREV,IF,dtrustedtls,+", "CDEF:rmtrustedtls=mtrustedtls_11,mtrustedtls_12,+,mtrustedtls_13,+,mtrustedtls_14,+,60,*", "STACK:rtrustedtls#$color{trustedtls}:Out Trusted TLS ", 'GPRINT:strustedtls:MAX:total\: %15.0lf msgs', 'GPRINT:rtrustedtls:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmtrustedtls:MAX:max\: %11.0lf msgs/min\l', "DEF:verifiedtls_11=$rrd_dane_11:verifiedtls:AVERAGE", "DEF:mverifiedtls_11=$rrd_dane_11:verifiedtls:MAX", "DEF:verifiedtls_12=$rrd_dane_12:verifiedtls:AVERAGE", "DEF:mverifiedtls_12=$rrd_dane_12:verifiedtls:MAX", "DEF:verifiedtls_13=$rrd_dane_13:verifiedtls:AVERAGE", "DEF:mverifiedtls_13=$rrd_dane_13:verifiedtls:MAX", "DEF:verifiedtls_14=$rrd_dane_14:verifiedtls:AVERAGE", "DEF:mverifiedtls_14=$rrd_dane_14:verifiedtls:MAX", "CDEF:rverifiedtls=verifiedtls_11,verifiedtls_12,+,verifiedtls_13,+,verifiedtls_14,+,60,*", "CDEF:dverifiedtls=verifiedtls_11,verifiedtls_12,+,verifiedtls_13,+,verifiedtls_14,+,UN,0,verifiedtls_11,verifiedtls_12,+,verifiedtls_13,+,verifiedtls_14,+,IF,$step,*", "CDEF:sverifiedtls=PREV,UN,dverifiedtls,PREV,IF,dverifiedtls,+", "CDEF:rmverifiedtls=mverifiedtls_11,mverifiedtls_12,+,mverifiedtls_13,+,mverifiedtls_14,+,60,*", "LINE2:rverifiedtls#$color{verifiedtls}:Out Verified TLS ", 'GPRINT:sverifiedtls:MAX:total\: %15.0lf msgs', 'GPRINT:rverifiedtls:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmverifiedtls:MAX:max\: %11.0lf msgs/min\l', ); } sub graph_smtpd($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:untrustedtlsin_11=$rrd_smtpd_11:untrustedtlsin:AVERAGE", "DEF:muntrustedtlsin_11=$rrd_smtpd_11:untrustedtlsin:MAX", "DEF:untrustedtlsin_12=$rrd_smtpd_12:untrustedtlsin:AVERAGE", "DEF:muntrustedtlsin_12=$rrd_smtpd_12:untrustedtlsin:MAX", "DEF:untrustedtlsin_13=$rrd_smtpd_13:untrustedtlsin:AVERAGE", "DEF:muntrustedtlsin_13=$rrd_smtpd_13:untrustedtlsin:MAX", "DEF:untrustedtlsin_14=$rrd_smtpd_14:untrustedtlsin:AVERAGE", "DEF:muntrustedtlsin_14=$rrd_smtpd_14:untrustedtlsin:MAX", "CDEF:runtrustedtlsin=untrustedtlsin_11,untrustedtlsin_12,+,untrustedtlsin_13,+,untrustedtlsin_14,+,60,*", "CDEF:duntrustedtlsin=untrustedtlsin_11,untrustedtlsin_12,+,untrustedtlsin_13,+,untrustedtlsin_14,+,UN,0,untrustedtlsin_11,untrustedtlsin_12,+,untrustedtlsin_13,+,untrustedtlsin_14,+,IF,$step,*", "CDEF:suntrustedtlsin=PREV,UN,duntrustedtlsin,PREV,IF,duntrustedtlsin,+", "CDEF:rmuntrustedtlsin=muntrustedtlsin_11,muntrustedtlsin_12,+,muntrustedtlsin_13,+,muntrustedtlsin_14,+,60,*", "AREA:runtrustedtlsin#$color{untrustedtlsin}:IN Untrusted TLS ", 'GPRINT:suntrustedtlsin:MAX:total\: %15.0lf msgs', 'GPRINT:runtrustedtlsin:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmuntrustedtlsin:MAX:max\: %11.0lf msgs/min\l', "DEF:anonymoustlsin_11=$rrd_smtpd_11:anonymoustlsin:AVERAGE", "DEF:manonymoustlsin_11=$rrd_smtpd_11:anonymoustlsin:MAX", "DEF:anonymoustlsin_12=$rrd_smtpd_12:anonymoustlsin:AVERAGE", "DEF:manonymoustlsin_12=$rrd_smtpd_12:anonymoustlsin:MAX", "DEF:anonymoustlsin_13=$rrd_smtpd_13:anonymoustlsin:AVERAGE", "DEF:manonymoustlsin_13=$rrd_smtpd_13:anonymoustlsin:MAX", "DEF:anonymoustlsin_14=$rrd_smtpd_14:anonymoustlsin:AVERAGE", "DEF:manonymoustlsin_14=$rrd_smtpd_14:anonymoustlsin:MAX", "CDEF:ranonymoustlsin=anonymoustlsin_11,anonymoustlsin_12,+,anonymoustlsin_13,+,anonymoustlsin_14,+,60,*", "CDEF:danonymoustlsin=anonymoustlsin_11,anonymoustlsin_12,+,anonymoustlsin_13,+,anonymoustlsin_14,+,UN,0,anonymoustlsin_11,anonymoustlsin_12,+,anonymoustlsin_13,+,anonymoustlsin_14,+,IF,$step,*", "CDEF:sanonymoustlsin=PREV,UN,danonymoustlsin,PREV,IF,danonymoustlsin,+", "CDEF:rmanonymoustlsin=manonymoustlsin_11,manonymoustlsin_12,+,manonymoustlsin_13,+,manonymoustlsin_14,+,60,*", "STACK:ranonymoustlsin#$color{anonymoustlsin}:IN Anonymous TLS ", 'GPRINT:sanonymoustlsin:MAX:total\: %15.0lf msgs', 'GPRINT:ranonymoustlsin:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmanonymoustlsin:MAX:max\: %11.0lf msgs/min\l', "DEF:trustedtlsin_11=$rrd_smtpd_11:trustedtlsin:AVERAGE", "DEF:mtrustedtlsin_11=$rrd_smtpd_11:trustedtlsin:MAX", "DEF:trustedtlsin_12=$rrd_smtpd_12:trustedtlsin:AVERAGE", "DEF:mtrustedtlsin_12=$rrd_smtpd_12:trustedtlsin:MAX", "DEF:trustedtlsin_13=$rrd_smtpd_13:trustedtlsin:AVERAGE", "DEF:mtrustedtlsin_13=$rrd_smtpd_13:trustedtlsin:MAX", "DEF:trustedtlsin_14=$rrd_smtpd_14:trustedtlsin:AVERAGE", "DEF:mtrustedtlsin_14=$rrd_smtpd_14:trustedtlsin:MAX", "CDEF:rtrustedtlsin=trustedtlsin_11,trustedtlsin_12,+,trustedtlsin_13,+,trustedtlsin_14,+,60,*", "CDEF:dtrustedtlsin=trustedtlsin_11,trustedtlsin_12,+,trustedtlsin_13,+,trustedtlsin_14,+,UN,0,trustedtlsin_11,trustedtlsin_12,+,trustedtlsin_13,+,trustedtlsin_14,+,IF,$step,*", "CDEF:strustedtlsin=PREV,UN,dtrustedtlsin,PREV,IF,dtrustedtlsin,+", "CDEF:rmtrustedtlsin=mtrustedtlsin_11,mtrustedtlsin_12,+,mtrustedtlsin_13,+,mtrustedtlsin_14,+,60,*", "STACK:rtrustedtlsin#$color{trustedtlsin}:In Trusted TLS ", 'GPRINT:strustedtlsin:MAX:total\: %15.0lf msgs', 'GPRINT:rtrustedtlsin:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmtrustedtlsin:MAX:max\: %11.0lf msgs/min\l', ); } sub graph_spf($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:spfpass_11=$rrd_dmarc_11:spfpass:AVERAGE", "DEF:mspfpass_11=$rrd_dmarc_11:spfpass:MAX", "DEF:spfpass_12=$rrd_dmarc_12:spfpass:AVERAGE", "DEF:mspfpass_12=$rrd_dmarc_12:spfpass:MAX", "DEF:spfpass_13=$rrd_dmarc_13:spfpass:AVERAGE", "DEF:mspfpass_13=$rrd_dmarc_13:spfpass:MAX", "DEF:spfpass_14=$rrd_dmarc_14:spfpass:AVERAGE", "DEF:mspfpass_14=$rrd_dmarc_14:spfpass:MAX", "CDEF:rspfpass=spfpass_11,spfpass_12,+,spfpass_13,+,spfpass_14,+,60,*", "CDEF:dspfpass=spfpass_11,spfpass_12,+,spfpass_13,+,spfpass_14,+,UN,0,spfpass_11,spfpass_12,+,spfpass_13,+,spfpass_14,+,IF,$step,*", "CDEF:sspfpass=PREV,UN,dspfpass,PREV,IF,dspfpass,+", "CDEF:rmspfpass=mspfpass_11,mspfpass_12,+,mspfpass_13,+,mspfpass_14,+,60,*", "AREA:rspfpass#$color{spfpass}:SPF pass ", 'GPRINT:sspfpass:MAX:total\: %15.0lf msgs', 'GPRINT:rspfpass:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmspfpass:MAX:max\: %11.0lf msgs/min\l', "DEF:spfnone_11=$rrd_dmarc_11:spfnone:AVERAGE", "DEF:mspfnone_11=$rrd_dmarc_11:spfnone:MAX", "DEF:spfnone_12=$rrd_dmarc_12:spfnone:AVERAGE", "DEF:mspfnone_12=$rrd_dmarc_12:spfnone:MAX", "DEF:spfnone_13=$rrd_dmarc_13:spfnone:AVERAGE", "DEF:mspfnone_13=$rrd_dmarc_13:spfnone:MAX", "DEF:spfnone_14=$rrd_dmarc_14:spfnone:AVERAGE", "DEF:mspfnone_14=$rrd_dmarc_14:spfnone:MAX", "CDEF:rspfnone=spfnone_11,spfnone_12,+,spfnone_13,+,spfnone_14,+,60,*", "CDEF:dspfnone=spfnone_11,spfnone_12,+,spfnone_13,+,spfnone_14,+,UN,0,spfnone_11,spfnone_12,+,spfnone_13,+,spfnone_14,+,IF,$step,*", "CDEF:sspfnone=PREV,UN,dspfnone,PREV,IF,dspfnone,+", "CDEF:rmspfnone=mspfnone_11,mspfnone_12,+,mspfnone_13,+,mspfnone_14,+,60,*", "LINE2:rspfnone#$color{spfnone}:SPF none ", 'GPRINT:sspfnone:MAX:total\: %15.0lf msgs', 'GPRINT:rspfnone:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmspfnone:MAX:max\: %11.0lf msgs/min\l', "DEF:spffail_11=$rrd_dmarc_11:spffail:AVERAGE", "DEF:mspffail_11=$rrd_dmarc_11:spffail:MAX", "DEF:spffail_12=$rrd_dmarc_12:spffail:AVERAGE", "DEF:mspffail_12=$rrd_dmarc_12:spffail:MAX", "DEF:spffail_13=$rrd_dmarc_13:spffail:AVERAGE", "DEF:mspffail_13=$rrd_dmarc_13:spffail:MAX", "DEF:spffail_14=$rrd_dmarc_14:spffail:AVERAGE", "DEF:mspffail_14=$rrd_dmarc_14:spffail:MAX", "CDEF:rspffail=spffail_11,spffail_12,+,spffail_13,+,spffail_14,+,60,*", "CDEF:dspffail=spffail_11,spffail_12,+,spffail_13,+,spffail_14,+,UN,0,spffail_11,spffail_12,+,spffail_13,+,spffail_14,+,IF,$step,*", "CDEF:sspffail=PREV,UN,dspffail,PREV,IF,dspffail,+", "CDEF:rmspffail=mspffail_11,mspffail_12,+,mspffail_13,+,mspffail_14,+,60,*", "LINE2:rspffail#$color{spffail}:SPF fail ", 'GPRINT:sspffail:MAX:total\: %15.0lf msgs', 'GPRINT:rspffail:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmspffail:MAX:max\: %11.0lf msgs/min\l', ); } sub graph_dkim($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:dkimpass_11=$rrd_dmarc_11:dkimpass:AVERAGE", "DEF:mdkimpass_11=$rrd_dmarc_11:dkimpass:MAX", "DEF:dkimpass_12=$rrd_dmarc_12:dkimpass:AVERAGE", "DEF:mdkimpass_12=$rrd_dmarc_12:dkimpass:MAX", "DEF:dkimpass_13=$rrd_dmarc_13:dkimpass:AVERAGE", "DEF:mdkimpass_13=$rrd_dmarc_13:dkimpass:MAX", "DEF:dkimpass_14=$rrd_dmarc_14:dkimpass:AVERAGE", "DEF:mdkimpass_14=$rrd_dmarc_14:dkimpass:MAX", "CDEF:rdkimpass=dkimpass_11,dkimpass_12,+,dkimpass_13,+,dkimpass_14,+,60,*", "CDEF:ddkimpass=dkimpass_11,dkimpass_12,+,dkimpass_13,+,dkimpass_14,+,UN,0,dkimpass_11,dkimpass_12,+,dkimpass_13,+,dkimpass_14,+,IF,$step,*", "CDEF:sdkimpass=PREV,UN,ddkimpass,PREV,IF,ddkimpass,+", "CDEF:rmdkimpass=mdkimpass_11,mdkimpass_12,+,mdkimpass_13,+,mdkimpass_14,+,60,*", "AREA:rdkimpass#$color{dkimpass}:DKIM pass ", 'GPRINT:sdkimpass:MAX:total\: %15.0lf msgs', 'GPRINT:rdkimpass:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmdkimpass:MAX:max\: %11.0lf msgs/min\l', "DEF:dkimnone_11=$rrd_dmarc_11:dkimnone:AVERAGE", "DEF:mdkimnone_11=$rrd_dmarc_11:dkimnone:MAX", "DEF:dkimnone_12=$rrd_dmarc_12:dkimnone:AVERAGE", "DEF:mdkimnone_12=$rrd_dmarc_12:dkimnone:MAX", "DEF:dkimnone_13=$rrd_dmarc_13:dkimnone:AVERAGE", "DEF:mdkimnone_13=$rrd_dmarc_13:dkimnone:MAX", "DEF:dkimnone_14=$rrd_dmarc_14:dkimnone:AVERAGE", "DEF:mdkimnone_14=$rrd_dmarc_14:dkimnone:MAX", "CDEF:rdkimnone=dkimnone_11,dkimnone_12,+,dkimnone_13,+,dkimnone_14,+,60,*", "CDEF:ddkimnone=dkimnone_11,dkimnone_12,+,dkimnone_13,+,dkimnone_14,+,UN,0,dkimnone_11,dkimnone_12,+,dkimnone_13,+,dkimnone_14,+,IF,$step,*", "CDEF:sdkimnone=PREV,UN,ddkimnone,PREV,IF,ddkimnone,+", "CDEF:rmdkimnone=mdkimnone_11,mdkimnone_12,+,mdkimnone_13,+,mdkimnone_14,+,60,*", "LINE2:rdkimnone#$color{dkimnone}:DKIM none ", 'GPRINT:sdkimnone:MAX:total\: %15.0lf msgs', 'GPRINT:rdkimnone:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmdkimnone:MAX:max\: %11.0lf msgs/min\l', "DEF:dkimfail_11=$rrd_dmarc_11:dkimfail:AVERAGE", "DEF:mdkimfail_11=$rrd_dmarc_11:dkimfail:MAX", "DEF:dkimfail_12=$rrd_dmarc_12:dkimfail:AVERAGE", "DEF:mdkimfail_12=$rrd_dmarc_12:dkimfail:MAX", "DEF:dkimfail_13=$rrd_dmarc_13:dkimfail:AVERAGE", "DEF:mdkimfail_13=$rrd_dmarc_13:dkimfail:MAX", "DEF:dkimfail_14=$rrd_dmarc_14:dkimfail:AVERAGE", "DEF:mdkimfail_14=$rrd_dmarc_14:dkimfail:MAX", "CDEF:rdkimfail=dkimfail_11,dkimfail_12,+,dkimfail_13,+,dkimfail_14,+,60,*", "CDEF:ddkimfail=dkimfail_11,dkimfail_12,+,dkimfail_13,+,dkimfail_14,+,UN,0,dkimfail_11,dkimfail_12,+,dkimfail_13,+,dkimfail_14,+,IF,$step,*", "CDEF:sdkimfail=PREV,UN,ddkimfail,PREV,IF,ddkimfail,+", "CDEF:rmdkimfail=mdkimfail_11,mdkimfail_12,+,mdkimfail_13,+,mdkimfail_14,+,60,*", "LINE2:rdkimfail#$color{dkimfail}:DKIM fail ", 'GPRINT:sdkimfail:MAX:total\: %15.0lf msgs', 'GPRINT:rdkimfail:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmdkimfail:MAX:max\: %11.0lf msgs/min\l', ); } sub graph_dmarc($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:dmarcpass_11=$rrd_dmarc_11:dmarcpass:AVERAGE", "DEF:mdmarcpass_11=$rrd_dmarc_11:dmarcpass:MAX", "DEF:dmarcpass_12=$rrd_dmarc_12:dmarcpass:AVERAGE", "DEF:mdmarcpass_12=$rrd_dmarc_12:dmarcpass:MAX", "DEF:dmarcpass_13=$rrd_dmarc_13:dmarcpass:AVERAGE", "DEF:mdmarcpass_13=$rrd_dmarc_13:dmarcpass:MAX", "DEF:dmarcpass_14=$rrd_dmarc_14:dmarcpass:AVERAGE", "DEF:mdmarcpass_14=$rrd_dmarc_14:dmarcpass:MAX", "CDEF:rdmarcpass=dmarcpass_11,dmarcpass_12,+,dmarcpass_13,+,dmarcpass_14,+,60,*", "CDEF:ddmarcpass=dmarcpass_11,dmarcpass_12,+,dmarcpass_13,+,dmarcpass_14,+,UN,0,dmarcpass_11,dmarcpass_12,+,dmarcpass_13,+,dmarcpass_14,+,IF,$step,*", "CDEF:sdmarcpass=PREV,UN,ddmarcpass,PREV,IF,ddmarcpass,+", "CDEF:rmdmarcpass=mdmarcpass_11,mdmarcpass_12,+,mdmarcpass_13,+,mdmarcpass_14,+,60,*", "AREA:rdmarcpass#$color{dmarcpass}:DMARC pass ", 'GPRINT:sdmarcpass:MAX:total\: %15.0lf msgs', 'GPRINT:rdmarcpass:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmdmarcpass:MAX:max\: %11.0lf msgs/min\l', "DEF:dmarcnone_11=$rrd_dmarc_11:dmarcnone:AVERAGE", "DEF:mdmarcnone_11=$rrd_dmarc_11:dmarcnone:MAX", "DEF:dmarcnone_12=$rrd_dmarc_12:dmarcnone:AVERAGE", "DEF:mdmarcnone_12=$rrd_dmarc_12:dmarcnone:MAX", "DEF:dmarcnone_13=$rrd_dmarc_13:dmarcnone:AVERAGE", "DEF:mdmarcnone_13=$rrd_dmarc_13:dmarcnone:MAX", "DEF:dmarcnone_14=$rrd_dmarc_14:dmarcnone:AVERAGE", "DEF:mdmarcnone_14=$rrd_dmarc_14:dmarcnone:MAX", "CDEF:rdmarcnone=dmarcnone_11,dmarcnone_12,+,dmarcnone_13,+,dmarcnone_14,+,60,*", "CDEF:ddmarcnone=dmarcnone_11,dmarcnone_12,+,dmarcnone_13,+,dmarcnone_14,+,UN,0,dmarcnone_11,dmarcnone_12,+,dmarcnone_13,+,dmarcnone_14,+,IF,$step,*", "CDEF:sdmarcnone=PREV,UN,ddmarcnone,PREV,IF,ddmarcnone,+", "CDEF:rmdmarcnone=mdmarcnone_11,mdmarcnone_12,+,mdmarcnone_13,+,mdmarcnone_14,+,60,*", "LINE2:rdmarcnone#$color{dmarcnone}:DMARC none ", 'GPRINT:sdmarcnone:MAX:total\: %15.0lf msgs', 'GPRINT:rdmarcnone:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmdmarcnone:MAX:max\: %11.0lf msgs/min\l', "DEF:dmarcfail_11=$rrd_dmarc_11:dmarcfail:AVERAGE", "DEF:mdmarcfail_11=$rrd_dmarc_11:dmarcfail:MAX", "DEF:dmarcfail_12=$rrd_dmarc_12:dmarcfail:AVERAGE", "DEF:mdmarcfail_12=$rrd_dmarc_12:dmarcfail:MAX", "DEF:dmarcfail_13=$rrd_dmarc_13:dmarcfail:AVERAGE", "DEF:mdmarcfail_13=$rrd_dmarc_13:dmarcfail:MAX", "DEF:dmarcfail_14=$rrd_dmarc_14:dmarcfail:AVERAGE", "DEF:mdmarcfail_14=$rrd_dmarc_14:dmarcfail:MAX", "CDEF:rdmarcfail=dmarcfail_11,dmarcfail_12,+,dmarcfail_13,+,dmarcfail_14,+,60,*", "CDEF:ddmarcfail=dmarcfail_11,dmarcfail_12,+,dmarcfail_13,+,dmarcfail_14,+,UN,0,dmarcfail_11,dmarcfail_12,+,dmarcfail_13,+,dmarcfail_14,+,IF,$step,*", "CDEF:sdmarcfail=PREV,UN,ddmarcfail,PREV,IF,ddmarcfail,+", "CDEF:rmdmarcfail=mdmarcfail_11,mdmarcfail_12,+,mdmarcfail_13,+,mdmarcfail_14,+,60,*", "LINE2:rdmarcfail#$color{dmarcfail}:DMARC fail ", 'GPRINT:sdmarcfail:MAX:total\: %15.0lf msgs', 'GPRINT:rdmarcfail:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rmdmarcfail:MAX:max\: %11.0lf msgs/min\l', ); } sub graph_queue($$) { my ($range, $file) = @_; my $step = $range*$points_per_sample/$xpoints; rrd_graph($range, $file, $ypoints, "DEF:deferred_11=$rrd_queue_11:deferred:AVERAGE", "DEF:deferred_12=$rrd_queue_12:deferred:AVERAGE", "DEF:deferred_13=$rrd_queue_13:deferred:AVERAGE", "DEF:deferred_14=$rrd_queue_14:deferred:AVERAGE", "CDEF:rdeferred=deferred_11,deferred_12,+,deferred_13,+,deferred_14,+", "AREA:rdeferred#$color{deferred}:Deferred ", 'GPRINT:rdeferred:MAX:total\: %15.0lf msgs', 'GPRINT:rdeferred:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:rdeferred:MAX:max\: %11.0lf msgs/min\l', "DEF:active_11=$rrd_queue_11:active:AVERAGE", "DEF:active_12=$rrd_queue_12:active:AVERAGE", "DEF:active_13=$rrd_queue_13:active:AVERAGE", "DEF:active_14=$rrd_queue_14:active:AVERAGE", "CDEF:ractive=active_11,active_12,+,active_13,+,active_14,+,active_11,+,active_12,+,active_13,+,active_14,+", "LINE2:ractive#$color{active}:Active+Incoming+Maildrop", 'GPRINT:ractive:MAX:total\: %15.0lf msgs', 'GPRINT:ractive:AVERAGE:avg\: %12.2lf msgs/min', 'GPRINT:ractive:MAX:max\: %11.0lf msgs/min\l', ); } sub print_html() { print "Content-Type: text/html\n\n"; print < Mailserver Statistiken auf $host HEADER print "

Mailserver Statistiken für die
die Mailserver bei nausch.org

\n"; print "

(kumulierte Werte von "; print "MX11, "; print "MX12, "; print "MX13 und "; print "MX14)

\n"; print "\n"; for my $n (0..$#graphs) { print "

$graphs[$n]{title}

\n"; print "

Mail Ein und -Ausgang

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; print "

geblockte Nachrichten

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; print "

Greylisting Übersicht

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; print "

Greylisting Detailansicht

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; print "

Postscreen (positive) Übersicht

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; print "

Postscreen Detailansicht

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; print "

Übersicht Mail-Queues

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; print "

ausgehende DANE/TLSA-gesicherte Verbindungen

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; print "

ankommende TLS-gesicherte Verbindungen

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; print "

Sender policy Framework - SPF-Prüfungen

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; print "

DomainKeys Identified Mail - DKIM-Prüfungen

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; print "

Domain-based Message Authentication, Reporting & Conformance - DMARC-Prüfungen

\n"; print "
( MX11\n"; print "MX12\n"; print "MX13\n"; print "MX14 )
\n"; print "

\"mailgraph

\n"; } print <
Mailgraph(-ng) $VERSION by Django based on David Schweikert's Mailgraph, Markus Neubauer's Greygraph,
Ralf Hildebrandt's Queuegraph and Sebastian van de Meer's mailgraphpatch 1 and mailgraphpatch 2
FOOTER } sub send_image($) { my ($file)= @_; -r $file or do { print "Content-type: text/plain\n\nERROR: can't find $file\n"; exit 1; }; print "Content-type: image/png\n"; print "Content-length: ".((stat($file))[7])."\n"; print "\n"; open(IMG, $file) or die; my $data; print $data while read(IMG, $data, 16384)>0; } sub main() { my $uri = $ENV{REQUEST_URI} || ''; $uri =~ s/\/[^\/]+$//; $uri =~ s/\//,/g; $uri =~ s/(\~|\%7E)/tilde,/g; mkdir $tmp_dir, 0777 unless -d $tmp_dir; mkdir "$tmp_dir/$uri", 0777 unless -d "$tmp_dir/$uri"; my $img = $ENV{QUERY_STRING}; if(defined $img and $img =~ /\S/) { if($img =~ /^(\d+)-n$/) { my $file = "$tmp_dir/$uri/mailgraph_$1.png"; graph($graphs[$1]{seconds}, $file); send_image($file); } elsif($img =~ /^(\d+)-e$/) { my $file = "$tmp_dir/$uri/mailgraph_$1_err.png"; graph_virus($graphs[$1]{seconds}, $file); send_image($file); } elsif($img =~ /^(\d+)-g$/) { my $file = "$tmp_dir/$uri/mailgraph_$1_greylist.png"; graph_greylist($graphs[$1]{seconds}, $file); send_image($file); } elsif($img =~ /^(\d+)-d$/) { my $file = "$tmp_dir/$uri/mailgraph_$1_greystats.png"; graph_greystats($graphs[$1]{seconds}, $file); send_image($file); } elsif($img =~ /^(\d+)-v$/) { my $file = "$tmp_dir/$uri/mailgraph_$1_postscreen.png"; graph_postscreen($graphs[$1]{seconds}, $file); send_image($file); } elsif($img =~ /^(\d+)-w$/) { my $file = "$tmp_dir/$uri/mailgraph_$1_postscreenstats.png"; graph_postscreenstats($graphs[$1]{seconds}, $file); send_image($file); } elsif($img =~ /^(\d+)-q$/) { my $file = "$tmp_dir/$uri/mailgraph_$1_queue.png"; graph_queue($graphs[$1]{seconds}, $file); send_image($file); } elsif($img =~ /^(\d+)-t$/) { my $file = "$tmp_dir/$uri/mailgraph_$1_dane.png"; graph_dane($graphs[$1]{seconds}, $file); send_image($file); } elsif($img =~ /^(\d+)-i$/) { my $file = "$tmp_dir/$uri/mailgraph_$1_smtpd.png"; graph_smtpd($graphs[$1]{seconds}, $file); send_image($file); } elsif($img =~ /^(\d+)-f$/) { my $file = "$tmp_dir/$uri/mailgraph_$1_spf.png"; graph_spf($graphs[$1]{seconds}, $file); send_image($file); } elsif($img =~ /^(\d+)-m$/) { my $file = "$tmp_dir/$uri/mailgraph_$1_dkim.png"; graph_dkim($graphs[$1]{seconds}, $file); send_image($file); } elsif($img =~ /^(\d+)-c$/) { my $file = "$tmp_dir/$uri/mailgraph_$1_dmarc.png"; graph_dmarc($graphs[$1]{seconds}, $file); send_image($file); } else { die "ERROR: invalid argument\n"; } } else { print_html; } } main;