Search

Blogroll

Meta:

Daily sendmail stats on Linux server

August 20th, 2007 by vicky

I always wanted to see mail stats on my server, who receives and sends the most mails, what are the busiest hours, etc.. to better track mail problems, catch spammers and to satisfy my admin’s ego ;-) . I found this little script that goes through senmail’s log and produces output. In my case I will send the output to root via email.

Here are the features that I receive from this little script:

SendmailStats reports:

  • Time/date of log beginning and end
  • Total bytes transferred and total MB transferred
  • Total bytes in and total MB in (locally delivered)
  • Number of messages sent out
  • Number of messages coming in
  • Messages per hour graph
  • Top 20 remote sending hosts
  • Total number of sending hosts and number of their attempted messages
  • Top 20 destination hosts
  • Total number of destination hosts and number of messages sent to them
  • Top 20 local deliveries
  • Total number of local accounts that received mail
  • Total number of messages delivered locally
  • Top 20 senders
  • Total number of senders and total number of messages sent Read the rest of this entry »

Posted in General linux admin | Comments Off

Remove FTP Login Delay With Proftpd

August 16th, 2007 by vicky

I have been noticing a very annoying delay when trying to log in via FTP on servers where I use proftpd. Everything works, but when I try to connect, 5 - 10 seconds pass by before I’m prompted for my login credentials. After long hour of searching on the internet I found a solution.

 All you need to do is edit the config file which should be /etc/proftpd/proftpd.conf  and place this line within <global> section:

 IdentLookups Off

 That should remove the delay and your ftp connection will be initialized very quickly.

Posted in General linux admin | 2 Comments »

Set date and time on a server

March 25th, 2007 by vicky

I will show you here how to set correct date and time on your server. All steps need to be done as root (which I assume you know).

To set correct time issue this command

/usr/bin/rdate -s time.nist.gov

It will connect to time server and synchs your time and date. After that command execute

/sbin/hwclock --systohc

which sets ‘permanent’ clock from the system time so that the time will be correct next time you reboot.

You can do this via a NTP daemon but it is too complicated for such an easy task as setting the date and time.

Posted in General linux admin | No Comments »