Changes

Jump to navigation Jump to search
15 bytes removed ,  01:49, 9 May 2010
Line 93: Line 93:  
Insert the following: Code:
 
Insert the following: Code:
   −
  #!/bin/sh  
+
#!/bin/sh  
  # Read the qpsmtpd log file.  
+
# Read the qpsmtpd log file.
  cat /var/log/qpsmtpd/* | \  
+
# Read all of the countries and count them. 
  # Read all of the countries and count them.
+
cat /var/log/qpsmtpd/* | \
  grep 'GeoIP Country:' | \  
+
grep 'GeoIP Country:' | \
  sed -e 's/^.*\(..\)$/\1/' |  
+
sed -e 's/^.*\(..\)$/\1/' | \
  sort | uniq -c | sort -n  
+
sort | uniq -c | sort -n  
    
Now run the script. It will show the number of messages sent by country code.  
 
Now run the script. It will show the number of messages sent by country code.  
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,250

edits

Navigation menu