Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th December 2007, 00:31
MTvermoes MTvermoes is offline
Junior Member
 
Join Date: Dec 2007
Posts: 17
Thanks: 1
Thanked 10 Times in 5 Posts
Default rrdtool,mailgraph,queuegraph (the easy way)

(Updated attachment 3.Jan.2008)
This is testet on CentOS 5.1 with ISPConfig(stable)+Perfect Setup+dovecot

attached script will install RRDtool +all needed libs with --prefix=/usr
mailgraph.cgi and queuegraph.cgi will be installed in /root/ispconfig/standard_cgis/cgi-bin/
mods to detect spam and virus in maillog are made to
/root/ispconfig/isp/conf/customized_templates/spamassassin.rc.master
/root/ispconfig/isp/conf/spamassassin.rc.master
and
/root/ispconfig/isp/conf/customized_templates/antivirus.rc.master
/root/ispconfig/isp/conf/antivirus.rc.master

Before you start :
Make sure that File::Tail is installed

perl -MCPAN -e shell
install File::Tail
exit

unpack attached file :
cd /usr/src
tar xvzf rmqinstall.tar.gz
cd rmqinstall
/bin/sh setup.sh

You will need to update users spamconf (check this link for info on howto)

You will allso need to copy mailgraph.cgi and queuegraph.cgi to existing websites cgi-bin

queuegraph.cgi will only be usefull if you are running a non Maildir queue
Attached Files
File Type: gz rmqinstall.tar.gz (2.2 KB, 474 views)

Last edited by MTvermoes; 3rd January 2008 at 18:05.
Reply With Quote
The Following User Says Thank You to MTvermoes For This Useful Post:
madmucho (31st December 2007)
Sponsored Links
  #2  
Old 31st December 2007, 13:05
madmucho madmucho is offline
Senior Member
 
Join Date: Oct 2006
Location: Czech republic, Karlovy Vary
Posts: 158
Thanks: 79
Thanked 11 Times in 11 Posts
Send a message via ICQ to madmucho
Default

Im trying do this on mandriva but i have problem during install script runs to end but i thing something is bad.
Code:
--11:13:57--  http://www.howtoforge.com/forums/attachment.php?attachmentid=389&d=1173267947
           => `attachment.php?attachmentid=389&d=1173267947'
Resolving www.howtoforge.com... 78.47.159.34
Connecting to www.howtoforge.com|78.47.159.34|:80... connected.
HTTP požadavek odeslán, program čeká na odpověď ... 200 OK
Délka: 555 [plain/text]

100%[=============================================================>] 555           --.--K/s

11:13:57 (21.17 MB/s) - `attachment.php?attachmentid=389&d=1173267947' saved [555/555]

mv: cannot stat `./antivirus.rc.master.patch.txt': není souborem ani adresářem
mv: cannot stat `./spamassassin.rc.master.patch.txt': není souborem ani adresářem
mv: cannot stat `/root/ispconfig/isp/conf/customized_templates/antivirus.rc.master': není souborem ani adresářem
./setup.sh: line 68: ./spamassassin.rc.master.patch: není souborem ani adresářem
./setup.sh: line 69: ./antivirus.rc.master.patch: není souborem ani adresářem
rm: cannot remove `./spamassassin.rc.master.patch': není souborem ani adresářem
rm: cannot remove `./antivirus.rc.master.patch': není souborem ani adresářem
--11:13:57--  http://mailgraph.schweikert.ch/pub/mailgraph-1.14.tar.gz
           => `mailgraph-1.14.tar.gz'
Resolving mailgraph.schweikert.ch... 88.198.52.145
Connecting to mailgraph.schweikert.ch|88.198.52.145|:80... connected.
HTTP požadavek odeslán, program čeká na odpověď ... 200 OK
Délka: 22 014 (21K) [application/x-gzip]
i have czech locale, but 'není souborem ani adresářem' is 'isnt file or directory'.

Any idea?
Reply With Quote
  #3  
Old 31st December 2007, 16:39
MTvermoes MTvermoes is offline
Junior Member
 
Join Date: Dec 2007
Posts: 17
Thanks: 1
Thanked 10 Times in 5 Posts
Default

For : madmucho

It is a problem with with wget not saving to the correct filenames.

replace
Code:
wget "http://www.howtoforge.com/forums/attachment.php?attachmentid=388&d=1173267940"
with
Code:
wget "http://www.howtoforge.com/forums/attachment.php?attachmentid=388&d=1173267940" -O antivirus.rc.master.patch.txt
allso replace
Code:
wget "http://www.howtoforge.com/forums/attachment.php?attachmentid=389&d=1173267947"
with
Code:
wget "http://www.howtoforge.com/forums/attachment.php?attachmentid=389&d=1173267947"  -O spamassassin.rc.master.patch.txt
Best Regards and a Happy New Year

Mark

Quote:
Originally Posted by madmucho
Im trying do this on mandriva but i have problem during install script runs to end but i thing something is bad.
Code:
--11:13:57--  http://www.howtoforge.com/forums/attachment.php?attachmentid=389&d=1173267947
           => `attachment.php?attachmentid=389&d=1173267947'
Resolving www.howtoforge.com... 78.47.159.34
Connecting to www.howtoforge.com|78.47.159.34|:80... connected.
HTTP požadavek odeslán, program čeká na odpověď ... 200 OK
Délka: 555 [plain/text]

100%[=============================================================>] 555           --.--K/s

11:13:57 (21.17 MB/s) - `attachment.php?attachmentid=389&d=1173267947' saved [555/555]

mv: cannot stat `./antivirus.rc.master.patch.txt': není souborem ani adresářem
mv: cannot stat `./spamassassin.rc.master.patch.txt': není souborem ani adresářem
mv: cannot stat `/root/ispconfig/isp/conf/customized_templates/antivirus.rc.master': není souborem ani adresářem
./setup.sh: line 68: ./spamassassin.rc.master.patch: není souborem ani adresářem
./setup.sh: line 69: ./antivirus.rc.master.patch: není souborem ani adresářem
rm: cannot remove `./spamassassin.rc.master.patch': není souborem ani adresářem
rm: cannot remove `./antivirus.rc.master.patch': není souborem ani adresářem
--11:13:57--  http://mailgraph.schweikert.ch/pub/mailgraph-1.14.tar.gz
           => `mailgraph-1.14.tar.gz'
Resolving mailgraph.schweikert.ch... 88.198.52.145
Connecting to mailgraph.schweikert.ch|88.198.52.145|:80... connected.
HTTP požadavek odeslán, program čeká na odpověď ... 200 OK
Délka: 22 014 (21K) [application/x-gzip]
i have czech locale, but 'není souborem ani adresářem' is 'isnt file or directory'.

Any idea?

Last edited by MTvermoes; 3rd January 2008 at 17:50.
Reply With Quote
The Following User Says Thank You to MTvermoes For This Useful Post:
falko (1st January 2008)
  #4  
Old 2nd January 2008, 10:49
madmucho madmucho is offline
Senior Member
 
Join Date: Oct 2006
Location: Czech republic, Karlovy Vary
Posts: 158
Thanks: 79
Thanked 11 Times in 11 Posts
Send a message via ICQ to madmucho
Default

Thanx, i will prepare mandriva specific howto atachments, is there some changes in path(s). It will be easier for beginners.
Reply With Quote
  #5  
Old 3rd January 2008, 18:12
MTvermoes MTvermoes is offline
Junior Member
 
Join Date: Dec 2007
Posts: 17
Thanks: 1
Thanked 10 Times in 5 Posts
Default Update

Today i have updated the attachment in msg 1.

Fixes:
wget not saving to correct filenames, when getting attachments from howtoforge.
allso patching files :
/root/ispconfig/isp/conf/antivirus.rc.master
/root/ispconfig/isp/conf/customized_templates/antivirus.rc.master
and
/root/ispconfig/isp/conf/spamassassin.rc.master
/root/ispconfig/isp/conf/customized_templates/spamassassin.rc.master

Needed to patch both places on my system to make this work, and allso preserve changes when updating ISPConfig.

/Mark

Last edited by MTvermoes; 3rd January 2008 at 23:56.
Reply With Quote
  #6  
Old 15th January 2008, 17:54
hvrossum hvrossum is offline
Member
 
Join Date: Dec 2007
Posts: 66
Thanks: 8
Thanked 0 Times in 0 Posts
Default how to Do call mailgraph.cgi

Hi,

I followed the steps to install both Mailgraph and Mailqueue. I find both CGI scripts in de cgi-bin dir in the root/ispconfig.

How do I get to work? I copied them to a website under ispconfig but I get a server 500 error when I call for them.
I have tried to put them in de cgi-bin dir which is standardly made when I install a website also in a sub dir cgi-bin under www/webXX/web/ but no luck.

What am i missing
__________________
I am stil a Linux amateur, never thought that a sales person would like fiddling around with Linux.

Setup:
Dell Power Edge SC440
Ubuntu 8.04
ISPConfig
Webmin 1.420
Reply With Quote
  #7  
Old 15th January 2008, 21:46
MTvermoes MTvermoes is offline
Junior Member
 
Join Date: Dec 2007
Posts: 17
Thanks: 1
Thanked 10 Times in 5 Posts
Default

Error 500 is most likely caused by file permissions.
The httpd user would need exe permissions mailgraph.cgi, and read permissions to .rrd files.
Allso a look in the logfile for that server will give you a good hint of what went wrong.
Make sure the first line in mailgraph.cgi points to the location of perl

Try do a :
whereis perl

/Mark
Reply With Quote
  #8  
Old 19th January 2008, 11:00
hvrossum hvrossum is offline
Member
 
Join Date: Dec 2007
Posts: 66
Thanks: 8
Thanked 0 Times in 0 Posts
Default

Hi Mark,

Where should I put the link to perl

Whereis perl gives
perl: /usr/bin/perl /etc/perl /usr/lib/perl /usr/lib64/perl /usr/local/lib/perl /usr/share/perl /usr/share/man/man1/perl.1.gz

the mailgraph.cgi
--- mailgraph.cgi.orig 2007-08-29 11:06:01.000000000 +0200
+++ mailgraph.cgi 2007-12-26 19:53:33.000000000 +0100
@@ -16,9 +16,9 @@ my $xpoints = 540;
my $points_per_sample = 3;
my $ypoints = 160;
my $ypoints_err = 96;
-my $rrd = 'mailgraph.rrd'; # path to where the RRD database is
-my $rrd_virus = 'mailgraph_virus.rrd'; # path to where the Virus RRD database is
-my $tmp_dir = '/tmp/mailgraph'; # temporary directory where to store the images
+my $rrd = '/var/lib/mailgraph.rrd'; # path to where the RRD database is
+my $rrd_virus = '/var/lib/mailgraph_virus.rrd'; # path to where the Virus RRD database is
+my $tmp_dir = '/tmp'; # temporary directory where to store the images

my @graphs = (
{ title => 'Last Day', seconds => 3600*24, },
@@ -163,7 +163,6 @@ sub print_html()

thanks

Harry
__________________
I am stil a Linux amateur, never thought that a sales person would like fiddling around with Linux.

Setup:
Dell Power Edge SC440
Ubuntu 8.04
ISPConfig
Webmin 1.420
Reply With Quote
  #9  
Old 20th January 2008, 19:14
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

/usr/bin/perl is correct.

What's the output of
Code:
ls -la /path/to/mailgraph.cgi
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 20th January 2008, 20:31
hvrossum hvrossum is offline
Member
 
Join Date: Dec 2007
Posts: 66
Thanks: 8
Thanked 0 Times in 0 Posts
 
Default

I think we are getting there but what to do to solve. The output is not very promising

ls: /path/to/mailgraph.cgi: No such file or directory
__________________
I am stil a Linux amateur, never thought that a sales person would like fiddling around with Linux.

Setup:
Dell Power Edge SC440
Ubuntu 8.04
ISPConfig
Webmin 1.420
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy SSL Connect Question formadmirer Installation/Configuration 1 19th April 2007 09:45
relayhost is easy but..... anakein Installation/Configuration 2 16th October 2006 15:28
Squirrelmail 10 Easy Steps Howto EvdM Installation/Configuration 9 11th October 2006 13:26
ILOHAMAIL in 10 easy steps Hans Tips/Tricks/Mods 12 24th September 2006 11:11
Apache2 and DNS Made Easy browngb Server Operation 4 28th July 2006 14:23


All times are GMT +2. The time now is 12:08.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.