I just inherited this a single linux box running pop/smtp for a small office (25 users). I'm new to Linux. I think the box is running Debian GNU/Linux 5.0 as the server (this is bannered accross the screen occassionally) but not sure of the release/kernal/build etc. I need to be certain of both the server os and email linux versions in order to perform research, admin and support. Any help/pointers on how to do this is much appreciated.
3 Answers
To discover which Linux flavor you're running, type the following commands:
ls -al /etc/*release
cat /etc/*release
ls -la /etc/*version
cat /etc/*version
Depending on which Linux flavor you're running, you'll have a file that match one of above criteria, telling the Linux version. For example, RedHat has a /etc/redhat-release and Debian has a /etc/debian_version.
To see the kernel version use uname:
uname -a
To discover which mail server is running, type:
netstat -tunap | grep LIST | grep ":25"
This will show you what process is listening on the SMTP port.
Hope this helps.

- 3,120
- 23
- 25
-
+1 for using netstat to find out what's actually listening on port 25 (or anywhere else for that matter); That will come in handy for doing a preliminary audit of the system... – voretaq7 May 19 '10 at 17:32
-
"uname -a" was helpful the others were not or I don't know enough to realize it....which is entirely possible....thanks for you help – May 24 '10 at 19:02
on some systems, there is also lsb_release -a
sherry [cpbills]$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux testing (squeeze)
Release: testing
Codename: squeeze
you can also do telnet localhost 25
to read the banner for your mail server.
uname -a
will print all the uname
data, which will be your kernel, when it was built, your hostname, etc.

- 2,720
- 18
- 12
-
"telnet localhost 25" did the trick but it put me into some kind of use mode. the server is using postfix. thanks for your help. – May 24 '10 at 18:57
-
Right, you're actually connecting to the server. You can google for 'how to send mail telnet' to learn more about it. You can disconnect by typing 'quit' or using ctrl+] – cpbills May 24 '10 at 19:46
My first knee-jerk reaction is that you should speak with the powers that be and make a plan to replace this machine. It may sound extreme, but when you inherit any environment you don't exhaustively understand you have two choices: Learn it inside and out and produce documentation, or replace it with a (well-documented) system you understand fully.
Mail in particular is full of headaches and pitfalls, and in my experience a known-good, clean mail system is easier to troubleshoot than one that you inherited.
To answer your actual question:
uname -a
will give you the kernel version (and architecture) you're runningcat /etc/debian_version
will give you the Debian release namedpkg -l
will give you a list of all installed packages
Assuming the machine was built "The Debian Way" your mail (POP/IMAP/SMTP) software will show up there, as well as lots of other stuff you should be aware of.
Also take care to consider any webmail application that they have running (this may not be a Debian package, but the webmail UI usually tells you what software it is & you can poke around in the filesystem to find where it lives), and any mailing list software (majordomo, ezmlm, etc.) if they're using it.
There are also Linux Standard Base tools that give you this info (and more), but I don't know them off the top of my head, and they may not be installed on your machine anyway -- Someone else on here can probably point you at those tools.

- 79,879
- 17
- 130
- 214
-
"uname -a" and "cat /etc/debian_version" worked, but the second one gave me the info looking for which was "Debian Version 5.0.2" – May 24 '10 at 19:04
-
"dpkg -l" also worked. thanks for the other comments as well.....i would agree. thanks very much for the help! – May 24 '10 at 19:06