Article Title: xuanjicang is hidden in the Mail User alias in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Nicknames are often derogatory. After deploying Sendmail on a Linux server, you can also give some users some nicknames. However, these nicknames are often not derogatory. The nickname of this email user hides a lot of xuanjicang, which can help the Linux system administrator solve the needs of many users.
For example, employees of a company's purchasing department should send the latest product quotation to all employees and financial personnel of the Sales Department on Monday every week. To help them make quotation and cost statistics for customers. It is obviously troublesome for purchasers to send emails to employees one by one. In fact, this can be solved by the mail user nickname.
If an employee may have maternity leave or other reasons, the employee may not be in the company for a period of time. In this case, the enterprise needs an agent to process the daily emails of the employee. For this reason, the system administrator hopes that if someone sends an email to the employee's mailbox, the email will be automatically forwarded to the proxy's mailbox. At the same time, there will still be email backup in the user's mailbox. After the employee returns, he can still view the emails sent to him during this period. This function is complicated to say. It can also be implemented by the mail user nickname.
1. What is the mail user nickname?
The Mail User nickname is also called the user alias. This alias actually comes from the Linux operating system. In Linux, you can also set an alias for some complex commands (several command sets, and so on. The next time you need to execute this command set, you only need to enter this alias. This can simplify the input by the system administrator, or enhance the memory of commands. Simply put, the mail alias can replace some hard-to-remember mail addresses with user-defined words to improve memory and simplify input.
Ii. Typical use of Mail User nicknames.
So what is the role of the Mail User nickname? I will analyze some of my requirements with you. You can use this document to make it practical.
1. Let the sales manager see all emails sent from the customer to the salesman. When I used to deploy the Sendmail mail server for an enterprise, their sales director raised a requirement. They asked the customer to send all emails to the salesperson and forward them to the sales manager and sales director. Assume that the sales manager's email address is a justin@abc.com, and a salesman's email address is a abey@abc.com. Now the enterprise wants to send the mail to the abey@abc.com mailbox at the same time to the justin@abc.com. What should I do now? In fact, this can be handled by alias. For example, we define user abey as justin. When an email is sent to the abey mailbox, the email is automatically sent to justin.
2. Easy mass mailing. For example, the procurement department needs to send product quotations every week. Each buyer needs to send the latest product purchase price to all employees and financial personnel of the Sales Department on Monday. So that they can quote the customer at the latest price and calculate the product cost. If the nickname is not used, the user must enter or select the email address of the relevant personnel one by one, and then send the email. Obviously, this manual selection of email addresses is easy to omit, and the selection efficiency is also slow. What are other faster methods? In fact, it can be solved by the mail nickname. Assume that a buyer needs to send the Product Quotation email to 10 employees. Then the system administrator can give the mail address of the 10 employees take the same nickname, such as price@abc.com. Then when the user sends the quotation information, just need to send the mail to the price@abc.com this mailbox. In this case, the email server determines that this is an alias and forwards emails to the mailboxes of the 10 employees one by one. Many enterprises have this requirement. For example, I have a friend who serves as a cashier at a branch of a group company. Every Friday, she needs to send the cash receipts and expenditures for this week to the financial managers, general managers, group cashiers, and financial directors of their subsidiaries. At that time, their system administrators did not use the Mail User nickname to manage emails, nor did they use other measures, such as groups. Each time you send an email, you must select the email address one by one. I have some relationships with their system administrators. At an accidental opportunity, he suggested that the mail user nickname be used to send mails to the group. He was inspired by it. This content is implemented after you go back. As a result, they were also well received by the company and its employees. It can be seen that using the nickname of the Mail User to implement mass mailing is a very practical function.
3. Use the mail nickname to forward emails of individual users. For example, an employee of an enterprise has received three months of maternity leave. During the three-month holiday, the company asked another employee to handle his/her related business. Therefore, we need to forward the employee's email to another employee so that the employee can handle the relevant business and avoid unnecessary losses to the enterprise. What should I do now? In fact, this is easy to implement in the Sendmail mail server. Assume that the employee's email address for maternity leave is a justin@abc.com, and its proxy's email address is a abey@abc.com. Now the system administrator only needs to forward all justin emails to the abey address. In this case, you only need to give the email address justin an abey nickname.
However, sometimes this requirement is more complex. In the preceding example, the same email server (with the same suffix) is used ). However, sometimes the email server needs to be forwarded differently. If an employee is transferred from a branch to another branch, it may need to handle some original business. Therefore, you still need to view related emails within a period of time. Because the mailbox server is different at this time, the above nickname cannot be used to solve the problem. In this case, you need to use the Pipeline character in the Linux operating system to achieve this requirement. If you can use justin: '| sendmail abbey@bcd.com ". In the preceding command, the | symbol is the pipeline character of the LInux operating system. The function is to convert the results output by other applications to the data input by another application. The above processes commands with pipeline characters as the nickname of an email, which is a relatively advanced application. If you want to forward emails to different email servers through the Mail User alias, you must use the linux operating system's pipeline operator to define the alias.
4. Use the email user alias to restrict some users from accepting emails. For example, I often define the alias root:/dev/null on the Linux email server. What is the role of this? First, we all know that the root user is a privileged user in the Linux operating system and has high permissions. Normally, there is no hard disk space limit. If an attacker sends a spam to the root user, the user will continue to receive the email until it occupies all the hard disk space. This will cause obstacles to the normal operation of other users to receive emails or email servers. Therefore, when deploying a Linux server, you often need to take special care of this privileged user, such as rejecting it to receive any emails. And/dev/null is probably familiar to everyone. This command ignores any input. So what will happen if I define the root account alias as/dev/null? In this case, any emails sent to the root user will be ignored by the email server. That is to say, the root account cannot receive any emails. I finally stressed that some special accounts in Linux, such as the root account, cannot receive any emails, this is very helpful for protecting the security of the mailbox server. It can prevent privileged users from occupying a large amount of hard disk space due to the absence of hard disk capacity restrictions, thus causing usage failures for other users.
[1] [2] Next page