1, download the latest version from www.sendmail.org (this snedmail is necessary to upgrade to the latest version, because its upgrade is mainly a security vulnerability issue). This is a description of the sendmail-8.12.2.tar.gz.
3. Download the file to:/USR/LOCAL/SRC
4, Tar zxvf sendmail-8.12.2.tar.gz
6, chmod go-w//etc/etc/mail/usr/var/var/spool/var/spool/mqueue
7, Chown root//etc/etc/mail/usr/var/var/spool/var/spool/mqueue
9, SH Build
11, the establishment of document SENDMAIL.MC content as follows, you can modify the corresponding parts as needed.
DNL this are the macro config file used to generate THE/ETC/SENDMAIL.CF
DNL file. If You are modify Thei file you'll have to regenerate the
DNL/ETC/SENDMAIL.CF by running this macro config through the M4
DNL M4/ETC/SENDMAIL.MC >/ETC/SENDMAIL.CF
DNL you'll need to have the SENDMAIL-CF Pacage installed for this to work.
Include ('/USR/LOCAL/SRC/SENDMAIL-8.12.2/CF ')
Define (' confdef_user_id ', ' 8:12 ')
OSType (' Linux ')
Undefine (' Uucp_relay ')
Undefine (' Bitnet_relay ')
Define (' Confto_connect ', ' 1m ')
Define (' Conftry_null_mx_list ', true)
Define (' Confdont_probe_interfaces ', true)
Define (' Procmail_mailer_path ', '/usr/bin/procmail ')
Define (' Smart_host ', compaq.rd.xxx.com)
<---This is for (non-hub) default use hub to send mail
Masquerade_as (' rd.xxx.com ')
FEATURE (' Masquerade_entire_domain ')
<---These three are used for email address camouflage
FEATURE (' Masquerade_envelope ')
FEATURE (' Smrsh ', '/usr/sbin/smrsh ')
FEATURE (' mailertable ', ' hash-o/etc/mail/mailertable ')
FEATURE (' virtusertable ', ' hash-o/etc/mail/virtusertable ')
FEATURE (' access_db ')
FEATURE (' blacklist_recipients ')
FEATURE (' Accept_unresolvable_domains ')
DNL We strongly recommend to comment this one out if you want to protect
Dnl yourself from spam. However, the laptop and users on computers
DNL not hav 24x7 DNS does need this.
DNL FEATURE (' relay_based_on_mx ')
12, SH build INSTALL-CF
13, Groupadd Smmsp
14, Useradd Smmsp
15. CD Cd/usr/local/src/sendmail-8.12.2/sendmail
16, SH Build Install
18, SH build clean
19, SH Build all
20, SH Build Install
22, add MX record in the domain DNS master database file:
rd.xxx.com. In MX 0 Compaq
Note that the corresponding section is modified. That 0 is used when there are several mail concentrator to mark the order. When there are several MX, the recommended sequence is written as 10, 20, 30 ...
23. Create an Access file in the/etc/mail directory, similar to the following:
Then: Makemap Hash access.db < access
24, the creation file/etc/mail/local-host-names, its content for this machine has domain name information.
25, create file/etc/mail/aliases, similar content:
Run newaliases to create the database.
One of the meanings of creating an alias file is when the message is sent to a user of another mail server in the domain rather than to the mail hub user.
For example, add a line:
Causes the message to be forwarded automatically to email@example.com when it is sent to the mail hub
26, start SendMail:/usr/sbin/sendmail-bd-q30m
Error: If there is a problem that does not start, most of the problems are related to DNS configuration and you can use Nslookup to check DNS for normal. Checking the contents of the/etc/mail in a row is also a good way to arrange mistakes. In addition, modifying the configuration does not recommend directly editing the sendmail.cf file, it is recommended that you use the M4 Macro compilation tool, because some security vulnerabilities or outdated macros are prompted at compile time, so as to avoid related security issues.
Through the above article, we should know how to install the SendMail server under Linux, I hope to help you!