Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Postfix monitoring with David Schweikert's Mailgraph?
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
aboyz
Guest





PostPosted: Tue May 17, 2005 2:47 pm    Post subject: Here is what I get. Reply with quote

Yes,

I'm running it as root. I have never seen this problems before.

tried mesg y then ran /usr/local/etc/rc.d/mailgraph.sh start
Starting mailgraph.
mesg: /dev/ttyp0: Operation not permitted

mail08# ls -laF maillog
-rw-r----- 1 root wheel 50637226 May 17 12:42 maillog

mail08# ls -laF /dev/ttyp0
crw--w---- 1 aboyz tty 5, 0 May 17 12:45 /dev/ttyp0

Also check /var/log/messages . nothing is missing. I'm thinking it may be the mailgraph.pl that i copy over the orginal one. I don't know what you have added in. or maybe its a perl version issues.


This is perl, v5.6.1 built for i386-freebsd

Anything else I should try?

thanks for the help..
Back to top
jpingle



Joined: 09 May 2005
Posts: 37

PostPosted: Tue May 17, 2005 3:29 pm    Post subject: Reply with quote

It is probably either a perl or a perl module issue. However, I don't have a box with both postfix and a version of perl comperable to yours.

The only thing I added to the mailgraph script was the part that writes to files. So you may want to look at /var/tmp and make sure the permissions on that are ok, too.

If that was the problem though, you'd likely be seeing many more errors than just one line.

Did you install the original mailgraph from ports? Can you remove the port (including the altered mailgraph.pl) and reinstall it? I wonder if you get that same message with a 'stock' version of mailgraph without my changes.
Back to top
aboyz
Guest





PostPosted: Tue May 17, 2005 3:49 pm    Post subject: yeah no go. Reply with quote

yeah..


still same error. i tried to run mailgraph STOCK still error.. wierd.... I'll going to upgrade to 5.8 see if that help

thanks
Back to top
aboyz
Guest





PostPosted: Wed May 18, 2005 2:55 pm    Post subject: Still not working :( Reply with quote

This is a completely new install..

freebsd 4.11
update all port. and install the following
perl 5.8.6
mailgraph-1.10
rrdtool-1.2.6
net-snmp-5.2.1_2

mail02# ./mailgraph.sh start
Starting mailgraph.
mesg: /dev/ttyp0: Operation not permitted

What can be the cause of this? can someone please help me. mailgraph doesn't seem to be working..

jpingle, can you please go over excaty what you did.. I mean step by step. because I'm doing this excatly as you says. This is on a new server with 4.11-release running. Maybe kernel version is differnet?

Please let me know

thanks
Back to top
jpingle



Joined: 09 May 2005
Posts: 37

PostPosted: Wed May 18, 2005 3:30 pm    Post subject: Reply with quote

Well the server I'm running mailgraph on is FreeBSD 4.9. I thought I'd try it on another box with postfix, so I just tried it on a FreeBSD 4.10 box. Well, it didn't work there. I just realized why. I forgot I made changes to the mailgraph.sh start script. I commented out the following lines:

Code:

#mailgraph_user=${mailgraph_user:-"www"}
#mailgraph_group=${mailgraph_group:-"www"}
#mailgraph_chdir=${mailgraph_chdir:-"/var/db/mailgraph"}


Once I commented those out, it worked.
I'll need to add the altered mailgraph.sh or alter instructions later...

It's odd that it wants mailgraph to change to another user and then try to access a log file that it would have no way to get at after doing that (the maillog file is owned by root and is not readable by others.)
Back to top
aboyz
Guest





PostPosted: Wed May 18, 2005 6:33 pm    Post subject: humm Reply with quote

let me try that

so I comment those three line in the mailgraph.pl? Let me try that.. thanks for the help I really appreicate this. Its not a perl issues. Humm. but why a CLEAN install from PORT mailgraph doesn't work . This is not right you know

thanks
Back to top
aboyz
Guest





PostPosted: Wed May 18, 2005 6:38 pm    Post subject: thanks Reply with quote

thanks that worked!!! no more errro!! let me see if i can get this up and graphing!!

thank you for all the help.

I realized that on some machine i ran with 4.11 it worked and some doesn't I still don't know why that is the case. Something wierd.. wrong with the mailgraph.sh i believe. but thanks for the help. Will commenting those 3 lines out still work?
Back to top
aboyz
Guest





PostPosted: Wed May 18, 2005 6:52 pm    Post subject: Hi, Reply with quote

I'm almost there. but i'm stuck here.

I did a import template then select the .xml file. and saved it. Ok.

now when i click on add new devices. I go template. I don't see the postfix template in there? any reason for this? or am i doing this wrong?
Back to top
jpingle



Joined: 09 May 2005
Posts: 37

PostPosted: Wed May 18, 2005 7:08 pm    Post subject: Reply with quote

You may have to go to the device listing, and choose "Postfix Processing" from the "Add graph template" dropdown list, then click add.

It should then appear in the list when you click "Create graphs for this host"

I'm going to try working the install from a completely new cacti installation on another box to refine the instructions over the next few days.
Back to top
aboyz
Guest





PostPosted: Thu May 19, 2005 2:02 pm    Post subject: working.. Reply with quote

jpingle.

Hi, thanks for the nice script. but i don't know why its not graphing my virus and spam email. Maybe you using some other kind of virus protector that is differnet from mine?

I'm using
postfix
clamav
greylisting

Is this normal?



postfix.JPG
 Description:
 Filesize:  38.99 KB
 Viewed:  7893 Time(s)

postfix.JPG


Back to top
jpingle



Joined: 09 May 2005
Posts: 37

PostPosted: Thu May 19, 2005 2:29 pm    Post subject: Reply with quote

Those counts are generated inside of mailgraph, and there are a bunch of different programs that it recognizes.

It may take some additional altering of the mailgraph code to get it to pick up on your setup. If you can find a line in your log for a blocking done by greylisting and by clamav, I may be able to help (but I can't be sure since I don't use either one of those...)

I'm just using postfix+spamassassin, and it picks up on my spam counts ok. I don't do virus checking on that server, so my virus count is always 0.

Are you using a script to invoke clamav, or are you using something like clamassassin? I've been trying to find a good way to hook clamav into postfix and I haven't seen a solution I've liked yet.

I've attached two graphs so you can see how it looks for me. Because I have so many reject messages, I had to switch to logarithmic scaling so I could tell what was going on with the lower numbers.



log.png
 Description:
Logarithmic Auto Scaling
 Filesize:  54.81 KB
 Viewed:  7889 Time(s)

log.png



normal.png
 Description:
Regular Auto Scaling
 Filesize:  8.82 KB
 Viewed:  7889 Time(s)

normal.png


Back to top
aboyz
Guest





PostPosted: Thu May 19, 2005 3:44 pm    Post subject: any ideas. Reply with quote

thanks for the wonderful scripts

any ideas why its not showing virus or spam email?

i'm using
postfix
clamav
greylisting
Back to top
aboyz
Guest





PostPosted: Thu May 19, 2005 3:48 pm    Post subject: wiered. Reply with quote

wierd. problem with the forums its not being updated.. strange..
my maillog is soo big . is there a certain line you want me to grep in maillog? because it can't view it is just too big..
Back to top
jpingle



Joined: 09 May 2005
Posts: 37

PostPosted: Thu May 19, 2005 4:29 pm    Post subject: Reply with quote

Well you can grep for clamav or greylisting for a start. I haven't used greylisting before so I don't know what a blocked message line for it would look like.

If you don't know, you could tail -f the logfile for a bit until you spot something that looks like it would be what you're after.
Back to top
aboyz
Guest





PostPosted: Fri May 20, 2005 10:48 pm    Post subject: Hi, ok Reply with quote

Hi jpingle.

Ok i found the clamav log file its in
/usr/local/etc/clamd.log
stream: Worm.Mytob.BT FOUND
SelfCheck: Database status OK.
stream: Worm.Mytob.BT FOUND
stream: Worm.Mytob.BT FOUND
stream: Worm.Mytob.T-2 FOUND
stream: Worm.Mytob.BR FOUND
stream: Worm.Bagle.Gen-zippwd FOUND
stream: Worm.SomeFool.P FOUND
stream: Worm.Mytob.BT FOUND
stream: Worm.Mytob.BT FOUND
stream: Worm.Mytob.BT FOUND
stream: Worm.Mytob.BR FOUND
stream: Worm.SomeFool.P FOUND
stream: Worm.Mytob.BR FOUND
stream: Worm.Mytob.T-2 FOUND
stream: Worm.SomeFool.Gen-1 FOUND
stream: Worm.Mytob.BR FOUND

I would think each line is a virus being found.. Now how do i go about adding that into the postfix script that will search /usr/local/etc/clamd.log for virus log instead of looking for virus in /var/log/maillog

thank you for your help.. much appreicated..
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 4 of 6

 



Powered by phpBB © 2001, 2005 phpBB Group