SendMail Mail Server Quick Reference (3)

Source: Internet
Author: User
Tags add aliases config reference domain domain name access mx record
Server | Mail server This command will generate CONFIG.CF files in this directory. Then install SendMail:

[Root@email sendmail]# sh Build Install

Copy the CONFIG.CF to the/etc/mail directory and change the name to SENDMAIL.CF:
[Root@email Mail] #cp/usr/src/sendmail-8.11.4/cf/cf/config.cf/etc/mail/sendmail.cf
Create an Access file in the/etc/mail directory, which reads as follows:

127.0.0.1 RELAY
202.99.11 RELAY

This indicates that machines in the native and 202.99.11.0 network segments are allowed to forward messages through the mail server. 202.99.11 should be the IP address of the IP network segment of the local area network you have, just write the network part. For example, your users have more than one network segment, you need to set up more than one network segment can be:

127.0.0.1 RELAY
202.99.11 RELAY
200.200.201 RELAY

Then generate an easy to retrieve library file format for the Access file:

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

Create a file/etc/mail/local-host-names, whose contents are the domain name information owned by this computer, Because the server has a domain name in the above DNS configuration file: email.linuxaid.com.cn, and the MX record points to the domain name, the server has two domain names, one for email.linuxaid.com.cn and linuxaid.com.cn, so that users can make Use someone@linuxaid.com.cn to send and receive mail, so the file should contain the following content:

linuxaid.com.cn.
mail.linuxaid.com.cn.

Finally, you will create an alias database. Create a file aliases in the/etc/mail/aliases directory, which reads as follows:

Mailer-daemon:postmaster
Postmaster:root
Bin:root
Daemon:root
Nobody:root

Then build the aliases library:

[Root@email mail]# newaliases

Then, you can start the SendMail:

[Root@email mail]#/usr/sbin/sendmail-bd-q20m

You may receive the following error message at the first startup:

554 5.0.0/etc/mail/sendmail.cf:line 41:unknown Configuration Line ""
554 5.0.0/etc/mail/sendmail.cf:line 60:unknown Configuration Line ""

Don't be nervous, only need to use VI editor to delete these lines, in fact, 41, 60 and so on are blank lines. It should be no problem if you remove it and restart it later.

Five, Qpopper installation configuration qpopper is the Unix/linux environment POP3 server, the software with SendMail use. It is mainly implemented to support users to receive letters through POP3.

Create a link from/usr/mail to/var/spool/mail/:

[Root@email src]# ln-s/var/spool/mail//usr/mail

Unzip the Qpopper package:

[Root@email src]# tar xvfz qpopper4.0.3.tar.gz
[Root@email src]# CD qpopper4.0.3

Compile and install Qpopper:

[Root@email qpopper4.0.3]#./configure
[Root@email qpopper4.0.3]# make
[Root@email qpopper4.0.3]# make install

After the installation is successful, Qpopper will be installed in the directory/usr/local/sbin/directory. Set inetd start Qpopper. Edit/etc/inetd.conf, look for a line of pop content, add a # number before it, and add the following after the row:
pop-3 Stream TCP nowait root/usr/local/sbin/popper qpopper-s



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.