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

4 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?

Editor said...

Thank you for sharing such a wonderful Information !!
Here is a list of Top LINUX INTERVIEW QUESTIONS

Veritas Cluster Interview Questions

Redhat Cluster Suite Commands

SAMBA Server Interview Questions

Linux FTP vsftpd Interview Questions

SSH Interview Questions

Apache Interview Questions

Nagios Interview questions

IPTABLES Interview Questions

Ldap Server Interview Questions

LVM Interview questions

Sendmail Server Interview Questions

YUM Interview Questions

NFS Interview Questions

Tcpdump Command Examples & Usages

Example of YUM Commands

Read More at :- Linux Troubleshooting

historypak said...

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