Long ago wrote, accidentally turned over and then took out to see, inside the text picture has not changed, there are mistakes please forgive me
Steps:
First, about the installation of Ubuntu
Second, Ubuntu configuration lamp (Linux+apache+mysql+perl/php/python)
Third, Ubuntu+sendmail+dovecot+roundcubewebmail
Write in front:
1, online multi-choice openwebmail as a webmail example to use (also because of the reason for the imitation of bird brother mostly)
2, this article chooses the relatively simple and the popular Roundcubewebmail
3, most of the instructions and tutorials from the network, the main reference bird Brother's tutorial
http://linux.vbird.org/linux_server/0380sendmail.php Tutorials and http://www.cnblogs.com/wwufengg/archive/2012/09/28/ Ubuntu-sendmail-dovecot-openwebmail.html
First, about Ubuntu installation and update
1.1 First view Ubuntu version and update
1.2 View Ubuntu version, I use Ubuntu12.04+kde desktop, some of the display may be different from the reader
1.3 Updating the software source
1.4 Update Software
1.5 Setting up a new Ubuntu root password
1.6 Switch to the root account, if there is no VIM editor recommended to install Vim
sudo apt-get install VIM
1.7 about Ubuntu under the mail server configuration so many people are insane, more online is the CentOS under the mail service
Postfix, but SendMail is the old brand, learning SendMail can go deep
Understand the mail server and learn more.
II, install lamp
linux+apache+mysql+perl/ php/python a group of open-source software used to build dynamic Web sites or servers,
j2ee and .net Commercial software forms a three pillars, and the cost of software-developed projects is lower than
,lamp is the most powerful web site solution.
Installation phpmyadmin can help us manage mysql database
You need to use the sudo command, but be careful with your own actions
2.1
sudo apt-get install apache2 installing Apache server
To determine if the installation was successful, let's test it.
Open the browser and enter the following URL http://localhost/
If the following interface is displayed, the success
2.2 sudo apt-get install php5 libapache2-mod-php5 for installation PHP5
When you see the following information, the installation is successful
In order to test PHP, we need to give folder permissions, as follows (???? What about the pictures .... Forget, use old map, MO offense)
Create a new PHP document in the Var/www directory phptest.php, enter
<?php phpinfo ();?>
If there is a problem, restart the Apache service below
Now open the browser and look at what we just created. Enter the following URL http://localhost/testphp.php
If the following information is displayed, it indicates that PHP5 is working properly
2.3 sudo apt-get install mysql-server for MySQL service
At the time of installation, if the following interface appears, enter a new password, no skip
2.4 sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin for installation phpMyAdmin
phpMyAdmin is primarily used to manage MySQL
The phpMyAdmin here is compatible with the PHP5 that we have previously installed, if you install PHP and phpMyAdmin
Do not match, they will not work.
Select Apache2 During installation
You need to enter the MySQL password, you can enter.
2.5 Create a new document under/var/www testmysql.php test MySQL and enter the following:
<?php
$link = mysql_connect ("localhost", "root", "020511");
if (! $link)
{
Die (' Could not connect: '. Mysql_error ());
}
else echo "Mysql is configured correctly";
Mysql_close ($link);
?>
Note Replace your user name and password to save the exit.
Restart Apache server: sudo/etc/init.d/apache2 restart
The configuration is successful if the following interface appears
If there is a garbled problem, modify the CharSet encoding
Change to:
Restart the Apache2 service to refresh the interface
The introduction of MySQL will not be introduced in this article
2.6 Opening Http://localhost/phpmyadmin
Enter the root user, enter the password, the following interface shows that the configuration is successful
Third, Ubuntu+sendmail+dovecot+roundcubewebmail
3.1 Changing the native name Vi/etc/hostname
Coco.com for my host name
Rebooting the system
found that the native name has changed from Coco-system to Coco
3.2 sudo apt-get install SendMail installation SendMail
The following interface shows the installation is successful, the middle of the warning do not need to care
sudo apt-get install Sasl2-bin installation Sasl2-bin
The following screen appears, according to the prompt to change the file
Set boot auto-start as below
3.3 Next Configuration SendMail
3.3.1 first sets up route forwarding to view its own IP, which is found to be 192.168. Segment
Change/etc/mail/access set forwarding, add 192.168 segment forwarding, note RELAY to capitalize
sudo vi/etc/mail/access
sudo vi/etc/mail/local-host-names setting up a recipient domain
Change/etc/hosts Content
3.3.2 Setting the server listening range
Edit/ETC/MAIL/SENDMAIL.MC
sudo vi/etc/mail/sendmail.mc, change the listening address to 0.0.0.0 (that is, listen to all)
Generate a CF file to make it effective:
M4/ETC/MAIL/SENDMAIL.MC >/ETC/MAIL/SENDMAIL.CF
Restart SendMail Service
3.4 E-mail test:
To send mail using Telnet via port 25:
Handshake for the first time:
Sender's address:
Address of addressee:
Enter the data, and finally a new line of "." End:
Quit to exit the messaging interface:
Open your Inbox to view messages (it seems I have been living 5 days ahead of the day, unexpectedly wrote the date 25th)
3.5 Apt-get Installation Dovecot-common dovecot-pop3d to install Dovecot service, support POP3
Apt-get install DOVECOT-IMAPD DOVECOT-POP3D for IMAP and POP3 services
View 25 port with monitoring
View 110 ports being monitored
Restart the service if Port 110 is not dovecot monitored
Discovering network security restrictions from 110-port logins
Modify the 10-auth.conf file in/ETC/DOVECOT/CONF.D
Specifically See official website wiki:http://wiki2.dovecot.org/systemusers
Admins often wish to use different passwords for IMAP and POP3 than for other services (eg. SSH), because IMAP and POP3 clients often send the password unencrypted over the internet without even bothering to give u Sers any warnings. Dovecot can easily support Non-system passwords for system users.
Here Disable_plaintext_auth = no is set to No
The/var/mail/username mbox is called user ' s INBOX. IMAP protocol supports multiple mailboxes However, so Dovecot needs some directory where to store the other mailboxes. Typically they ' re stored in ~/mail/or ~/mail/directory. All of these locations is included in mailbox location autodetection. You can specify them manually with
Modify User mail Workspace
Setting: Mail_location = mbox:~/mail:inbox=/var/mail/%u
OK, test, log in successfully
3.6 Installation Configuration Roundcubemail
First, download the first roundcubemail from the official website.
This article uses the roundcubemail-0.9.5
Unzip the download package and move to/var/www, this directory does not matter, as long as it can open, follow-up connection can be
The file directory is as follows:
Open Install view installation instructions, install 7 steps, very simple
Enter the following address in the browser to open the installation interface
Check the first step and click Next to enter the second step
Modify the Product_Name for your favorite
Here you need to set the database, note the user name and password to fill out their MySQL username and password
Open phpMyAdmin, log in and create Database Roundcubemail, click Create
Then go back to the interface, set up IMAP information (here because there is no IMAP added, so the 110 port, if IMAP, should be 143 port)
Username_domain is the part after the user mailbox @
The SMTP information is set here and the port is 25
Here you need to set the temp location, create a new temp folder under/var/www/, and set the location here
Here, you need to set the log location, create a new log folder under/var/www/, and set the location here.
Set language to Chinese display, ZH_CN
Click Next, then the following screen appears, download the two files and put them in the Config folder
Click the Continue button
The following interface appears, two errors
(1)/var/www/temp and/var/www/log do not have write permissions
(2) The database does not have tables and initialization
Do not have write permissions for/var/www/temp and/var/www/log, and click Initialize database to initialize databases
Check again, if not, regenerate the two configuration files and replace the two files in the Config folder
The above settings are successful, test SMTP:
Mail is successfully received in the mailbox
Finally delete the Installer folder to prevent malicious tampering and substitution
3.7 Enter http://localhost/roundcubemail-0.9.5 to open webmail
3.8 You can create your own link to connect here
Kubuntu+roundcube build mail server (including lamp)