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


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 !!

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

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

vicky ojha said...

We provide the best service for your Kaspersky Anti-virus Software. For any issue with your Kaspersky Anti Virus, contact our Kaspersky Antivirus Support to get a quick fix for your issue. Our Kaspersky Antivirus Customer Service is open 24x7.
Kaspersky Antivirus Support

Lisa said...

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