Linux quick run-down and how it relatest to Kerio MailServer

  1. SSH/shell
  2. Environment
  3. Commands
  4. Common Problems
  5. Troubleshooting

SSH/Shell. Kerio technical support almost always work within the Linux prompt usually connected via an SSH session. Once connected to a port, and successfully authenticated, your connection is handed over to a shell program such as "bash" or "tcsh". There are many shells, but they usually have ancestry to either "sh" (bash or korn) or "csh" (tcsh).

Linux and OSX almost always use "bash" so all work in this discussion will be done using the bash shell. Beware, some admins prefer "tcsh" (they are wrong) so they change the login to default to tcsh. This can confuse you very much if you aren't familiar with Linux.

It is not always simple to tell what shell you are using, but you want bash.

Environment. All programs in Linux/OSX/Windows run under something called an "environment." You don't see it often in Windows, but in Linux or OSX the environment is much more visible.

To see the environment, type "env" and a listing of variables and their values will be displayed. The shell spawns programs when you run them, and these programs inherit the existing environment when they run.

The environment is most important in Linux for the path variable. This is a list of directories that are checked when you type commands. For example, if /sbin is not in your path, then when you run "service keriomailserver start" it will give you an error. You would instead need to type "/sbin/service keriomailserver start" or add /sbin to your path.

Another important part of the environment in Linux is the LD_LIBRARY_PATH. Sometimes this is needed so that programs can find libraries. I will not discuss it any more, just mention it so if you see it in the future, you will know what it is.

Commands. UNIX variants use very simple commands which, when put together can accomplish a lot of things.

lsDirectory Listing
ls -l /opt/kerio/mailserver
ls -ld .
ls -ls
ls | wc -l
lessPaging utility
less /opt/kerio/mailserver/mailserver.cfg
less --help

Commands:
h               Print help screen
/      Search forwards
?      Search backwards
G               Jump to end of file
1G              Jump to beginning of file
q               Quit less
arrows, page-up, page-down all work
less does not have a "command mode" like the "vi" editor.
grepSearch utility
grep StoreDir mailserver.cfg
grep T0 */Calendar/status.fld