Configure the e-mail server for Sendmail

Source: Internet
Author: User

Because sendmail is powerful and complicated to set, you cannot finish this content in an article. Let's talk about how to set up an Internet E-Mail server for a company in the example. The following settings can also be used in Large Electronic Post Office applications. However, as the number of users increases, the performance of the entire post office may decline, in this case, more in-depth settings are required.

1. Set sendmail to daemon to start


If you select the e-mail service when installing LINUX. Then, sendmail has become a waiting process to start. The so-called waiting process refers to the same as the resident memory program in the DOS operating system. After running, they listen in the background. When they need to perform services, it completes specific functions and services. In LINUX, many services are started as guard processes.

You can run the following command to check whether sendmail has been started.
Ps? Axuw | grep sendmail
If sendmail is enabled, this command displays relevant information. Otherwise, return to the command line without any prompts. If it is not started, you can start it manually.


If you want sendmail to start automatically at system startup, add the following lines of code to the/etc/rc. d/rc.net file.
 

 
 
  1. if [-f /usr/lib/sendmail ]; then  
  2. (cd /usr/spool/mqueue;rm ?f if *)  
  3. /usr/lib/sendmail-bd-qlh;echo ?n ‘sendmail’>/dev/console  
  4. fi  

2. Set sendmail. cf

Sendmail. cf is the setting file of sendmail. Generally, after the LINUX system is installed, it will automatically generate a sendmail suitable for the system. cf file, and in the sendmail.8.9.3/cf directory, there are more sendmail adapted to various systems. cf file samples can also be used to determine the applicable scenarios based on the file name. You can choose to replace the original sendmail. cf file. That is, copy them to the/etc directory to overwrite the original sendmail. cf file.
Sendmail also provides the sendmail. cf generator m4, which generates a user-defined sendmail. cf file through a series of man-machine conversations. For specific usage, read the m4 help file. We will not detail it here.

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.