Friday, February 12, 2010

How to send an email using mutt in ssh session in a Linux machine?

The process is simple.

1. install a ssh client in your machine. In a command line,
"sudo apt-get install openssh-client openssh-server"

Note: server is optional.

2. You will need a shell account. Its available for free from sdf.org. Just follow the instructions printed on the applet. After creating an account, logout from that account.

3. In the command line, type

"ssh @sdf.lonestar.org"

4. The connection will prompt for the password that you configured with the sdf account. Type it in and press enter.

5. If the password is right, you will have to configure your backspace key and then a crescent will appear and you can start typing your unix commands.

6. For sending mail, you need to open a mail client. I am using mutt. In the command line, type

"mutt"

It will open the inbox. The set of controls that are available will be listed on the top. You will have to setup the /Mail folder, just enter yes and the OS will take care of it.

7. To send a new mail, press "m" or to reply to a mail press "r". It will prompt for To: address and then Subject: After the subject, the pico text editor(may be a different editor) opens and you can type in anything you want. Then press "ctrl+o" to write it out and press "ctrl+x" to exit the editor. The screen will return to the compose mail page. Press "y" to send the message out.

You can explore about other options like adding cc, attaching a file, replying to a group, deleting the mail as you go.

Note: These steps are based on Ubuntu 9.10 OS. If there is a better option to anything I listed here, please share it in the comments field. Thanks in advance.