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
2 comments:
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.
Can you check if your ISP is blocking port 25?
Post a Comment