Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
GeoIP
(view source)
Revision as of 00:49, 9 May 2010
15 bytes removed
,
00:49, 9 May 2010
→Tracking e-mail
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.
Unnilennium
Super Admin, Wiki & Docs Team,
Bureaucrats
,
Interface administrators
,
Administrators
3,254
edits
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Koozali SME Server
Main Page
Welcome
Releases
Testimonials
Documentation
SME Server FAQ
Volunteering
Commercial Support
Recent activities
Dashboard
Recent wiki changes
Recent bug changes
Unread Forum posts
Koozali resources
Contribs
How-To's
Forums
Bugzilla
Mailing Lists
Translations
Download
Koozali SME Server wiki
Wiki statistics
Wiki categories
Wiki Help
Koozali Wiki Help
Tools
Special pages
Printable version