Postfix monitoring with David Schweikert's Mailgraph?

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
aboyz

Here is what I get.

Post by aboyz »

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..
jpingle
Posts: 37
Joined: Mon May 09, 2005 4:08 pm

Post by jpingle »

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.
aboyz

yeah no go.

Post by aboyz »

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
aboyz

Still not working :(

Post by aboyz »

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
jpingle
Posts: 37
Joined: Mon May 09, 2005 4:08 pm

Post by jpingle »

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: Select all

#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.)
aboyz

humm

Post by aboyz »

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
aboyz

thanks

Post by aboyz »

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?
aboyz

Hi,

Post by aboyz »

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?
jpingle
Posts: 37
Joined: Mon May 09, 2005 4:08 pm

Post by jpingle »

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.
aboyz

working..

Post by aboyz »

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?
Attachments
postfix.JPG
postfix.JPG (38.99 KiB) Viewed 18016 times
jpingle
Posts: 37
Joined: Mon May 09, 2005 4:08 pm

Post by jpingle »

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.
Attachments
Regular Auto Scaling
Regular Auto Scaling
normal.png (8.82 KiB) Viewed 18012 times
Logarithmic Auto Scaling
Logarithmic Auto Scaling
log.png (54.81 KiB) Viewed 18012 times
aboyz

any ideas.

Post by aboyz »

thanks for the wonderful scripts

any ideas why its not showing virus or spam email?

i'm using
postfix
clamav
greylisting
aboyz

wiered.

Post by aboyz »

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..
jpingle
Posts: 37
Joined: Mon May 09, 2005 4:08 pm

Post by jpingle »

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.
aboyz

Hi, ok

Post by aboyz »

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..
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests