Wednesday, January 04, 2012

Send Email from the command line in Ubuntu 11.10

To have the ability to send email from the command line, you will need to install the mailutils and postfix packages with the following commands.
apt-get install mailutils
apt-get install postfix

Now configure Postfix by running the following command.
dpkg-reconfigure postfix

There will be several options on the main screen. For me, I selected "Internet Site" and used all of the default settings. You may want to play around with other options such as "Internet with smarthost."

After configuring Postfix, test out the new configuration with the following command.
echo "test" | mail me@mail.com

5 comments:

yifang said...

Did as your post, but nothing happened. No error, no email in my hotmail account. I must have missed something.
Can you provide more detail about the configuration. All the posts say it is easy by apt-get install and done! But I never got it work. Please give more detail. Thanks a lot!
Using ubuntu 11.10 compaq Presario CQ60 laptop.

tsengf said...

Can you check if your ISP is blocking port 25?

historypak said...

i really like this article please keep it up. Hotmail Customer Service

Email Customer Service said...

awesome post and if you have any issue that is related to the mail and you have any kind of query so you can contact me because we provide the solution and answers of
the User's problems. Yahoo customer service

Lisa said...

Are you dealing with aol mail login problems ? visit askprob community to fix the problem by yourself.