
The mutt is not just an email client, it is also very useful in bash script. mutt’s CLI (command line interface) parameter can be called and execute without starting the email client interactively, ideal to run it within bash script to send email. mutt is also able to control from config file, ~/.muttrc, with a rich feature set waiting to harness. Below is one of the possible way to send email with attachment, one or multiple, in a bash script :
Read More »

Epoch dates are seconds started from 1st January, 1970. It is a common date and time representation, especially in unix and linux world. It provides a way to convert time stamp in a much easier way for programming calculation, an integer. Below are one of the way to convert epoch timestamps to a readable format :
Read More »

bash script read a file word by word rather then line by line. That means if you have a file with the below contents :
<start of file>
The quick brown fox jumps over the lazy dog
<end of file>
and you read & display it using :
for reading in $(cat /some/directory/some-file);
do
echo $reading;
done
The output would be :
<start of output>
The
quick
brown
fox
jumps
over
the
lazy
dog
<end of output>
instead at time we want it to display :
<start of output>The quick brown fox jumps over the lazy dog<end of output>
That sucks. As there is a lot of time we need bash to read the file line by line instead of word by word. Fortunately, we are using open source. Our predecessors have predicted the monkeys would step on this tragedy banana skin. Below are some solutions to let bash read a file line by line rather then word by word :
Read More »

Commonly, changing network interface IP, subnet mask or DNS used to be on GUI (Graphical User Interface). But they will be times it needs to be done on CLI (Command Line Interface). e.g. the windows manager fail to start, window manager does not provide a GUI to change it, it is a server and no GUI allowed to free up more resources or Just For Fun.
The instructions below attempt to configure eth0 for auto IP assignment from a DHCP (Dynamic Host Configuration Protocol) server. It is tested on Ubuntu and will most likely do fine on debian based distribution :
Read More »

telnet is a Swiss army knife for troubleshooting layer 7 application problem, especially useful on smtp & pop3 protocol.
Scenario 1 :
to test is our domain is being block by recipient domain, using telnet on our email server to send email on recipient email server.
Scenario 2 :
a quick test on error occurs sending email, using email client, such as thunderbird, apple mail, opera mail & others, using telnet.
Read More »

telnet has a lot of weakness compare to ssh. Most notably would be it transmits in plain text across the network, which everyone can look at it as long as one can tap into the line. Still, it is very much useful in trouble shooting application layer problems, e.g. http, smtp, pop, ftp, irc & others.
This post attempt to demonstrate how to use telnet to trouble shoot pop3 protocol problems. Or even better, use telnet to read email on port 110.
Scenario 1 :
Often, when email client such as thunderbird, apple mail, opera mail & others, fails for some reason and its error message indicate that error occurs during communication with the server. But calling the server hosting administrator and they claim that the server is working fine.
Scenario 2:
The machine that we used does not belongs to us. Setting up an email account on it would certainly post security issue to our email account. But then, we just wanna find out what email messages have inside our mailbox. Probably, just wanna read a few lines of the mail message.
Read More »

sed is extremely helpful in search & replace text, in file & variables. Often we need to construct a list of strings together with variables. But the normal usage of sed :
e.g.
sed -e 's/text-to-search/string-to-replace-$variable-name/g'
will only replace the variable $variable-name literally rather then the pre-define value. After meddling with a few more stuff, the problem lies on …
Read More »

Another reason to use open source software. If you have just got yourself a Dell laptop and want to monitor the system fan, temperature, processor speed & other stuff, you’re in luck. The open source community have come out with a piece of excellent utility to do the job. Better, the utility is able to control the fan speed. Means, you can set it to spin maximum or even off it. Here’s how to do it :
Read More »

After some brief hiccups on fluxbox customization, some of you might be asking how to bind those volume keys (or other keys of that matter) into fluxbox. Wait no more, here it is :
Read More »

Fluxbox is a extremely lightweight window manager that not only require little resource (compare to the resouce monsters KDE & GNOME), it also allow one to customize almost every aspect of it. It also allow changes on skin to reflect a much more customized desktop interface. Due to its nature, customization on it is quite straight forward. All the config files are stored at ~/.fluxbox/ directory. Fluxbox also have its own wiki which list every aspect of its feature customizable.
After editing the config files at ~/.fluxbox/, one just need to right click on the desktop (any empty space) and click on “Restart“. It will re-launch the desktop and the changes are present. But on fluxbox version 1.0.0, after editing the keys config files at ~/.fluxbox/keys, the left click of the mouse stop working.
Read More »