1 (edited by crahier 2010-08-13 16:37:30)

Topic: Mailgraph problem

Hi,

I tried to install mailgraph as explained here : http://www.server-world.info/en/note?os … il&f=9

When I try the page http://myserver/mailgraph/mailgraph.cgi, the code is not executed and I see the code begining with #!/usr/perl ...

I'm a newbie in Linux and I'm lost!

Do you have an idea to resolve this problem?

Thanks & Regards,

Christophe

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Mailgraph problem

I think it should work as expected if you follow its steps strictly.
Seems your issue is caused by incorrect Apache setting, i mean, you didn't have 'Options ExecCGI' configured for this directory.

3 (edited by crahier 2010-08-13 16:59:18)

Re: Mailgraph problem

It's a strange problem.

In the /etc/httpd/conf.d/mailgraph.conf, I've this:

Alias /mailgraph /var/www/mailgraph
 
<Location /mailgraph>
   Options ExecCGI
   Order deny,allow
   Deny from all
   Allow from 127.0.0.1 192.168.0
</Location>

When I call the page, I've this error:

Forbidden

You don't have permission to access /mailgraph/mailgraph.cgi on this server.

If I change the mailgraph.conf like this (I added my computer's IP) :

Allow from 127.0.0.1 192.168.0 1.15.0.41

When I call the page, I see the perl code and the page isn't executed!!

I'm lost :-(

Thanks for your help!

4

Re: Mailgraph problem

Try to remove below code in your /etc/httpd/conf.d/mailgraph.conf:

<Location /mailgraph>
   Options ExecCGI
   Order deny,allow
   Deny from all
   Allow from 127.0.0.1 192.168.0
</Location>

And create new file: /var/www/mailgraph/.htaccess, add below content:

   Options ExecCGI
   Order deny,allow
   Deny from all
   Allow from 127.0.0.1 192.168.0

5

Re: Mailgraph problem

Finally, it works but I don't know why!

I removed the .htaccess file, create a new /etc/httpd/conf.d/mailgraph.conf and put these lines :

<Location /mailgraph>
Options +ExecCGI
AddHandler cgi-script .cgi
Allow from all
Order allow,deny
</Location>

It's ok now but no data in the HTML page, strange!

6

Re: Mailgraph problem

Run mailgraph in command line to debug it.

P.S. Since iRedMail doesn't ship mailgraph anymore, we don't support it officially. and i may forgot how to config/debug it, please be gentle if i was wrong tongue

7

Re: Mailgraph problem

No problem ;-)

Thanks for your help!

8

Re: Mailgraph problem

try to put the permisions on the cgi file 755, be sure the user that runs the apache can execute the cgi

Juan