Detailed configuration of SendMail in linux

Source: Internet
Author: User
Tags imap mx record
Article Title: detailed configuration of SendMail 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.

1. Install Related Services
DNS
Mailserver (sendmail, imap)
2. Start Related Services
Service named restart
Service sendmail restart
Service xinetd restart
Chkconfig ipop3 on
3. Configure DNS and add MX records
Configure DNS
Add an MX record to the forward/reverse interval File
In mx 10 (priority) mail.anniey.com
Mail in a 192.168.1.100
4. Main configuration file
/Etc/mail/sendmail. cf
Search/smtp
Port = smtp, Addr = 192.168.1.100
5. Accept the domain configuration file
Vi/etc/mail/local-host-names
Add
Anniey.com
192.168.1.100
6. Relay forwarding configuration file
/Etc/mail/access. db (inaccessible)
Vi/etc/mail/access
Add
Anniey.com
192.168.1
Exit
Makemap hash access. db <access
6. Add a user
Useradd user01
Passwd user01

Useradd user02
Passwd user02
7. Restart the service
Service sendmail restart
Service xinetd restart

Supplement: email user alias and email domain alias
A) User alias
1. Vi/etc/aliases
Alias Username
A01 user01
A02 user02
Exit
2. Newaliases

B) email domain alias
1. Configure related DNS
2. Add a domain alias
Vi/etc/mail/sendmail. cw
Anniey.com
Johnny.com
Exit
3. Accept the domain configuration file
Vi/etc/mail/local-host-names
Anniey.com
Johnny.com
192.168.1.100
4. Restart the service
Service named restart
Service sendmail restart
Service xinetd restart

Supplement: Enable smtp authentication
1. Install related modules
Rpm? Qa | grep sasl
Linux: RedHat-> RPMS-> sasl *
2. Modify/etc/mail/sendmail. mc (source code of sendmail. cf)
Vi/etc/mail/sendmail. mc
Query: 43 TRUST_AUTH *
: 44
: 85 DAEMON_OPTION *
: 92 DAEMON *
Note: Remove dnl (note)
3. Generate sendmail. cf
M4 sendmail. mc> sendmail. cf
4. delete some relay to avoid opening a backdoor
5. Client
My server requires authentication

After the preceding steps, you can use Outlook Express to send emails normally. However, you cannot use Outlook Express to receive emails from the server, because sendmail does not have the POP3 function by default, we have to install and enable it on our own.
1. Install the pop3 Service
Rpm-qa imap
Imap-2001a-18
Rpm-ivh imap-2001a-18.i386.rpm
2. Enable the POP3 service.
POP3 Service: Modify/etc/xinetd first. in the d/ipop3 file, change disable = yes to disable = no and save it. Then restart the xinetd program to read the modified configuration file and make it take effect.
/Etc/rc. d/init. d/xinetd restart

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.