1. Check if SendMail is installed:
Rpm-qa | grep sendmail
2, yum-y install SendMail installation
Yum-y Remove SendMail Uninstall
3. Start SendMail Service System:
/etc/rc.d/init.d/sendmail start-bd-q12h
The parameters followed are explained below:
-B: Set the SendMail service to run in the background.
-D: Specifies that sendmail run as daemon (daemon).
-Q: Sets the message to be saved in the queue when SendMail cannot successfully send the message, and specifies the save time. The above 12h means reserved for 12 hours.
4. Check the SendMail status
/etc/rc.d/init.d/sendmail status
5, Configuration SendMail
SENDMAIL.CF configuration syntax is difficult to understand, general information on the use of the M4 macro handler to generate the required SENDMAIL.CF files (using the M4 compiler tool is generally not easy to make mistakes, but also to avoid some security vulnerabilities of macros to the server damage). Its configuration file is located in/etc/mail/sendmail.cf, and a template file is also required during the creation process, and Linux comes with a template file located in/ETC/MAIL/SENDMAIL.MC. Therefore, it is possible to modify the SENDMAIL.MC template directly to achieve the purpose of customizing the sendmail.cf file, without having to go to the hard-to-understand configuration commands. The configuration steps are:
First step: Generate the SENDMAIL.CF configuration file with template file Sendmail.mc and export it to/etc/mail/directory, using the command behavior:M4/ETC/MAIL/SENDMAIL.MC >/etc/mail/ SENDMAIL.CF
Step two: command line restart SendMail
/etc/rc.d/init.d/sendmail restart
6. Create new email account
AddUser maila-p Pass
7. Limit individual user mailbox capacity
If the user's message capacity is unlimited, the server's hard disk is overwhelmed. This can be accomplished by using the mail quota feature: Because the e-mail staging space is located in the/var/spool/
Mail directory, so just set the maximum amount of space that each mail account can use in this directory by using a disk quota.
8, Linux under the establishment of mail server six, single user set multiple e-mail address (has been tried, but failed to verify the right and wrong)
Use aliases (alias) to solve this problem. Aliases are one of the most important features of SendMail. It is defined in the aliases text file, where the location of the aliases file is specified by SENDMAIL.CF and is typically located in the/etc directory. For example, we established the Maila user to have 2 e-mail address:[email protected] and [email protected], you can set:
First, add an account MAILC, then use the Linux text editor to open/etc/aliases, add: Dearpeter:mailc and truepeter:mailc These two command lines, and then run the newaliases command in the command window, To require SendMail to re-read the/etc/aliases file. If it is correct, a response message appears indicating that the configuration was successful. This allows you to use 2 addresses to send letters to MAILC, while MAILC can receive all messages sent to the above 2 addresses with just one account.
9. POP3 server (not yet walk through here)
1. POP3 (IMAP) Server Installation
First step: Use the following command line to check if the system is installed:
Rpm-qa | grep IMAP
Step two: Insert the 2nd installation disc and start the installation using the following command line:
[[email protected] root] #cd/mnt/cdrom/redhat/rpms
[[email protected] root] #rpm-IVH imap-2001a-18.i386.rpm
2. Enable POP3 (IMAP) service
POP3 Service: Please modify the/etc/xinetd.d/ipop3 file first, the "Disable=yes" to "Disable=no" after the save, and then restart the XINETD program to read the modified configuration file to make it effective:
[Email protected] root]#/etc/rc.d/init.d/xinetd Reload
The steps to start the IMAP service are the same as POP3, except that the IMAP configuration file is/etc/xinetd.d/imap.
Installation of the SendMail server