Set up a simple mail server in linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. Sendmail is installed by default in rh5, which means sending can be realized. If you want to receive mails in oe, you need to install the corresponding receiving service. This section introduces cyrus-imap to implement email receiving. Cyrus must be installed by yourself.
You can add 2nd and 3rd installation discs of Red Hat Enterprise Linux 5 to the optical drive. After loading the optical drive, find the following RPM package files related to the cyrus-imapd service in the Server directory of the optical drive:
2. Basic configurations of the cyrus-imapd service
The configuration files of the cyrus-imapd service include the following three.
/Etc/sysconfig/cyrus-imapd: the configuration file used to start the cyrus-imapd service.
/Etc/cyrus. conf: it is the main configuration file of the cyrus-imapd service, which contains the setting parameters of each component in the Service (IMAP, POP3, sieve, NNTP, etc.
/Etc/imapd. conf: the configuration file of the IMAP service in the cyrus-imapd service.
By default, these configuration files are basically set up. As long as the cyrus-imapd service is started, POP and IMAP services can be provided at the same time. Run the following command to start services such as cyrus.
Service saslauthd restart
Service cyrus-imapd restart
Service sendmail restart
Service xinetd restart
Chkconfig saslauthd on
Chkconfig cyrus-imapd on
Chkconfig sendmail on
Create a new user in linux, for example, system maintenance user operator
# Useradd operator
# Passwd operator: set the password. Such as test
Do not forget to set/etc/nologin in the passwd file to increase security.
Configure the cyrus Password
# Passwd cyrus
Go to the cyrus management tool
#/Usr/bin/cyradm-u cyrus localhost
"User." Is the prefix before the user mailbox that creates operator.
# Cm user. operator
In the cyradm management command line status, you can use the following command to create other folders, such as the sender, garbage bin, and draft box, for the user lbt in its mail box.
After user. lbt is created, you can use the deletemailbox command to delete the mailbox. Even the Administrator cyrus has no Permission (Permission denied ). To delete it, run the following command to grant the Administrator cyrus full control permission (all ). Then, use deletemailbox to delete the mailbox.
Setacl user. lbt cyrus all
Localhost. localdomain> quit
You can test the user:
Telnet local host 110
The login:
User operator
Pass test
You shoshould see:
+ OK Name is a valid mailbox
+ OK Mailbox locked and ready
This is successful.
Now you need to set up Sendmail to receive the mail and then send the mail to cyrus. Edit the configuration file:/etc/mail/sendmail. mc and add a line at the end of the file:
You need to restart Sendmail:
Service sendmail restart
In this case, you can set up an email address in oe and use the operator password to collect emails with test. You can compile scripts to view the system status and forward the emails sent to the root user to operator, in the crontab, set the message to be sent at every day, so that you can view the system status through oe every day at work, without a login server to view the system status. Convenience.
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.