In Linux, you can view the statistics of incoming and outgoing E-mails by peeking into a log file called maillog (typically found in /var/log directory). Maillog provides the general information about the mails, for example, the sender and recipient(s), status – sent, rejected, bounced etc. I typically use maillog to check the destiny of mails. At times, it becomes difficult to spot a particular mail due to the sheer volume of mails being logged – especially on a production mail server.
For example: what if we need to check whether a particular mail sent by Person A has been delivered to Person B. Note that Person A might be sending lots of mails to Person B but we need to spot that one particular mail – say the one, which was sent by Person A but did not reach Person B. The only identifier, to identify a particular mail, in the maillog is the cryptic message ID. A better and more readable identifier would be the subject of an E-mail.Unfortunately, the subject of the mails is not logged, by default, in the maillog. But we can configure a mail server like Postfix to log the subject line. Read the rest of this entry »
FTP (File Transfer Protocol) is the de-facto but unsecure method to transfer files. SSH (Secure Shell) and its family of services like SCP (Secure Copy) and SFTP (Secure FTP) allows you shell (telnet like) access as well as file transfer via SCP and SFTP, securely. By “securely” I mean the data is that flows across is encrypted including the username and password. SSH is a popular protocol for shell access and file transfer in the Linux world.
So given a choice, SCP/SFTP is a better option in terms of “security”. But enabling SFTP/SCP enables, by default, shell access too. Recently for one of my clients, the requirement was to use SCP instead of FTP while blocking shell access so that no user is able to login, in curiosity, nor could execute any program/script on the server, even by mistake. All they could do is to copy files across – from their desktop to the server and vice versa. But, I could not find anything in SSH configuration that barred SSH, while still allowing SCP. Read the rest of this entry »
Recently, I carried out a Linux server upgrade for a client where I did a clean install of the latest operating system/distribution. Since it was a clean install I had to backup and note down the earlier configuration (of mail server, web server, database) and redo those changes. Mostly I preferred not to simply overwrite with the backed up configuration files. I rather documented and edited the configuration manually.
It all seemed to have gone smoothly and the new server has been up and running. But one not-so-fine day, the client started complaining that some HTML pages are not displaying properly. These were showing question marks (?) and some other weird characters. I figured out that these HTML pages were generated using Microsoft Word and had those special characters (closing quotes, double hyphens etc.). I discussed with the client that this could be a web browser problem because it is not able to use the correct character set. Read the rest of this entry »