KnowledgeBase Glossary    Contact Us
Browse by Category KnowledgeBase .: Email Related Issues .: How can I search the mail log on my VPS?

How can I search the mail log on my VPS?

The default location for the mail log is /var/log/maillog on your VPS. By default, you will also have archived maillog files with the name of /var/log/maillog.1, /var/log/maillog.2, /var/log/maillog.3 and /var/log/maillog.4.

Finding specific text in a file can be faster if you look at these files in a shell prompt. Use a command like:

less /var/log/maillog

to view the file and search with the following key combination:


where "searchtext" is the actual text you are searching for. Hitting the '/' key and then hitting the Enter key while in search mode goes to the next instance of that text. Hitting the 'q' key will exit from less.

You can also search for specific text in a file. A command like:

cat /var/log/maillog |grep searchtext |less

will bring up a list of all lines with the string "searchtext" in the file /var/log/maillog and place that information in less.

For more information on cat, less, and grep use the "man" command. For instance, to find more information on the grep command type:

man grep

If you do not wish to log into a shell prompt you can also view files in the File Manager in the control panel. The File Manager will not open files if they become too large and does not allow you to search for text within the file.

How helpful was this article to you?

Related Articles

article What is robots.txt?
One way to limit what files and directories a...

(No rating)  3-20-2006    Views: 5729   
article How do I delete mail from my address without moving it to the trash folder?
If you are out of disk space for your...

  1-4-2006    Views: 10151   
article Why does AOL treat mail forwarded from Advantagecom servers as spam?
It has come to our attention that several AOL...

  6-27-2005    Views: 8585   

User Comments

No comments have been posted.

.: Powered by Lore 1.5.4
Copyright 2005-2014 Advantagecom Networks, Inc. - Xen Linux Virtual Private Servers (VPS) - Paypal Accepted