Secure and Efficient Web mail server in Linux

Source: Internet
Author: User
Tags imap tld dovecot perl script
Article Title: Secure and Efficient Web mail server in Linux. Linux is a technology channel of the IT lab in China. Includes desktop applications, Linux system management, kernel research, embedded systems, open source, and other basic classification services or technologies that use web browsers to send and receive emails (WebMail ), without using the client, you can easily send and receive emails as long as you can access the Internet. WebMail is an indispensable choice for users who are not familiar with the mail client or who are inconvenient to use the mail client in Internet cafes. In addition, it is difficult for some users to set pop3 server and smtp server. At this time, WebMail will show its advantages.

EbMail means that the user connects to the web server through a browser, and the program on the web server is responsible for receiving/sending emails. the user directly reads/writes emails through the browser. The emails do not actually exist on the user's computer. therefore, no matter which computer the user is using, as long as the user can connect to the network, he can read the previous and new letters. Another advantage is that WebMail is not prone to viruses caused by reading files containing viruses, nor is it possible to send a large number of virus emails to other friends and family members after the personal email system is poisoned.

I. Software Overview and download:

Email can be the most widely used network service on the Internet today, and WebMail is indispensable. In Linux, there are many MTA service software, such as Sendmail, Qmail, and Postfix, this article uses RHEL 4.0 + Postfix + dovecot + Apache + OpenWebMail to create an email system that integrates POP and WebMail functions. The following describes how to configure a Linux machine as a Web-based email system. This email system can be used in a small group or organization. Of course, if you have an Internet connection (such as ADSL) in your home, it can also remotely detect your email in a safe way.

Postfix is an excellent MTA, which is well known for its efficient and secure features. Postfix is the best MTAs in Anti-Spam or Anti-UCE in UNIX, many companies even develop anti-spam gateways Based on the Postfix code. The Anti-Spam function of MTA is to filter sessions during MTA processing. This filter not only filters the Spam Sent to itself, but also prevents itself from being maliciously used to send spam. Postfix implements all major MTA filtering technologies. Postfix is the MTA software developed by Wietse Venema under the ibm gpl protocol. Compared with Sendmail, Postfix is faster, easier to manage, more flexible, and more secure, while maintaining sufficient compatibility with sendmail. Comparison between Sendmail and Postfix is shown in table 1.

Table 1 Comparison Between Sendmail and Postfix


Advantages of Open Webmail:

Good interface, multi-language (more than 30 languages currently supported), multiple groups of icons, multiple sets of scenes, you can customize the background according to your preferences, online password change (you must remember the original password) multi-media mail display capabilities close to Outlook, automatic conversion of multiple character sets, support for HTML writing, and spell check (the number of words in the English dictionary may be insufficient) supports temporary draft storage, dynamic switching of internal code of the writing set, POP3 external mail, and mail rules (filter rules can be set) the mail "Move/copy/delete/download" function, the mailbox "Create/rename/delete/download" function, the address book, full-text retrieval, and automatic clearing of emails from the recycle bin for more than N days. Openwebmail disadvantages: Because openwebmail is written in the perl script language, the execution speed may be inferior to that of php. The OpenWebmail homepage provides software in many formats. select a suitable software package based on the Linux release version.

This document uses the rpm format.

This document sets the configuration domain name for a Linux Server: cao.net, I

P address: 192.168.1.253,

Email HOST: mail.cao.net.

All software to be installed: cyrus-sasl, dovecot, httpd, perl-Text-Iconv, perl-suidperl, perl-Compress-Zlib, and perl-CGI-SpeedyCGI. Among them, Postfix, sendmail + cyrus-sasl + dovecot + httpd + perl are installed together when the system is installed.

Download other software:
 
# Wget http://openwebmail.com/openwebmail/download/redhat/rpm/release/openwebmail-2.51-1.i386.rpm
# Wget http://distro.ibiblio.org/pub/linux/distributions/startcom/ML-4.0.4/updates/i386/perl-suidperl-5.8.5-12.1.1.i386.rpm
# Wget http://mirrors.ircam.fr/pub/dag/packages/perl-Text-Iconv/perl-Text-Iconv-1.4-1.2.el4.rf.i386.rpm
# Wget http://ftp.belnet.be/packages/dries.ulyssis.org/redhat/el4/en/i386/RPMS.dries/perl-CGI-SpeedyCGI-2.22-1.2.el4.rf.i386.rpm

Ii. Install and start postfix:

(1) Kill all Sendmail Processes
 
# Killall sendmail (stop all Sendmaail processes)
Sendmail: no process killed
# Rpm-ivh postfix-2.2.5-3.rhel4.i386.rpm

(2) Start the dovecot service process:

# Service postfix start
Starting postfix: [OK]
# Service dovecot start
Start Dovecot Imap: [OK]
Now you can use the mail server to send emails, but you cannot download the emails because dovecot in the new version of redhat Linux replaces the imap package, but it is not bound with POP3 and POP protocols. modify the configuration file below: /etc/dovecot. conf,
# Protocols = imap imap3
Protocols = imap imap3 pop3 pop3s
Auth_passdb =
Changed:
Auth_passdb = shadow
Then restart the dovecot service:
# Service dovecot restart
Stop Dovecot Imap: [OK]
Start Dovecot Imap: [OK]

(3) modify the postfix mail server configuration file:

# Myhostname = host. domain. tld
Changed:
Myhostname = mail.cao.net
# Mydomain = domain. tld
Changed:
Mydomain = cao.net
# Myorigin = $ mydomain
Changed:
Myorigin = cao.net
# Inet_interfaces = all
Changed:
Inet_interfaces = all
# Mydestination = $ myhostname, localhost. $ mydomain, localhost, $ mydomain, mail. $ mydomain, www. $ mydomain, ftp. $ mydomain
Changed:
Mydestination = $ myhostname, localhost. $ mydomain, localhost, $ mydomain, mail. $ mydomain, www. $ mydomain,
Ftp. $ mydomain
# Mynetworks = host
Changed:
Mynetworks = host

(4) Port test:

# Telnet mail.cao.net 25 (test port 25)
Trying 127.0.0.1...
Connected to localhost. localdomain (127.0.0.1 ).
Escape character is '^]'.
220 mail.cao.net ESMTP Postfix
Quit
221 Bye
Connection closed by foreign host.
# Telnet mail.cao.net 110 (test port 110)
Trying 127.0.0.1...
Connected to localhost. localdomain (127.0.0.1 ).
Escape character is '^]'.
+ OK dovecot ready.
Quit
+ OK Logging out
Connection closed by foreign host.

 

[1] [2] [3] [4] [5] Next page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.