SendmailIt is now the most popular email server. Let's take a look at howLinuxInstall the Sendmail server.
1. download the latest version from www.sendmail.org (it is necessary to upgrade snedmail to the latest version because it is mainly caused by security vulnerabilities ). This section describes how to use sendmail-8.12.2.tar.gz.
2. cd/usr/local/src/
3. download the file to/usr/local/src.
4. tar zxvf sendmail-8.12.2.tar.gz
5, cd/usr/local/src/sendmail-8.12.2
6. chmod go-w/etc/mail/usr/var/spool/mqueue
7. chown root/etc/mail/usr/var/spool/mqueue
8, cd/usr/local/src/sendmail-8.12.2/sendmail
9. sh Build
10, cd/usr/local/src/sendmail-8.12.2/cf
11. Create the sendmail. mc file as follows. You can modify the corresponding part as needed.
Divert (-1)
Dnl This is the macro config file used to generate the/etc/sendmail. cf
Dnl file. If you modify thei file you will have to regenerate
Dnl/etc/sendmail. cf by running this macro config through the m4
Dnl preprocessor:
Dnl m4/etc/sendmail. mc>/etc/sendmail. cf
Dnl You will 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 ('ucp _ 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 used (not the HUB) to send emails using the HUB by default.
MASQUERADE_AS ('RD .xxx.com ')
<-------------------------
FEATURE ('masquerade _ entire_domain ')
<--- These three are used for email address disguise
FEATURE ('masquerade _ envelope ')
<-------------------------
FEATURE ('smrsh', '/usr/sbin/smrsh ')
FEATURE ('mailertable', 'hash-o/etc/mail/mailertable ')
FEATURE ('your usertable', 'hash-o/etc/mail/Your usertable ')
FEATURE (redirect)
FEATURE (always_add_domain)
FEATURE (use_cw_file)
FEATURE (local_procmail)
FEATURE ('Access _ db ')
FEATURE ('blacklist _ recipients ')
FEATURE ('Accept _ unresolvable_domains ')
MAILER (smtp)
MAILER (procmail)
Dnl We stronugly recommend to comment this one out if you want to protect
Dnl yourself from spam. However, the laptop and users on computers that do
Dnl not hav 24x7 DNS do need this.
Dnl FEATURE ('relay _ based_on_MX ')