Installing an SMTP server on Linux (Ubuntu)
Friday, September 22, 2006 11:38:39 PM
It's really simple to install an SMTP server for personal or business use on Linux (Ubuntu).
First off...open up your terminal.
Type the following command :
sudo apt-get install postfix
It might ask you for a password. If it does, simply enter your account login password.
Once all headers have been fetched and downloaded, it will ask you a few questions such as your computername (which you could make "localhost") etc...just some basic questions.
For further configuration settings, type the following into the terminal as a new command :
sudo dpkg-reconfigure postfix
And that's it...
You have your own personal SMTP server running on Linux (Ubuntu).
So you might be wondering how this could be of any use to you...or you might even be wondering how you should set up your email client to use your personal or network Linux computer to send mail via this local server.
Well...having your own SMTP server has many great advantages. It is much faster, much more reliable, and you can go back and check all log files if necessary. I primarily use this local SMTP server for the PHP mail() function which allows me to quickly and efficiently send emails via a PHP function.
If you are planning on using this with your email client such as Opera M2, Thunderbird, Outlook, whatever, simply set the SMTP host name to be "localhost" or whatever your computername is for the Linux box. It should be sending through port 25 with no secure authentication at all.
After installing this...I managed to send emails out to my Gmail and Yahoo accounts in litterally 3 seconds. No jokes. That's extremely quick.
Have fun...and feel free to post your comments here.















insidenothing # Monday, January 29, 2007 4:34:31 PM
patrick
Antonie PotgieterContrid # Monday, January 29, 2007 5:51:50 PM
I'm glad to hear that you found this article useful.
I actually have a bunch of Linux tutorials from things I figured out myself. I'll post some more here...maybe someone will find it useful.
Best Regards,
Antonie
jasw # Monday, June 18, 2007 4:37:23 PM
jasw
ApoloBetaapolobeta # Wednesday, July 8, 2009 5:37:08 AM
I think that's a great solution to me and other people in similar situations.
Thanks a lot!
pedro lomas hernandezpelomher # Monday, July 20, 2009 3:41:58 PM
A pesar de haber configurado postfix de acuerdo con las instrucciones de localhost, al enviar correos , utilizando mozilla thunderbird mediante localhost, thunderbird los da por enviados, pero nunca llegan a la direccion a la que se envian.
neha srinivasneha4488 # Saturday, February 20, 2010 9:03:02 AM
robownes # Tuesday, March 16, 2010 12:39:40 PM
Installed the postfix as you said, and had a moment of great hope. However, I soon found that I could only send to other PCs on my local LAN. All other mail servers, gmail included, rejected my mails because they were not from a "recognised" smtp server.
I would appreciate ideas on ways to get round this, if this is possible.
Robin
wichodarkblue # Tuesday, October 19, 2010 4:19:16 AM
so, I think that I have to configure the php.ini but I don't know what to do what part to configure I need your help please
Michael Lornestr8goods # Friday, January 14, 2011 2:18:12 PM
Thanks
Michael