Linux sendmail configuration details 4 Optimization

Source: Internet
Author: User
For details about sendmail configuration in Linux, see article 4 Optimization-Linux Enterprise Application-Linux server application. For details, refer to the following section. 1. Email Forwarding speed

2. Mail size

[Root @ tpwb mail] # vi sendmail. mc

....
Define ('ucp _ MAILER_MAX ', '000000') dnl default value: 5000000 (2 M)
....

3. mail alias

I haven't figured it out yet. Please tell me if you know it. Thank you.

4. Set Group Sending

[Root @ tpwb mail] # vi sendmail. mc

Join anywhere to start multiple message queues for better Transmission Performance

Define (QUEUE_DIR, '/var/spool/mqueue/q *')

In addition, create any number of queue directories under/var/spool/mqueue/and run:

[Root @ tpwb mail] # cd/var/spool/mqueue
[Root @ tpwb mail] # mkdir q1 q2 q3 q4 q5 q6

5. access and sendmail authentication work together to create more perfect requirements

In the previous article, sendmial has the authentication configuration. We do not need to write the RELAY email address or domain name into access. sendmail will send any email address by default, that is, we do not need to declare it, you do not need to configure the access file. However, the rational use of access allows us to better prevent spam or unwanted emails. If you do not want to accept @ 126 mail, you only need the following Configuration:

[Root @ tpwb mail] # vi/etc/mail/access

# Check the/usr/share/doc/sendmail/README. cf file for a description
# Of the format of this file. (search for access_db in that file)
# The/usr/share/doc/sendmail/README. cf is part of the sendmail-doc
# Package.
#
# By default we allow relaying from localhost...
Localhost. localdomain RELAY
Localhost RELAY
126. com DISCARD add 126.com

[Root @ tpwb mail] # makemap hash access. db <access

[Root @ tpwb mail] # service sendmail restart
Shutting down sendmail: [OK]
Shutting down sm-client: [OK]
Starting sendmail: [OK]
Starting sm-client: [OK]

Then test whether the email cannot be sent to the mailbox of 126!

Now we can understand the working process of the sendmail mail server with authentication

1. If the received email is from the local region (@ tpwb.cn), run 2. If not, (@ 126, @ sohu.com, etc.) in access to check whether the email is restricted. Run 2 if it meets the requirements,

2. Are sasl authenticated accounts and passwords correct and valid. Yes.

6. automatically run sendmail at startup

[Root @ tpwb mail] # ntsysv
Related Article

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.