Mailgraph not working from gui, has several issues

Report bugs and workarounds
Post Reply
JayAre
Posts: 2
Joined: 13 May 2016 10:37

Mailgraph not working from gui, has several issues

Post by JayAre »

Hi there,
I have an EFA installation that started out as 3.0.0.9, and has been upgraded to 3.0.1.1.
Unfortunately mailgraph does not seem to work from the "Tools" menu.
When i click on "View Mailgraph Statistics" the page https://<server>/mailscanner/mailgraph.php loads with the head of the page ok, but the iframe, where mailgraph should be putting data is empty.
However, using the direct URL https://<server>/cgi-bin/mailgraph.cgi works. This is the same URL that mailgraph.php would be embedding into the iframe, except that the calling php-file /var/www/html/mailscanner/mailgraph.php tries to embed ../cgi-bin/mailgraph.php, which isn't there. Changing the script to call ../cgi-bin/mailgraph.cgi doesn't help either. The iframe stays empty.
I'm at a loss with this, tried with 4 browsers (Chrome, Firefox, IE, Edge) but no difference.
I ended up changing mailgraph.php to

Code: Select all

<?php
require_once("./functions.php");
session_start();
require('login.function.php');
$refresh = html_start("Tools/Links",0,false,false);
?>
<!--
<iframe src="../cgi-bin/mailgraph.cgi" width="960px" height="1024px">
-->
 <a href="../cgi-bin/mailgraph.cgi">Click here for Mailgraph Statistics</a>
<!--
</iframe>
-->
<?php
html_end();
dbclose();
...not nice, but works for me. This is essentially calling the mailgraph.cgi directly, when you click the link.

Moreover, the mailgraph.cgi breaks https, causing a browser warning due to mixed content, the reason being that Tobi's gif at http://oss.oetiker.ch/rrdtool/.pics/rrdtool.gif is embedded ia plain https. I changed the cgi to call https://oss.oetiker.ch/rrdtool/.pics/rrdtool.gif and the browser is happy.
Maybe some intelligence could be added to the script, to check whether it is being called over https or https.

Any ideas what could have gone wrong here?

Regards,
jr
Post Reply