Sendmail configuration in Linux environment (1)

  
                              




The most popular application on the Internet is E-mail service. Sendmail is a software package that comes into being as a mail transmission standard. We briefly discuss the configuration of sendmail in a Linux environment.

First, SMTP
When it comes to mail transmission, you can't help but mention the Simple Mail Transfer Protocol (SMTP), which is the established standard for transmitting mail on the Internet. It is a connection-oriented protocol, defined in The way to transfer mail on the Internet. This means that as long as both ends of the communication can correctly understand the SMTP protocol, communication can be performed regardless of the hardware platform at both ends and the client program being run.

II. About MX records
When configuring a DNS server, one type of MX record in the DNS configuration file is the mail exchanger record, which lists the list of hosts that can receive mail for it. When the SMTP client sends a message to another host, the client first finds the MX record, because the host in the MX record is prioritized, so the client sorts the host according to the priority provided in the MX record, and then Send in order of priority.

Third, on the mail header
The address of the mail header in sendmail is not the same as the envelope address we usually use. Please understand this before setting up sendmail, because the mail router does not process them. the same. Sendmail is set here as an envelope format. The envelope contains only one recipient's address, and all recipient's addresses are included in the header of the email, so that the specific distribution task is handed over to the mail sender to complete. . Allow aliases in the address, you can send the mail to a group of people whose alias is myfriends, myfriends can include tom, rose, sally three people, the address of the mail header only points to the alias myfriends, and sendmail will expand this alias and Generate an envelope containing everyone.

Fourth, sendmai alias file
When sendmai always processes the mail to check whether the address of the recipient is an alias, and in fact the alias is often used, so the alias file is compared important. The format is as follows:

name:name1,name2,... ,namex (Note: x is a number.)

The name on the left is an alias, and the name replaced by the alias is in the colon. On the right. In fact, the name to the right of the colon can also be an alias. The format is as follows:


name:name1,name2,... ,namex
name1:tom
name2:rose,sally
: :
namex: Jack, mary, ben

sendmai will constantly parse these names until they are parsed into a real username. In addition, the username to the right of the colon can be replaced with a remote hostname.
Sometimes the list of user names on the right side of the colon needs to be changed frequently, causing unnecessary trouble to the administrator. At this time, you can use the :include: command to specify an alias list file and place it under the control of the user.

The format is as follows:

name::include:/home/aliase/name.aliases
and the file /home/aliase/name.aliases contains name1, name2,.. . . , namex.
At this time, its role is the same as name:name1, name2,..., namex.

Copyright © Windows knowledge All Rights Reserved