RedHatAS3 install Apache + Sendmail + OpenWebMail notes

Source: Internet
Author: User
Tags imap
RedHatAS3 install Apache + Sendmail + OpenWebMail notes -- Linux Enterprise Application-Linux server application information. For details, see the following. I used to install Apache + Sendmail + OpenWebMail notes on RedHatAS3. A friend asked me a few days ago before I remembered that I had not sorted out the notes, this article has been tested several times on RedHat9 and RedHatAS3up3 (tested on Redhat9 before sorting). My younger brother has just started to use Linux and has provided many online qmail tutorials but not many sendmail courses, this tutorial is also intended for cainiao like me to make slight changes to the Intranet, but also for small and medium-sized enterprise mail servers. I personally feel that sendmail is enough for mail from dozens of companies, please do not laugh at me.
Note: before installing the system, you have DNS resolution for the domain name of the current email server, and the MX and A records have been completed.
Several Parts

Part 1 goals: Install sendmail-8.12.11 and imap to enable normal sending and receiving on the Intranet

1. Install Sendmail-8.12.11 RPM RedHat AS3up3 system comes

Check two packages # rpm-qa | grep sendmail

Sendmail-cf-8.12.11-4.RHEL3.1

Sendmail-8.12.11-4.RHEL3.1
2. In order to quickly generate the sendmail. cf file with m4 tool later, or install a M4 tool # rpm-ivh m4-1.4.1-13.i386.rpm
3. Now, manually modify/etc/mail/sendmail. cf.

Set O DaemonPortOptions = Port = smtp, Addr = 127.0.0.1, Name = MTA
Changed to: O DaemonPortOptions = Port = smtp, Addr = 192.168.1.61, Name = MTA
After saving, restart the sendmail service # service sendmail restart

Disable sendmail? [OK]

Disable sm-client? [OK]

Start sendmail? [OK]

Start sm-client? [OK]
4. edit/etc/mail/local-host-names and add it to our domain name # vi/etc/mail/local-host-names

// Add
Smartdigit.com.cn ------ my domain name

Mail.smartdigit.com.cn ------- my mail server name
// We can send emails using two names later
One is the user name @ domain name like: chenzq1604@smartdigit.com.cn
Another is the user name @ host name such as: chenzq1604@mail.smartdigit.com.cn

5. Save and test whether it is successful # sendmail-bt

Address test mode (ruleset 3 NOT automatically invoked)

Enter ;;

>;$ = W

Mail

Smartdigit.com.cn

Localhost. localdomain

Localhost

[127.0.0.1]

// Press ctrl + d to exit
Test that the MX forwarding record of our domain DNS is not: # host-t MX mail.smartdigit.com.cn
Mail.smartdigit.com.cn. mail is handled by 10 mail.smartdigit.com.cn.
6. Now we can send emails, but we cannot accept them. We can use the imap package to receive pop3 and imap emails.
Now let's check whether IMAP is installed # rpm-qa | grep imap

Imap-utils-2002d-9

Imap-2002d-9
#
7. enable the system to automatically start the email system and run the ntsysv command.

Select imap, ipop3, sendmail, and httpd, and restart the computer.

8. Modify the/etc/mail/access file,

Add the port 25 of the server to allow sending mails from the Intranet and within the company. I configured the # vi/etc/mail/access

Localhost. localdomain RELAY

Localhost RELAY

127.0.0.1 RELAY

192.168.1 RELAY

Smartdigit.com.cn OK \ ----- indicates unconditional acceptance

163. com RELAY \ -------- allow 163.com proxy delivery

Nfbuy@nfbuy2004.com REJECT \ -------- indicates REJECT and publish error messages

SpamXXX.net DISCARD \ discards spamXXX.net spams and does not publish error messages
// This is only to ensure that the Intranet can be sent, if it is the Internet, you need to add the corresponding domain name, such as to the chenzq@tom.com to add the corresponding tom.com RELAY
After editing, set it to a db file:

# Makemap hash access. db <access

9. Test whether smtp and pop3 are normal. I use the default ports 25 and 110 # telnet 192.168.1.61 25.
Trying 192.168.1.61...
Connected to 192.168.1.61.
Escape character is '^]'.
220 localhost. localdomain ESMTP Sendmail 8.12.8/8.12.8; Tue, 21 Dec 2004 12:59:26 + 0800
Quit
Connection closed by foreign host.

# Telnet 192.168.1.61 110
Trying 192.168.1.61...
Connected to 192.168.1.61.
Escape character is '^]'.
+ OK POP3 mail.smartdigit.com.cn v2001.78rh server ready
Quit
+ OK Sayonara
Connection closed by foreign host.
Quit
In this way, you can freely send and receive emails in the Intranet. Now we are sending and receiving emails on the WEB.

Part 2 goals: to install WebMail, you can use a browser to send and receive emails and use a network hard disk.

I have used most WebMail front-ends such as igenus and ynmail, and I don't feel good about OpenWebmail.
Install Apache first.

1. RedHat AS3up3 system comes with Apache 2.0.46-38, rpm-ivh httpd-devel-2.0.46-38.ent.i386.rpm

Rpm-ivh httpd-2.0.46-38.ent.i386.rpm
2. The newly installed apache cannot be started. You need to add the server name to the/etc/httpd/conf/httpd. conf file.

Find ServerName

Replace ServerName mail.smartdigit.com.cn: 80
Modify the performance parameters to enable the keep connection function to accelerate client access:
Find KeepAlive Off
Change to KeepAlive On
There are also some parameters depending on your personal situation,
MaxClients 150 -------- maximum number of connections at the same time,
ServerAdmin chenzq@smartdigit.com.cn ------- changed to the mailbox of network management, I changed to my own mailbox
Timeout 300 ------- disconnected after 300 seconds without response

Restart httpd service [root @ asup3 mail] # service httpd restart

Stop httpd? [OK]

Start httpd? [OK]
3. Install Openwebmail first.

RedAS3 users can go to http://openwebmail.com/openwebma... rpm/packages/rhel3/

RedHat9 users can go to http://openwebmail.com/openwebma .. t/rpm/packages/rh9/

Below downloadperl-CGI-2.81-88.i386.rpm

Perl-CGI-SpeedyCGI-2.21-RH9.i386.rpm -------- in the optional subdirectory that gives the rh9 directory above

Perl-Compress-Zlib-1.21-RH9.i386.rpm

Perl-Text-Iconv-1.2-RH80.i386.rpm
Go to http://openwebmail.com/openwebma... 1-200412316i386.rpm to download the program and install it.

4. Update the openwebmail script # speedy_convert.
Converting suidperl to speedy_suid...
Done
Modify the/var/www/cgi-bin/openwebmail/etc/defaults/dbm. conf file dbmopen_ext none

Changed:

Dbmopen_ext % dbm_ext %
Change the default domain name at the first run:

Modify: vi/var/www/cgi-bin/openwebmail/etc/default/openwebmail. confdomainnames \ xxx.com.cn ---------- the domain we applied?

Smtpserver \ XXX. X ------------- IP address of the server

Smtpport 25 \ ------------- smtp end?
5. Run the initialization script #./openwebmail-tool.pl -- init

Welcome to the Open WebMail!

This program is going to send a short message back to the developer,
So we cocould have the idea that who is installing and how many sites are
Using this software, the content to be sent is:

OS: Linux 2.4.21-8smp i686
Perl: 5.008
WebMail: Open WebMail 2.41 20041220

Send the site report? (Y/n) y
Sending report...

Thank you.
6. now you can send and receive emails normally, but the default English version for starting the webpage is difficult for some uncles. Openwebmail supports many languages and supports dozens of languages, it's so nice to have a large number of styles in each language! And updated very quickly when I installed it or the openwebmail-2.40-20040830.i386.rpm package is now 2.41-20041220 packages, during which dozens of packages have been updated almost the first two days of a package.

Modify/var/www/cgi-bin/openwebmail/etc/openwebmail. conf

Find default_language auto
Change to default_language zh_CN.GB2312.
Click default_iconset Default if the icon is still in English format.
Change? Default_iconset Cool3D. Chinese. Simplified
In this way, your interface and all buttons are in simplified Chinese. For other modifications, see the main website of OpenWebMail.

Enter http: // 192.168.1.61/cgi-bin/openwebmail. pl in Firefox. the main interface will appear. Note that you cannot use root to log on.

The entered address is too long. Because Apaher is dedicated to MailServer, modify it,

Vi/etc/httpd/conf/httpd. conf
In ScriptAlias/cgi-bin/"/var/www/cgi-bin /"
Add ScriptAlias/"/var/www/cgi-bin/openwebmail. pl"
After the service is restarted, enter the home page and find that the icon cannot be found. Remember that the icon directory has not been mapped, and add "Alias/data"/var/www/data"
Haha, I finally saw the interface. I will post the authentication and anti-virus solutions tomorrow.
Related Article

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.